question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lat/long ordering in geojson

See original GitHub issue

Lat/long ordering is inconsistent across various packages and tooling when working with points.

It would be useful if folium.GeoJson() included a flag flip=Boolean that could be set to flip lat and long co-ordinates in a passed geojson file.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Conengmocommented, Sep 7, 2022

Leaflet, which folium is a wrapper for, uses [lat, lon], wheres the geojson standard uses [lon, lat].

https://leafletjs.com/reference.html#latlng

https://en.wikipedia.org/wiki/GeoJSON#Geometries

0reactions
ocefpafcommented, Nov 24, 2022

It may be beneficial to the documentation if you’d put a big red note in the readme about exactly this:

Do you want to send a PR for it? We could use a note in the docs too. Here is a SO question for inspiration. And the mandatory West Wing episode on maps coordinates and order.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Order of coordinates in geojson - Stack Overflow
Coordinates order is longitude and latitude, or easting and northing. Source: 3.1.1. Position. A position is the fundamental geometry construct.
Read more >
Leaflet+GeoJSON: Why are lat-lng coordinates in the wrong ...
Nothing is in the wrong order. Leaflet uses lat-lng (or northing-easting ) whereas GeoJSON uses lng-lat (or easting-northing ).
Read more >
More than you ever wanted to know about GeoJSON
GeoJSON describes an order for coordinates: they should go, in order: [longitude, latitude, elevation]. This order can be surprising.
Read more >
RFC 7946: The GeoJSON Format
1. Points Point coordinates are in x, y order (easting, northing for projected coordinates, longitude, and latitude for geographic coordinates): { "type": " ......
Read more >
MultiPoint Datatype | Socrata - Data & Insights
Heads up! Contrary to the normal convention of "latitude, longitude" ordering in the coordinates property, the GeoJSON orders the coordinates as "longitude, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found