Wednesday, 18 April 2018

coordinate system - How do I Fix Projection Issues in QGIS


I have some exiting shape files that supposedly have a CRS of OSGEO:41001. If I import new data, and set the CRS to OSGEO:41001 they do not align. If I change the CRS of the new layers to EPSG:4326, everything appears to line up. While I can create pretty pictures, I can't do any distance or co-location calculations between layers. Apparently, I incorrectly transformed some data once in the past.


Starting for scratch, import old files (a base map of US) loads and displays. Screen coordinates for St George UT show as -12460233, 4682824. Load up new data consisting of Lat Long delimited text, the screen coordinates for St George show as -113.55, 37.02. Both layers have a CRS of EPSG:4326


Question: How can I fix my old files to be correct?


Question: What did I do wrong?




Answer



From http://wiki.openstreetmap.org/wiki/EPSG:3857 :



OSGEO:41001 - OSGeo created this code while developing the Tile Map Service (TMS) specification. [1] It was superceded by 900913. (equivalent, deprecated)



And by now, 900913 is replaced by EPSG:3857.


If you are in doubt over the right CRS, have a look at the extent of the data with Rightclick, Properties, metadata tab.


Coordinate in the range of +-21000000 are likely in EPSG:3857.


Coordinates in the range of +-180/90 look more likely as EPSG:4326 using degrees.


Other CRS in UTM metres or feet-US are also far greater.



In order to clean up your projection mess, do not reproject the old data with Save as.... You better assign the correct CRS to the data by Set CRS for layeror exchanging the .prj file with one that is correctly created for EPSG:3857.


The lat/long degrees data should remain in EPSG:4326.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...