I have a GeoJSON file. It loads properly in QGIS but not in JSON viewer (http://geojson.io). I have select EPSG:4326 as the CRS.

When I open the GeoJSON file in notepad++ and check the coordinates they look like "coordinates": [ [ [ [ 735162.3406, 1403154.0408 ]...."

I think these are not valid.

Let me explain briefly:

Snapshot: When GeoJSON file load in QGIS - when GeoJSON load in QGIS

Snapshot: When same GeoJSON file load in geojson.io

enter image description here

GeoJSON file link - https://drive.google.com/open?id=15iuoKcyHPU7rsJ6VtHMT7ojhKAfHU057

  • 1
    That is not EPSG:4326 coordinates. When you export from QGIS to geojson select EPSG 4326. – Anton vBR Nov 2 '18 at 11:42
  • 1
    @Anton vBR you should submit that as an answer - it's totally valid, doesn't matter it's short - it will improve the tally of unanswered questions which = bad – Stev_k Nov 2 '18 at 14:01
  • Thanks for the review it... I have update the question with more description – Saurabh Yadav Nov 3 '18 at 6:17


Short answer: Those are not EPSG:4326 coordinates.

Long answer (and possible workaround):

I downloaded your file and posted it on geojsonlint.com. Which resulted in:

enter image description here

Ok, so you say you can import this to QGIS and it displays? This is most likely due to the fact QGIS can validate and correct GEOJSON. The GEOJSON-lint indicated we have an old-style crs member.

Ok, looking at your coordinates you have most likely the Pseudo-Mercator (3857). By right-clicking in QGIS on your layer you have a Set CRS --> Set Layer CRS option. Go in there and change it.

enter image description here

Now we can export the data to GEOJSON again. And this time make sure you select the WGS84 (4326). The resulting geojson (map.geojson) now looks like this:

enter image description here

Looking at the map this might be wrong. But now you have a tool to work your way to correct your data.

  • It looks like spherical mercator (3857). Also, four [ brackets doesn't seem right] unless it is a multipolygon? – John Powell Nov 2 '18 at 15:39
  • @JohnPowell MultiPolygon are 4 bracketed. – Anton vBR Nov 2 '18 at 17:50
  • 1
    Yes, I did say, unless it is a multipolygon. Hard to know since OP didn't post a very complete snippet, but, if geojson.io doesn't load it, there is likely to be something else wrong. – John Powell Nov 2 '18 at 18:05
  • Thanks guys for review! I have update the question with more description also a Geojson file is attached – Saurabh Yadav Nov 3 '18 at 6:34
  • 1
    @Saurabh Hope it helped you! – Anton vBR Nov 4 '18 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.