Monday, 14 December 2015

Setting coordinate systems in QGIS: "transform error caught"


I'm learning how to use QGIS (v 1.8.0 "Lisboa") on Mac OS 10.6.8. My goal is to create a simple county map of Illinois using the base data shapefiles available from the Illinois Natural Resources Geospatial Data Clearinghouse.


Following workflow suggestions in another thread, I first checked "Enable 'on the fly' CRS transformation" in Project Properties.


Then I added the shapefile:



Illinois wide


I then changed the CRS in Project Properties to NAD83/Illinois (West) [EPSG code 26972] to get the desired look:


Illinois


So far so good. But after saving the QGIS file, closing it, then opening it again, I get a CRS error:


Transform error caught: forward transform of (0.000000, 0.000000)
PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=tmerc +lat_0=36.66666666666666
+lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Error: latitude or longitude exceeded limits


How do I prevent this type of error?



Answer



Changing the CRS in layer properties is something different than reprojecting the data in the file. Your file still has +proj=longlat. You attempt to display 0°E/0°N (somewhere next to the coast of Nigeria) into the Illinois state plane, and that will not work.


Open the layer in longlat, and rightclick -> Save As ... into EPSG:29672 under a different name, and add the result to the canvas.


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