Converting your data to GeoJSON


#1

In this article, we will detail how to convert a vector data (e.g. in Shapefile format) 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.

  1. In order to convert a vector data to GeoJSON to be used in Geodesignhub, Please ensure that the data is projected to WGS 1984 projection because this is the only projection supported by GeoJSON.

  2. Load the vector data in QGIS, using add a vector layer command.

  3. Right click on the layer and select the “Save As…” command

  4. Save the GeoJSON file.

In case the saved GeoJSON file is more than 4MB, it needs to be simplified. It is recommended that you remove all attributes and just keep the ones necessary to reduce size even more. Please review the simplifying maps topic for tools and settings for simplification.

Beta tool

Geodesignhub Evaluation Maps Converter

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, it only supports GeoPackage which is a open OGC format for Spatial Data.

Other online tools

  • Ogre: A online tool to convert vector data to GeoJSON using the ogr2ogr command.

  • Mapshaper: A online tool to upload many data formats, 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


Making Evaluation maps
Step by step guide to setting up data for your project
#2

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.

That’s not correct.

The CRS used by GeoJSON is urn:ogc:def:crs:OGC:1.3:CRS84 which is WGS84 with coordinates in longitude/ latitude order.

EPSG:4326 is WGS84 with coordinates in latitude/longitude order.

GeoJSON is not EPSG:4326


#3

Hi @nmtoken, :pray: thank you for the clarification, I appreciate it! You are absolutely correct, I always get confused with Leaflet ordering and the EPSG ordering. Anyway, I have fixed this now and it is clear. Thank you again for pointing this out.