How to make your coordinates WGS84 with mapshaper.org

If you upload your GeoJSON and your map doesn't seem to display, the coordinates in your GeoJSON are probably not WGS84. You can get a reasonable idea of this by looking at a few of the (multi)polygons. If WGS84 is being used, then all coordinates should represent longitudes and latitudes, and be between -180° and 180°, and -90° and 90°, respectively. If the numbers are outside this range, then they don’t represent longitudes and latitudes and so can’t be WGS84.

To transform your coordinates to be WGS84, you can use the free online tool mapshaper.org

In this article

    1

    Import your GeoJSON to mapshaper.org.

    TIP: Struggling to find the right regions for your map? Check out our GeoJSON repository where we've sourced, checked, and resized various region files ready for you to download and use in Flourish.

    2

    Open the console and enter the command "-proj wgs84". If you get an error message at this stage, skip down to the "How to specify original coordinate systems" section of this article, otherwise continue.

    3
    Export as GeoJSON.

    4
    Open any of the Projection map starting points, clear the Regions and Regions geometry sheets and upload your GeoJSON file in the Regions geometry tab. Then, bind a column under Geo region key

    5
    Now, upload the same spreadsheet under the Regions tab, and make sure that you bind the same column under Geo region key that you used in your Regions geometry sheet.

    6
    You can also delete your shapefile boundaries from the Regions tab – the template will only pull boundaries if they are in the Regions geometry sheet.

    7
    That's it – you've successfully made your coordinates WGS84! 🎉 

    TIP: When converting to WGS-84 in the Mapshaper console, you might get an error that says: "Unable to project -- source coordinate system is unknown". This means that Mapshaper doesn't recognize the original coordinate system, and you will need to specify it yourself to convert. For this, you will need to check the source from where you downloaded your data.

How to specify original coordinate systems

    1
    Go to the source of where you found your GeoJSON and find out the source coordinate system. If you cannot find it on the original website, you can upload your file into My Geo Data, and this will inform you what the original coordinate system is using.

    2
    In Mapshaper, open up the console and enter this line of code, using the EPSG codes you need. You can find the EPSG code you need here. For reference, WGS84's EPSG code is 4326.
    In this example, we are stating our original coordinate system, which is ETRS89 / UTM zone 33N, and making them WGS84:
    -proj from=EPSG:25833 crs=EPSG:4326
    	

You can now simplify and export your GeoJSON and upload it into Flourish following the steps above!