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

GeoDjango 的目标是成为一流的地理 Web 框架。它的目标是尽可能地简化构建 GIS Web 应用程序并利用具有空间功能的数据的过程。

- [GeoDjango 教程](/zh-hans/5.2/ref/contrib/gis/tutorial/)

  - [介绍](/zh-hans/5.2/ref/contrib/gis/tutorial/#introduction)
  - [设置](/zh-hans/5.2/ref/contrib/gis/tutorial/#setting-up)
  - [地理数据](/zh-hans/5.2/ref/contrib/gis/tutorial/#geographic-data)
  - [地理模型](/zh-hans/5.2/ref/contrib/gis/tutorial/#geographic-models)
  - [导入空间数据](/zh-hans/5.2/ref/contrib/gis/tutorial/#importing-spatial-data)
  - [空间查询](/zh-hans/5.2/ref/contrib/gis/tutorial/#spatial-queries)
  - [将你的数据放在地图上](/zh-hans/5.2/ref/contrib/gis/tutorial/#putting-your-data-on-the-map)
- [GeoDjango 安装](/zh-hans/5.2/ref/contrib/gis/install/)

  - [概况](/zh-hans/5.2/ref/contrib/gis/install/#overview)
  - [依赖项](/zh-hans/5.2/ref/contrib/gis/install/#requirements)
  - [安装](/zh-hans/5.2/ref/contrib/gis/install/#installation)
  - [错误调试](/zh-hans/5.2/ref/contrib/gis/install/#troubleshooting)
  - [特定平台说明](/zh-hans/5.2/ref/contrib/gis/install/#platform-specific-instructions)
- [GeoDjango 模型 API](/zh-hans/5.2/ref/contrib/gis/model-api/)

  - [空间字段类型](/zh-hans/5.2/ref/contrib/gis/model-api/#spatial-field-types)
  - [空间字段选项](/zh-hans/5.2/ref/contrib/gis/model-api/#spatial-field-options)
  - [几何字段选项](/zh-hans/5.2/ref/contrib/gis/model-api/#geometry-field-options)
- [GeoDjango 数据库 API](/zh-hans/5.2/ref/contrib/gis/db-api/)

  - [空间后端](/zh-hans/5.2/ref/contrib/gis/db-api/#module-django.contrib.gis.db.backends)
  - [创建和保存具有几何字段的模型](/zh-hans/5.2/ref/contrib/gis/db-api/#creating-and-saving-models-with-geometry-fields)
  - [使用栅格字段创建和保存模型](/zh-hans/5.2/ref/contrib/gis/db-api/#creating-and-saving-models-with-raster-fields)
  - [空间查找](/zh-hans/5.2/ref/contrib/gis/db-api/#spatial-lookups)
  - [距离查询](/zh-hans/5.2/ref/contrib/gis/db-api/#distance-queries)
  - [兼容性表](/zh-hans/5.2/ref/contrib/gis/db-api/#compatibility-tables)
- [GeoDjango 表单 API](/zh-hans/5.2/ref/contrib/gis/forms-api/)

  - [字段参数](/zh-hans/5.2/ref/contrib/gis/forms-api/#field-arguments)
  - [表单字段类](/zh-hans/5.2/ref/contrib/gis/forms-api/#form-field-classes)
  - [表单部件](/zh-hans/5.2/ref/contrib/gis/forms-api/#module-django.contrib.gis.forms.widgets)
- [GIS QuerySet API 参考](/zh-hans/5.2/ref/contrib/gis/geoquerysets/)

  - [空间查找](/zh-hans/5.2/ref/contrib/gis/geoquerysets/#spatial-lookups)
  - [距离查找](/zh-hans/5.2/ref/contrib/gis/geoquerysets/#distance-lookups)
- [地理数据库函数](/zh-hans/5.2/ref/contrib/gis/functions/)

  - [Measurements](/zh-hans/5.2/ref/contrib/gis/functions/#measurements)
  - [关系映射](/zh-hans/5.2/ref/contrib/gis/functions/#relationships)
  - [操作](/zh-hans/5.2/ref/contrib/gis/functions/#operations)
  - [编辑器](/zh-hans/5.2/ref/contrib/gis/functions/#editors)
  - [输入格式：](/zh-hans/5.2/ref/contrib/gis/functions/#input-format)
  - [输出格式](/zh-hans/5.2/ref/contrib/gis/functions/#output-format)
  - [杂项](/zh-hans/5.2/ref/contrib/gis/functions/#miscellaneous)
- [测量对象](/zh-hans/5.2/ref/contrib/gis/measure/)

  - [例如](/zh-hans/5.2/ref/contrib/gis/measure/#example)
  - [支持的单位](/zh-hans/5.2/ref/contrib/gis/measure/#supported-units)
  - [测量 API](/zh-hans/5.2/ref/contrib/gis/measure/#measurement-api)
- [GEOS API](/zh-hans/5.2/ref/contrib/gis/geos/)

  - [背景](/zh-hans/5.2/ref/contrib/gis/geos/#background)
  - [教程](/zh-hans/5.2/ref/contrib/gis/geos/#tutorial)
  - [几何对象](/zh-hans/5.2/ref/contrib/gis/geos/#geometry-objects)
  - [几何集合](/zh-hans/5.2/ref/contrib/gis/geos/#geometry-collections)
  - [准备好的几何对象](/zh-hans/5.2/ref/contrib/gis/geos/#prepared-geometries)
  - [几何工厂](/zh-hans/5.2/ref/contrib/gis/geos/#geometry-factories)
  - [I/O 对象](/zh-hans/5.2/ref/contrib/gis/geos/#i-o-objects)
  - [配置](/zh-hans/5.2/ref/contrib/gis/geos/#settings)
  - [异常](/zh-hans/5.2/ref/contrib/gis/geos/#exceptions)
- [GDAL API](/zh-hans/5.2/ref/contrib/gis/gdal/)

  - [概况](/zh-hans/5.2/ref/contrib/gis/gdal/#overview)
  - [矢量数据源对象](/zh-hans/5.2/ref/contrib/gis/gdal/#vector-data-source-objects)
  - [OGR 几何对象](/zh-hans/5.2/ref/contrib/gis/gdal/#ogr-geometries)
  - [坐标系统对象](/zh-hans/5.2/ref/contrib/gis/gdal/#coordinate-system-objects)
  - [栅格数据对象](/zh-hans/5.2/ref/contrib/gis/gdal/#raster-data-objects)
  - [配置](/zh-hans/5.2/ref/contrib/gis/gdal/#settings)
  - [异常](/zh-hans/5.2/ref/contrib/gis/gdal/#exceptions)
- [用 GeoIP2 进行地理定位](/zh-hans/5.2/ref/contrib/gis/geoip2/)

  - [例如](/zh-hans/5.2/ref/contrib/gis/geoip2/#example)
  - [API 参考](/zh-hans/5.2/ref/contrib/gis/geoip2/#api-reference)
  - [方法](/zh-hans/5.2/ref/contrib/gis/geoip2/#methods)
  - [配置](/zh-hans/5.2/ref/contrib/gis/geoip2/#settings)
  - [异常](/zh-hans/5.2/ref/contrib/gis/geoip2/#exceptions)
- [GeoDjango 实用程序](/zh-hans/5.2/ref/contrib/gis/utils/)

  - [`LayerMapping` 是一个数据导入实用程序](/zh-hans/5.2/ref/contrib/gis/layermapping/)
  - [OGR 检查](/zh-hans/5.2/ref/contrib/gis/ogrinspect/)
  - [`GeoJSON` 序列化器](/zh-hans/5.2/ref/contrib/gis/serializers/)
- [GeoDjango 管理命令](/zh-hans/5.2/ref/contrib/gis/commands/)

  - [`inspectdb`](/zh-hans/5.2/ref/contrib/gis/commands/#inspectdb)
  - [`ogrinspect`](/zh-hans/5.2/ref/contrib/gis/commands/#ogrinspect)
- [GeoDjango 的管理站点](/zh-hans/5.2/ref/contrib/gis/admin/)

  - [`GISModelAdmin`](/zh-hans/5.2/ref/contrib/gis/admin/#gismodeladmin)
- [地理 Feed](/zh-hans/5.2/ref/contrib/gis/feeds/)

  - [例如](/zh-hans/5.2/ref/contrib/gis/feeds/#example)
  - [API 参考](/zh-hans/5.2/ref/contrib/gis/feeds/#api-reference)
- [地理站点地图](/zh-hans/5.2/ref/contrib/gis/sitemaps/)

  - [例如](/zh-hans/5.2/ref/contrib/gis/sitemaps/#example)
  - [参考](/zh-hans/5.2/ref/contrib/gis/sitemaps/#reference)
- [测试 GeoDjango 应用程序](/zh-hans/5.2/ref/contrib/gis/testing/)

  - [PostGIS](/zh-hans/5.2/ref/contrib/gis/testing/#postgis)
  - [GeoDjango 测试](/zh-hans/5.2/ref/contrib/gis/testing/#geodjango-tests)
- [部署 GeoDjango](/zh-hans/5.2/ref/contrib/gis/deployment/)
