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 the coordinates should all 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"

    3
    Export as GeoJSON

    4
    Upload your new GeoJSON to the projection map template and see your map appear in the bottom right corner


That's it – you've successfully made your coordinates WGS84! When converting to WGS-84 in the Mapshaper console, you might get an error which 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 of 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!