dj
@_themadnerd
@NayanJD
If we summarise GIS and GeoSpatial, geo spatial is GIS - the whole map data.
Measuring unit for geometry types.
It specifies which units (degrees/metres) are going to be used to represent the geometry types.
We are going to use SRID 4326
Bengaluru/ Coordinates
8637791 m, 1456487 m
Bengaluru/ Coordinates
12.9716 °N, 77.5946 °E
Longitude is x
Latitude is y
...not the other way around
(30°,15°)
(x, y)
(lat, long)
Point
LineString
Polygon
MultiPoint
MultiLineString
MultiPolygon
GeometryCollection
e.g. GeekyAnts On Maps
e.g. route along road between two points
e.g. an area of sub-locality of BTM
Python
Django
Django Rest Framework
Postgres (with postgis extension)
Invoked as polygon.contains(point)
Returns the distance between the closest point in this geometry and the other geometry
Retrieve factories which covers a given point
GEOS API would have to collect all rows of database in memory
GIS ORM would do the query right in database. Thus, efficient.
overlaps
bboverlaps
bbcontains
etc.
1. Fully supports GIS Standards
2. Provides Spatial ORM
3. Low learning curve
4. Plug & Play nature
1. Is overkill if geometries do not have to be stored
2. Has limited support for MySQL
1. https://www.gislounge.com/what-is-gis/
2. https://www.django-rest-framework.org/api-guide/serializers/
3. https://docs.djangoproject.com/en/3.1/ref/contrib/
gis/geoquerysets/
4. https://docs.djangoproject.com/en/3.2/ref/contrib/gis/geos/