Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

First: I'll summarize what I understand so far so please confirm or correct me.

  1. When On-the-Fly is selected a layer is re-projected from that of the layer's CRS to that of the project CRS, IF

    the project CRS has been defined and the layer CRS has been recognized (which apparently is not always the case)

  2. The project CRS can be defined three ways: choose one from a menu, set it to a particular layer's CRS let it default to a past CRS or a layer CRS.

  3. The layer CRS MAY be recognized on import (or not). If it's not (or is) the way to configure the the CRS is to save the layer as a shape file and select a CRS when prompted. HOWEVER, it sounds like if a .qrj file has already been generated this will fail somehow, so we must assure ourselves a .qrj file is not present.

How am I doing so far?

OK Second: I'm using QGIS 1.8 on a Windows 7 OS.

Let's say two different layers have been saved each with CRS designated as EPSG:2272 (NAD83 / Pennsylvania South (ftUS)) and we start a new project. We select ON-THE-Fly re-projection and set the project CRS to EPSG:2272. We open both shp files as layers. They are both files of Philadelphia, ( PhilaCopIncsJune302012, PhilaCensusBlocks2012) and the the prj files respectively are:

PROJCS["NAD83 / Pennsylvania South (ftUS)", GEOGCS["NAD83",DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",40.96666666666667], PARAMETER["standard_parallel_2",39.93333333333333], PARAMETER["latitude_of_origin",39.33333333333334], PARAMETER["central_meridian",-77.75], PARAMETER["false_easting",1968500], PARAMETER["false_northing",0],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]], AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","2272"]]

and

PROJCS["NAD83 / Pennsylvania South (ftUS)", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",40.96666666666667], PARAMETER["standard_parallel_2",39.93333333333333], PARAMETER["latitude_of_origin",39.33333333333334], PARAMETER["central_meridian",-77.75], PARAMETER["false_easting",1968500], PARAMETER["false_northing",0], UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]], AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","2272"]]

The CRS found in the PhilaCopIncsJune302012 info document is WGS84 decimal degrees.

The CRS found in the PhilaCensusBlocks2012 XML document is:

  • NAD_1983_StatePlane_Pennsylvania_South_FIPS_3702_Feet EPSG 7.4.1

The two layers are far far away from each other. Any ideas why?

Thanks

share|improve this question

2 Answers 2

up vote 7 down vote accepted

If you want to assign a CRS to a displaced shapefile layer different to the current (false) one, do not Save As ... . This will reproject the data, but keep the displacement.

You should better use Vector -> Data Management Tools -> Define Current Projection. This will let coordinate values untouched, but change .prj and .qpj on disk. To see the change of displacement, you have to move the map a bit to force a redraw. This may be considered as a minor, confusing bug: http://hub.qgis.org/issues/7257

Rightclick -> Set CRS for layer is only working for the current QGIS project by writing the new CRS into the .qgs file, so will also not be what you want.

For the second question: The second file I found at opendataphilly.org, it is correct with EPSG:2272, and alignes well to openlayers plugin Openstreetmap background. If the other (from where?) should be in WGS84, you could add it with that projection to the canvas. By saving or defining it to EPSG:2272 you must have done something wrong.

share|improve this answer
    
Thank you for your help Andre. The other data comes from: <origin>U.S. Department of Commerce, U.S. Census Bureau, Geography Division</origin> <pubdate>2010</pubdate> <title>GIS_PLANNING.Census_Block_Groups_2010</title> <edition>2010</edition> <geoform>vector digital data</geoform> <onlink>census.gov/geo/www/tiger</onlink>; I'll work on this and let you know how it goes. –  Fred Mar 1 '13 at 11:45
    
Much better explanation than I gave! +1 –  Jay Guarneri Mar 1 '13 at 15:06
2  
That did the Trick! : 1. started fresh 2. didn't set CRS, but did set On-The-Fly reprojection. 3. imported the census (EPSG:2272) map and set the project CRS to this layer. 4. Imported the Police call data from the .CVS file and set that layer to WGS84. Bingo, right on top of each other. The only question I have is, should I post this as a comment or an answer? –  Fred Mar 2 '13 at 0:45
    
And Thank you all. –  Fred Mar 2 '13 at 0:45
    
It's not far away from my answer, so comment and accept should be OK. –  AndreJ Mar 2 '13 at 6:10

This can be a really frustrating problem when dealing with spatial data. I'm sure many people on this site can empathize with your troubles!! My first thought is that it looks like you have the "PhilaCopIncsJune302012" file set to Penn. State Plane (ft) when it should be in WGS 84. WGS 84 is technically not "projected," as it is a Lat/Long system. What I would try is starting over with a fresh map and un-tampered-with data and setting the projections again to see if that fixes it. If that works, save a Penn State Plane version and see if that works for you.

Another possibility is that you have accidentally turned off on-the-fly projection and not noticed. I've definitely done that before.

If that fails, try looking at where the features are in relation to each other. This can tell you a bit about if one is in the wrong projection. For example, in UTM, if one feature is due south of the other by a lot, you probably accidentally selected the Southern equivalent of the UTM zone. If it's due east or west, you may have the wrong zone number. Once you do get everything working correctly, I definitely recommend using the same projection and datum for all of your data, especially if you are going to derive measurements from them. This will prevent a lot of headache (and heartache) down the road.

share|improve this answer
    
Thanks for the tips Jay, I'll keep grinding. You've given me another clue and a question. There must be some sort of reconciliation between Polar and Cartesian systems. When you say a Lat/Long system is technically 'not projected', how is a degree based system handled relative to a X/Y system? Should I post this as a new question? –  Fred Mar 1 '13 at 12:15
    
Degree based systems basically tell you where you are on a sphere (the full story is a bit more complex, but that's the basic idea). Projections are different methods of fitting that sphere onto a flat sheet. With many projections, the result is essentially what would happen if you placed a light inside a transparent globe and traced where the shadows fall on a paper. The main differences between projections are where the light is inside the globe (sometimes a half globe) and how the paper is placed around the globe. Check out: egsc.usgs.gov/isb/pubs/MapProjections/projections.html –  Jay Guarneri Mar 1 '13 at 15:05
    
Are you saying, Jay, that a polar CRS is the native underlying mathematical system and that any Cartesian system is always a projected transformation back to the polar sytem? –  Fred Mar 1 '13 at 15:23
1  
Yes, thats a good idea. And we need a lot of different CRS, because the Earth is not a globe, not even an ellipsoid. Therefore every surveying authority had set up its own ellipsoid, and own projection methods fitted best for their country. –  AndreJ Mar 1 '13 at 15:52
1  
It's not a polar system as I understand it which would use r (radius) and theta, but a geographic or geodetic coordinate system which uses two angles, latitude (often phi) and longitude (often lambda) to designate a location on a sphere or ellipsoid. en.wikipedia.org/wiki/Geographic_coordinate_system –  mkennedy Mar 1 '13 at 16:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.