Friday 24 June 2016

coordinate system - Adjusting extents so that same-CRS shapefiles overlap in QGIS?


I have two files with identical projections/CRS. Using both OTF on & off I cannot get them to overlap: one shapefile contains coastal polygons of Massachusetts, and the other shapefile contains coastal lines for MA.


 +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs

+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs

however the extents are


 xMin,yMin 2321544.64,258328.06 : xMax,yMax 2333464.74,277553.12


vs.


 xMin,yMin -176.685,17.9108 : xMax,yMax -65.2246,71.3413

I've followed the steps in http://qgis.spatialthoughts.com/2012/04/tutorial-working-with-projections-in.html , tried with OTF turned on & off: the layers still do not overlap.


EDIT:


I've saved the MA coast line SHP ( Layer > save as ) using each of the Layer CRS, Project CRS and Selected CRS options: the extent remains the same. As far as I can tell, the chosen projection (EPSG:2163) is a PCS, not a GCS.



Answer



The coordinates of the second one ares NOT in laea projection, but in degrees.


So you have to Rightclick -> Set CRS for Layer to correct the false CRS information to WGS84 or NAD 83 or NAD27.



I don't know what you did wrong, but you may have done the same error with the first layer as well, and they might still not align after sanitizing only the second layer.


Best way would be to start from scratch with a fresh download of the datasoruces into a new qgis project.


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...