Let’s say I have a shapefile and I’d like to convert it to GeoJSON. It’s simple to do in QGIS!
First, open up your layer to import it into QGIS. When I double-click it opens for me, but you might need to do Layer > Add Vector Layer
. It will appear on the list of layers on the left-hand side.
Now, right-click the layer and select Save as...
Format
dropdown.Layer CRS
, which is probably the default, change it to Selected CRS
. Then click ‘Browse’ and select NAD83
(or WGS 84
, which is slightly better for the non-USA world [and I mean SLIGHTLY]).it should look something like this:
NOTE: Selecting
NAD83
orWGS84
as your CRS makes the output be in latitude and longitude. Your shapefile might not have been, though! For example, New York uses this thing called the NY State Plane system which is basically a grid just around New York, and 100% not latitude/longitude. I think using lat/lon keeps everything simpler.
Your GeoJSON might be unimaginably large now! Or even just kind of large. Take a look at making geojson smaller