Hi Amira

On 29/05/2014 14:39, Amira El-Shal wrote:
Hi Micha,

I cannot thank you enough for your prompt and illaborative response.

"On the fly reprojection" was enabled. I disabled "On the fly reprojection", but still the layers did not overlap correctly.


Ah, so that's the problem, for sure.

I could not save the interview locations to a new layer, using the CRS of the boundaries, because I do not know the CRS of the boundaries. No *.prj file is there and I do not have access to the supplier in the meantime. I just know the CRS of the interview locations. Therefore, I tried to save the boundaries to the CRS of the interview locations, but it did not work either. What is your advice?

What is the CRS of the interview locations?
Is it possible to use district boundaries from another source, such as the Global Administrative Areas website www.gadm.org. This data is referenced in WGS84, latitude/longitude.
The data for Egypt is at: http://biogeo.ucdavis.edu/data/gadm2/shp/EGY_adm.zip. The first level (adm1) data includes only the 25 Governates. Is that enough detail for your project?

Otherwise, you'll have to somehow verify the CRS of the district boundaries. AFAIK, Egypt uses two geodetic reference system know as "Old Egyptian"  or "Egypt 1907" with code 6229. The other is called "New Egyptian" or Egypt 1930, having code 4199. Maybe the data will overlay correctly if you declare the layer to be in one of these CRS? You do that by opening the layer's property window, in the "General" tab. There, in the section on coordinate reference system, is a button "Specify". Using this button does *not* change the data at all, it only declares that the layer is referenced in the CRS that you specify. If that works, and the districts with interview locations overlay correctly, then you have probably found the right CRS.



Thank you again.

Sincerely yours,
Amira


On Thu, May 29, 2014 at 11:55 AM, Micha Silver <mi...@arava.co.il> wrote:
Hi Amira:
I'd be glad to try to help.

First, note that you can also post on the qgis-users maillist.  You might get better responses there. You can signup to join that maillist here:  http://lists.osgeo.org/mailman/listinfo/qgis-user
I am cc-ing your question to the list also.

Now as to spatial join. I would tend to believe that the the error message is correct - the layers are probably not really in the same coordinate system. Do you have the option "On the fly reprojection" enabled? If you disable "On the fly reprojection" do the layers still overlap correctly? If not, then they are indeed in different CRS.  In this case, you should reproject one of the layers to a new shapefile, and specify to save in the CRS of the other. For example, save the interview locations to a new layer, using the CRS of the boundaries.

Obviously you must know what the actual CRS of each layer is to begin with. This information usually comes in the form of a *.prj file together with the rest of the shapefile components. If there is no *.prj file, then you might have to contact the supplier of the data to understand what CRS the data are located in.

Now, save the interview layer to a new shapefile, reprojected to the CRS of the boundaries. You do this with a right-click on the layer, and choose "Save As...". In the save dialog, choose the CRS of the boundaries layer. So you will now have a new copy of the interview locations, but reprojected to the CRS of the boundaries. Now try the spatial join between the new interview locations and the boundaries.

HTH,
Micha




On 29/05/2014 10:25, Amira El-Shal wrote:
Dear Ms. Micha,

I hope that this message finds you safe and sound.

I am doing my PhD in Health Economics. Meanwhile, I am trying to spatially join point layers of some 12,000 women interviewed in Egypt to Egypt's polygon layers (administrative districts boundaries) using QGIS 2.2 and need some advice. Who can I ask? I am a QGIS self-learner.

I have read many QGIS manuals, but I cannot complete the spatial join successfully. I have added the vector layers of both Egypt's women's GPS points and Egypt's polygons (district boundaries). I used the UTF-8 encoding. Whenever I attempt to join attributes by location, the following message appears "Input layers have non-matching CRS". However, when I check the CRS of both layers, I found it the same (EPSG:4326 - WGS 84).

I would like to thank you in advance for your kind cooperation.

Sincerely,
Amira El-Shal

This mail was received via Mail-SeCure System.


-- 
Micha Silver
GIS Consulting
052-3665918
http://www.surfaces.co.il



--
Best Regards

Faculty of Economics & Political Science
Cairo University

Tel:(202)35728055-(202)35728116-(202)35736608-(202)35736605
Fax:(202)35711020
Follow us on twitter:https://twitter.com/fepsnews

This mail was received via Mail-SeCure System.


-- 
Micha Silver
GIS Consulting
052-3665918
http://www.surfaces.co.il

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to