---
title: "Discussion on \"Designing A Geospatial Rest Backend Using GeoDjango\" | Hashnode"
description: "Discussion on \"Designing A Geospatial Rest Backend Using GeoDjango\". A complete module on how design a Geospatial Backend which can conduct map analysis using Django"
url: "https://hashnode.com/posts/designing-a-geospatial-rest-backend-using-geodjango/60b49019241c3d4add68ba12"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Designing A Geospatial Rest Backend Using GeoDjango](https://techblog.geekyants.com/designing-a-geospatial-rest-backend-using-geodjango?utm_source=hashnode&utm_medium=feed)

A complete module on how design a Geospatial Backend which can conduct map analysis using Django

May 31, 2021 · 11 min read · techblog.geekyants.com  
Updated Jul 9, 2021  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#django](https://hashnode.com/tag/django)
-   [#geospatial](https://hashnode.com/tag/geospatial)
-   [#geolocation](https://hashnode.com/tag/geolocation)
-   [#postgresql](https://hashnode.com/tag/postgresql)

## Written by

[Nayan Das](https://hashnode.com/@nynjdas)

@nynjdas

  
[View profile](https://hashnode.com/@nynjdas)

I am a developer.

## Responses 2

Markdown supported · ⌘↵ to post

[Paul Onteri](https://hashnode.com/@paulonteri)

[Sep 9, 2022](https://hashnode.com/posts/designing-a-geospatial-rest-backend-using-geodjango/60b49019241c3d4add68ba12/comment/631b1625f73f4734bc050c31)

Good read!

[Tawanda K](https://hashnode.com/@tawandam)

[Jul 24, 2021](https://hashnode.com/posts/designing-a-geospatial-rest-backend-using-geodjango/60b49019241c3d4add68ba12/comment/60fbecf031552277811ac9a8)

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

[REF 1](https://docs.djangoproject.com/en/3.2/ref/contrib/gis/tutorial/#defining-a-geographic-model)

```
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

[REF 2](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1)

```
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?
