In this article, we will detail how to convert a shapefile to GeoJSON using QGIS. Links to other free tools available online are also provided.
Geodesignhub supports the GeoJSON format for importing data. GeoJSON is a open standard for representing geographical features and also storing their non-spatial attributes. GeoJSON is natively supported by many tools including QGIS and GDAL.
In order to convert a Shapefile to GeoJSON to be used in Geodesignhub, Please ensure that the Shapefile is projected to WGS 1984 / EPSG 4326 projection because this is the only projection supported by GeoJSON.
Load the Shapefile in QGIS, using add a vector layer command.
Right click on the layer and select the “Save As…” command
Save the GeoJSON file.
In case the saved GeoJSON file is more than 4MB, it needs to be simplified. Please review the simplifying maps topic for tools and settings for simplification.
We have created our open source own tool to convert Evaluation maps into GeoJSON that can be uploaded in Geodesignhub. You can access it using the URL above. Before you upload your Shapefile, please do the following:
- Reproject the Shapefile in to EPSG 4326
- Fill all the holes in the features if possible.
- Make a .zip archive and then you are ready to upload.
Other online tools
Mapshaper: A online tool to upload Shapefile, simplify it and download as GeoJSON.
MyGeoData.eu: Another online tool to convert between different GIS data formats.
In addition there are numerous libraries in Python and other languages that can help you with the conversion. A partial list is here: awesome-geojson