---
title: "GeoDjango"
version: 5.1
locale: en
source: https://docs.djangoproject.com/en/5.1/ref/contrib/gis/
canonical: https://djangodocs.dev/en/5.1/ref/contrib/gis/
---
# GeoDjango

GeoDjango intends to be a world-class geographic web framework. Its goal is to
make it as easy as possible to build GIS web applications and harness the power
of spatially enabled data.

- [GeoDjango Tutorial](/en/5.1/ref/contrib/gis/tutorial/)

  - [Introduction](/en/5.1/ref/contrib/gis/tutorial/#introduction)
  - [Setting Up](/en/5.1/ref/contrib/gis/tutorial/#setting-up)
  - [Geographic Data](/en/5.1/ref/contrib/gis/tutorial/#geographic-data)
  - [Geographic Models](/en/5.1/ref/contrib/gis/tutorial/#geographic-models)
  - [Importing Spatial Data](/en/5.1/ref/contrib/gis/tutorial/#importing-spatial-data)
  - [Spatial Queries](/en/5.1/ref/contrib/gis/tutorial/#spatial-queries)
  - [Putting your data on the map](/en/5.1/ref/contrib/gis/tutorial/#putting-your-data-on-the-map)
- [GeoDjango Installation](/en/5.1/ref/contrib/gis/install/)

  - [Overview](/en/5.1/ref/contrib/gis/install/#overview)
  - [Requirements](/en/5.1/ref/contrib/gis/install/#requirements)
  - [Installation](/en/5.1/ref/contrib/gis/install/#installation)
  - [Troubleshooting](/en/5.1/ref/contrib/gis/install/#troubleshooting)
  - [Platform-specific instructions](/en/5.1/ref/contrib/gis/install/#platform-specific-instructions)
- [GeoDjango Model API](/en/5.1/ref/contrib/gis/model-api/)

  - [Spatial Field Types](/en/5.1/ref/contrib/gis/model-api/#spatial-field-types)
  - [Spatial Field Options](/en/5.1/ref/contrib/gis/model-api/#spatial-field-options)
  - [Geometry Field Options](/en/5.1/ref/contrib/gis/model-api/#geometry-field-options)
- [GeoDjango Database API](/en/5.1/ref/contrib/gis/db-api/)

  - [Spatial Backends](/en/5.1/ref/contrib/gis/db-api/#module-django.contrib.gis.db.backends)
  - [Creating and Saving Models with Geometry Fields](/en/5.1/ref/contrib/gis/db-api/#creating-and-saving-models-with-geometry-fields)
  - [Creating and Saving Models with Raster Fields](/en/5.1/ref/contrib/gis/db-api/#creating-and-saving-models-with-raster-fields)
  - [Spatial Lookups](/en/5.1/ref/contrib/gis/db-api/#spatial-lookups)
  - [Distance Queries](/en/5.1/ref/contrib/gis/db-api/#distance-queries)
  - [Compatibility Tables](/en/5.1/ref/contrib/gis/db-api/#compatibility-tables)
- [GeoDjango Forms API](/en/5.1/ref/contrib/gis/forms-api/)

  - [Field arguments](/en/5.1/ref/contrib/gis/forms-api/#field-arguments)
  - [Form field classes](/en/5.1/ref/contrib/gis/forms-api/#form-field-classes)
  - [Form widgets](/en/5.1/ref/contrib/gis/forms-api/#module-django.contrib.gis.forms.widgets)
- [GIS QuerySet API Reference](/en/5.1/ref/contrib/gis/geoquerysets/)

  - [Spatial Lookups](/en/5.1/ref/contrib/gis/geoquerysets/#spatial-lookups)
  - [Distance Lookups](/en/5.1/ref/contrib/gis/geoquerysets/#distance-lookups)
- [Geographic Database Functions](/en/5.1/ref/contrib/gis/functions/)

  - [`Area`](/en/5.1/ref/contrib/gis/functions/#area)
  - [`AsGeoJSON`](/en/5.1/ref/contrib/gis/functions/#asgeojson)
  - [`AsGML`](/en/5.1/ref/contrib/gis/functions/#asgml)
  - [`AsKML`](/en/5.1/ref/contrib/gis/functions/#askml)
  - [`AsSVG`](/en/5.1/ref/contrib/gis/functions/#assvg)
  - [`AsWKB`](/en/5.1/ref/contrib/gis/functions/#aswkb)
  - [`AsWKT`](/en/5.1/ref/contrib/gis/functions/#aswkt)
  - [`Azimuth`](/en/5.1/ref/contrib/gis/functions/#azimuth)
  - [`BoundingCircle`](/en/5.1/ref/contrib/gis/functions/#boundingcircle)
  - [`Centroid`](/en/5.1/ref/contrib/gis/functions/#centroid)
  - [`ClosestPoint`](/en/5.1/ref/contrib/gis/functions/#closestpoint)
  - [`Difference`](/en/5.1/ref/contrib/gis/functions/#difference)
  - [`Distance`](/en/5.1/ref/contrib/gis/functions/#distance)
  - [`Envelope`](/en/5.1/ref/contrib/gis/functions/#envelope)
  - [`ForcePolygonCW`](/en/5.1/ref/contrib/gis/functions/#forcepolygoncw)
  - [`FromWKB`](/en/5.1/ref/contrib/gis/functions/#fromwkb)
  - [`FromWKT`](/en/5.1/ref/contrib/gis/functions/#fromwkt)
  - [`GeoHash`](/en/5.1/ref/contrib/gis/functions/#geohash)
  - [`GeometryDistance`](/en/5.1/ref/contrib/gis/functions/#geometrydistance)
  - [`Intersection`](/en/5.1/ref/contrib/gis/functions/#intersection)
  - [`IsEmpty`](/en/5.1/ref/contrib/gis/functions/#isempty)
  - [`IsValid`](/en/5.1/ref/contrib/gis/functions/#isvalid)
  - [`Length`](/en/5.1/ref/contrib/gis/functions/#length)
  - [`LineLocatePoint`](/en/5.1/ref/contrib/gis/functions/#linelocatepoint)
  - [`MakeValid`](/en/5.1/ref/contrib/gis/functions/#makevalid)
  - [`MemSize`](/en/5.1/ref/contrib/gis/functions/#memsize)
  - [`NumGeometries`](/en/5.1/ref/contrib/gis/functions/#numgeometries)
  - [`NumPoints`](/en/5.1/ref/contrib/gis/functions/#numpoints)
  - [`Perimeter`](/en/5.1/ref/contrib/gis/functions/#perimeter)
  - [`PointOnSurface`](/en/5.1/ref/contrib/gis/functions/#pointonsurface)
  - [`Reverse`](/en/5.1/ref/contrib/gis/functions/#reverse)
  - [`Scale`](/en/5.1/ref/contrib/gis/functions/#scale)
  - [`SnapToGrid`](/en/5.1/ref/contrib/gis/functions/#snaptogrid)
  - [`SymDifference`](/en/5.1/ref/contrib/gis/functions/#symdifference)
  - [`Transform`](/en/5.1/ref/contrib/gis/functions/#transform)
  - [`Translate`](/en/5.1/ref/contrib/gis/functions/#translate)
  - [`Union`](/en/5.1/ref/contrib/gis/functions/#union)
- [Measurement Objects](/en/5.1/ref/contrib/gis/measure/)

  - [Example](/en/5.1/ref/contrib/gis/measure/#example)
  - [Supported units](/en/5.1/ref/contrib/gis/measure/#supported-units)
  - [Measurement API](/en/5.1/ref/contrib/gis/measure/#measurement-api)
- [GEOS API](/en/5.1/ref/contrib/gis/geos/)

  - [Background](/en/5.1/ref/contrib/gis/geos/#background)
  - [Tutorial](/en/5.1/ref/contrib/gis/geos/#tutorial)
  - [Geometry Objects](/en/5.1/ref/contrib/gis/geos/#geometry-objects)
  - [Geometry Collections](/en/5.1/ref/contrib/gis/geos/#geometry-collections)
  - [Prepared Geometries](/en/5.1/ref/contrib/gis/geos/#prepared-geometries)
  - [Geometry Factories](/en/5.1/ref/contrib/gis/geos/#geometry-factories)
  - [I/O Objects](/en/5.1/ref/contrib/gis/geos/#i-o-objects)
  - [Settings](/en/5.1/ref/contrib/gis/geos/#settings)
  - [Exceptions](/en/5.1/ref/contrib/gis/geos/#exceptions)
- [GDAL API](/en/5.1/ref/contrib/gis/gdal/)

  - [Overview](/en/5.1/ref/contrib/gis/gdal/#overview)
  - [Vector Data Source Objects](/en/5.1/ref/contrib/gis/gdal/#vector-data-source-objects)
  - [OGR Geometries](/en/5.1/ref/contrib/gis/gdal/#ogr-geometries)
  - [Coordinate System Objects](/en/5.1/ref/contrib/gis/gdal/#coordinate-system-objects)
  - [Raster Data Objects](/en/5.1/ref/contrib/gis/gdal/#raster-data-objects)
  - [Settings](/en/5.1/ref/contrib/gis/gdal/#settings)
  - [Exceptions](/en/5.1/ref/contrib/gis/gdal/#exceptions)
- [Geolocation with GeoIP2](/en/5.1/ref/contrib/gis/geoip2/)

  - [Example](/en/5.1/ref/contrib/gis/geoip2/#example)
  - [API Reference](/en/5.1/ref/contrib/gis/geoip2/#api-reference)
  - [Methods](/en/5.1/ref/contrib/gis/geoip2/#methods)
  - [Settings](/en/5.1/ref/contrib/gis/geoip2/#settings)
  - [Exceptions](/en/5.1/ref/contrib/gis/geoip2/#exceptions)
- [GeoDjango Utilities](/en/5.1/ref/contrib/gis/utils/)

  - [`LayerMapping` data import utility](/en/5.1/ref/contrib/gis/layermapping/)
  - [OGR Inspection](/en/5.1/ref/contrib/gis/ogrinspect/)
  - [`GeoJSON` Serializer](/en/5.1/ref/contrib/gis/serializers/)
- [GeoDjango Management Commands](/en/5.1/ref/contrib/gis/commands/)

  - [`inspectdb`](/en/5.1/ref/contrib/gis/commands/#inspectdb)
  - [`ogrinspect`](/en/5.1/ref/contrib/gis/commands/#ogrinspect)
- [GeoDjango’s admin site](/en/5.1/ref/contrib/gis/admin/)

  - [`GISModelAdmin`](/en/5.1/ref/contrib/gis/admin/#gismodeladmin)
- [Geographic Feeds](/en/5.1/ref/contrib/gis/feeds/)

  - [Example](/en/5.1/ref/contrib/gis/feeds/#example)
  - [API Reference](/en/5.1/ref/contrib/gis/feeds/#api-reference)
- [Geographic Sitemaps](/en/5.1/ref/contrib/gis/sitemaps/)

  - [Example](/en/5.1/ref/contrib/gis/sitemaps/#example)
  - [Reference](/en/5.1/ref/contrib/gis/sitemaps/#reference)
- [Testing GeoDjango apps](/en/5.1/ref/contrib/gis/testing/)

  - [PostGIS](/en/5.1/ref/contrib/gis/testing/#postgis)
  - [GeoDjango tests](/en/5.1/ref/contrib/gis/testing/#geodjango-tests)
- [Deploying GeoDjango](/en/5.1/ref/contrib/gis/deployment/)
