2 comments
·Jul 24, 2021
Jul 24, 2021
Hi, Thanks for the write up. You say
- Bangalore city: It can be represented as (12.9716°N, 77.5946°E) in SRID 4326 ... We would use SRID 4326 which is used by GeoDjango by default
In the above you imply (northerly, easterly) ordering i.e (latitude, longitude) And in your examples you have the ordering latitude, longitude
However GeoDjango says in its docs
The default spatial reference system for geometry fields is WGS84 (meaning the SRID is 4326) – in other words, the field coordinates are in longitude, latitude pairs in units of degrees.
Also the GeoJson spec specifies the order longitude, latitude
A position is an array of numbers. There MUST be two or more
elements. The first two elements are longitude and latitude, or
easting and northing
You seem to be storing this in the wrong order in your database, anything I am missing that could help?
·
·Sep 9, 2022
Sep 9, 2022
Good read!
·