Skip to content

Instantly share code, notes, and snippets.

@chrislkeller
Last active December 26, 2015 13:39
Show Gist options
  • Save chrislkeller/7160112 to your computer and use it in GitHub Desktop.
Save chrislkeller/7160112 to your computer and use it in GitHub Desktop.
Trying to convert shapefile to geojson in QGIS. How do I learn what projection I am looking for...
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
@chrislkeller
Copy link
Author

Figured it out

To convert WGS_1984_Web_Mercator_Auxiliary_Sphere to valid geojson in QGIS, here's what I learned.

  • Import layer as EPSG:3857

  • Save the Geojson export as EPSG:4326

  • if you have GDAL from the command line, the following also worked

    ogr2ogr -f GeoJSON -s_srs EPSG:3857 -t_srs EPSG:4326 <target-file> <source-file>
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment