Updated GIS docs to use doc links.

This commit is contained in:
Tim Graham 2014-11-26 12:46:06 -05:00
parent 14a3b60981
commit 379431ef91
22 changed files with 28 additions and 70 deletions

View File

@ -1,5 +1,3 @@
.. _ref-gis-admin:
====================== ======================
GeoDjango's admin site GeoDjango's admin site
====================== ======================
@ -7,7 +5,6 @@ GeoDjango's admin site
.. module:: django.contrib.gis.admin .. module:: django.contrib.gis.admin
:synopsis: GeoDjango's extensions to the admin site. :synopsis: GeoDjango's extensions to the admin site.
``GeoModelAdmin`` ``GeoModelAdmin``
================= =================

View File

@ -1,5 +1,3 @@
.. ref-geodjango-admin:
============================= =============================
GeoDjango Management Commands GeoDjango Management Commands
============================= =============================

View File

@ -1,5 +1,3 @@
.. _ref-gis-db-api:
====================== ======================
GeoDjango Database API GeoDjango Database API
====================== ======================
@ -100,7 +98,7 @@ GeoDjango are only available on geometry fields.
Filters on 'normal' fields (e.g. :class:`~django.db.models.CharField`) Filters on 'normal' fields (e.g. :class:`~django.db.models.CharField`)
may be chained with those on geographic fields. Thus, geographic queries may be chained with those on geographic fields. Thus, geographic queries
take the following general form (assuming the ``Zipcode`` model used in the take the following general form (assuming the ``Zipcode`` model used in the
:ref:`ref-gis-model-api`):: :doc:`model-api`)::
>>> qs = Zipcode.objects.filter(<field>__<lookup_type>=<parameter>) >>> qs = Zipcode.objects.filter(<field>__<lookup_type>=<parameter>)
>>> qs = Zipcode.objects.exclude(...) >>> qs = Zipcode.objects.exclude(...)
@ -135,7 +133,7 @@ Distance calculations with spatial data is tricky because, unfortunately,
the Earth is not flat. Some distance queries with fields in a geographic the Earth is not flat. Some distance queries with fields in a geographic
coordinate system may have to be expressed differently because of coordinate system may have to be expressed differently because of
limitations in PostGIS. Please see the :ref:`selecting-an-srid` section limitations in PostGIS. Please see the :ref:`selecting-an-srid` section
in the :ref:`ref-gis-model-api` documentation for more details. in the :doc:`model-api` documentation for more details.
.. _distance-lookups-intro: .. _distance-lookups-intro:

View File

@ -1,5 +1,3 @@
.. _ref-gis-forms-api:
=================== ===================
GeoDjango Forms API GeoDjango Forms API
=================== ===================

View File

@ -1,5 +1,3 @@
.. _ref-gdal:
======== ========
GDAL API GDAL API
======== ========

View File

@ -1,5 +1,3 @@
.. _ref-geoip:
====================== ======================
Geolocation with GeoIP Geolocation with GeoIP
====================== ======================

View File

@ -1,5 +1,3 @@
.. _ref-geoquerysets:
========================= =========================
GeoQuerySet API Reference GeoQuerySet API Reference
========================= =========================
@ -8,7 +6,6 @@ GeoQuerySet API Reference
.. class:: GeoQuerySet([model=None]) .. class:: GeoQuerySet([model=None])
.. _spatial-lookups: .. _spatial-lookups:
Spatial Lookups Spatial Lookups
@ -730,7 +727,7 @@ the distance from the `Tasmanian`__ city of Hobart to every other
:class:`~django.contrib.gis.measure.Distance` object, you can easily express :class:`~django.contrib.gis.measure.Distance` object, you can easily express
the value in the units of your choice. For example, ``city.distance.mi`` is the value in the units of your choice. For example, ``city.distance.mi`` is
the distance value in miles and ``city.distance.km`` is the distance value the distance value in miles and ``city.distance.km`` is the distance value
in kilometers. See the :ref:`ref-measure` for usage details and the list of in kilometers. See :doc:`measure` for usage details and the list of
:ref:`supported_units`. :ref:`supported_units`.
__ https://github.com/django/django/blob/master/django/contrib/gis/tests/distapp/models.py __ https://github.com/django/django/blob/master/django/contrib/gis/tests/distapp/models.py

View File

@ -1,5 +1,3 @@
.. _ref-geos:
======== ========
GEOS API GEOS API
======== ========

View File

@ -1,5 +1,3 @@
.. _ref-contrib-gis:
========= =========
GeoDjango GeoDjango
========= =========

View File

@ -1,5 +1,3 @@
.. _geospatial_libs:
=============================== ===============================
Installing Geospatial libraries Installing Geospatial libraries
=============================== ===============================
@ -10,10 +8,10 @@ geospatial libraries:
======================== ==================================== ================================ ========================== ======================== ==================================== ================================ ==========================
Program Description Required Supported Versions Program Description Required Supported Versions
======================== ==================================== ================================ ========================== ======================== ==================================== ================================ ==========================
:ref:`GEOS <ref-geos>` Geometry Engine Open Source Yes 3.4, 3.3, 3.2 :doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.4, 3.3, 3.2
`PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.8, 4.7, 4.6, 4.5, 4.4 `PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.8, 4.7, 4.6, 4.5, 4.4
:ref:`GDAL <ref-gdal>` Geospatial Data Abstraction Library Yes (SQLite only) 1.10, 1.9, 1.8, 1.7 :doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes (SQLite only) 1.10, 1.9, 1.8, 1.7
:ref:`GeoIP <ref-geoip>` IP-based geolocation library No 1.4 :doc:`GeoIP <../geoip>` IP-based geolocation library No 1.4
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.1, 2.0, 1.5 `PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.1, 2.0, 1.5
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.1, 4.0, 3.0, 2.4 `SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.1, 4.0, 3.0, 2.4
======================== ==================================== ================================ ========================== ======================== ==================================== ================================ ==========================
@ -42,7 +40,7 @@ totally fine with GeoDjango. Your mileage may vary.
.. admonition:: Install GDAL .. admonition:: Install GDAL
While :ref:`gdalbuild` is technically not required, it is *recommended*. While :ref:`gdalbuild` is technically not required, it is *recommended*.
Important features of GeoDjango (including the :ref:`ref-layermapping`, Important features of GeoDjango (including the :doc:`../layermapping`,
geometry reprojection, and the geographic admin) depend on its geometry reprojection, and the geographic admin) depend on its
functionality. functionality.
@ -66,7 +64,7 @@ install, directly or by dependency, the required geospatial libraries:
Optional packages to consider: Optional packages to consider:
* ``libgeoip1``: for :ref:`GeoIP <ref-geoip>` support * ``libgeoip1``: for :doc:`GeoIP <../geoip>` support
* ``gdal-bin``: for GDAL command line programs like ``ogr2ogr`` * ``gdal-bin``: for GDAL command line programs like ``ogr2ogr``
* ``python-gdal`` for GDAL's own Python bindings -- includes interfaces for raster manipulation * ``python-gdal`` for GDAL's own Python bindings -- includes interfaces for raster manipulation
@ -195,7 +193,7 @@ GDAL
`GDAL`__ is an excellent open source geospatial library that has support for `GDAL`__ is an excellent open source geospatial library that has support for
reading most vector and raster spatial data formats. Currently, GeoDjango only reading most vector and raster spatial data formats. Currently, GeoDjango only
supports :ref:`GDAL's vector data <ref-gdal>` capabilities [#]_. supports :doc:`GDAL's vector data <../gdal>` capabilities [#]_.
:ref:`geosbuild` and :ref:`proj4` should be installed prior to building GDAL. :ref:`geosbuild` and :ref:`proj4` should be installed prior to building GDAL.
First download the latest GDAL release version and untar the archive:: First download the latest GDAL release version and untar the archive::

View File

@ -1,5 +1,3 @@
.. _ref-gis-install:
====================== ======================
GeoDjango Installation GeoDjango Installation
====================== ======================
@ -12,7 +10,7 @@ In general, GeoDjango installation requires:
1. :ref:`Python and Django <django>` 1. :ref:`Python and Django <django>`
2. :ref:`spatial_database` 2. :ref:`spatial_database`
3. :ref:`geospatial_libs` 3. :doc:`geolibs`
Details for each of the requirements and installation instructions Details for each of the requirements and installation instructions
are provided in the sections below. In addition, platform-specific are provided in the sections below. In addition, platform-specific
@ -41,7 +39,6 @@ Because GeoDjango is included with Django, please refer to Django's
:ref:`installation instructions <installing-official-release>` for details on :ref:`installation instructions <installing-official-release>` for details on
how to install. how to install.
.. _spatial_database: .. _spatial_database:
Spatial database Spatial database

View File

@ -1,5 +1,3 @@
.. _postgis:
================== ==================
Installing PostGIS Installing PostGIS
================== ==================

View File

@ -1,5 +1,3 @@
.. _spatialite:
===================== =====================
Installing Spatialite Installing Spatialite
===================== =====================
@ -24,8 +22,8 @@ __ http://www.gaia-gis.it/gaia-sins/
Installing from source Installing from source
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
:ref:`GEOS and PROJ.4<geospatial_libs>` should be installed prior to building :doc:`GEOS and PROJ.4</ref/contrib/gis/install/geolibs>` should be installed
SpatiaLite. prior to building SpatiaLite.
SQLite SQLite
^^^^^^ ^^^^^^

View File

@ -1,5 +1,3 @@
.. _ref-layermapping:
==================================== ====================================
``LayerMapping`` data import utility ``LayerMapping`` data import utility
==================================== ====================================

View File

@ -1,5 +1,3 @@
.. _ref-measure:
=================== ===================
Measurement Objects Measurement Objects
=================== ===================

View File

@ -1,5 +1,3 @@
.. _ref-gis-model-api:
=================== ===================
GeoDjango Model API GeoDjango Model API
=================== ===================

View File

@ -1,5 +1,3 @@
.. _ref-ogrinspect:
============== ==============
OGR Inspection OGR Inspection
============== ==============

View File

@ -1,5 +1,3 @@
.. _ref-geojson-serializer:
================== ==================
GeoJSON Serializer GeoJSON Serializer
================== ==================

View File

@ -23,7 +23,7 @@ familiarize yourself with Django first.
.. note:: .. note::
GeoDjango has additional requirements beyond what Django requires -- GeoDjango has additional requirements beyond what Django requires --
please consult the :ref:`installation documentation <ref-gis-install>` please consult the :doc:`installation documentation <install/index>`
for more details. for more details.
This tutorial will guide you through the creation of a geographic web This tutorial will guide you through the creation of a geographic web
@ -326,9 +326,9 @@ database:
Importing Spatial Data Importing Spatial Data
====================== ======================
This section will show you how to import the world borders This section will show you how to import the world borders shapefile into the
shapefile into the database via GeoDjango models using the database via GeoDjango models using the :doc:`layermapping`.
:ref:`ref-layermapping`.
There are many different ways to import data into a spatial database -- There are many different ways to import data into a spatial database --
besides the tools included within GeoDjango, you may also use the following: besides the tools included within GeoDjango, you may also use the following:
@ -530,7 +530,7 @@ Next, import the ``load`` module, call the ``run`` routine, and watch
Try ``ogrinspect`` Try ``ogrinspect``
------------------ ------------------
Now that you've seen how to define geographic models and import data with the Now that you've seen how to define geographic models and import data with the
:ref:`ref-layermapping`, it's possible to further automate this process with :doc:`layermapping`, it's possible to further automate this process with
use of the :djadmin:`ogrinspect` management command. The :djadmin:`ogrinspect` use of the :djadmin:`ogrinspect` management command. The :djadmin:`ogrinspect`
command introspects a GDAL-supported vector data source (e.g., a shapefile) command introspects a GDAL-supported vector data source (e.g., a shapefile)
and generates a model definition and ``LayerMapping`` dictionary automatically. and generates a model definition and ``LayerMapping`` dictionary automatically.
@ -631,7 +631,7 @@ a ``contains`` lookup using the ``pnt_wkt`` as the parameter::
Here, you retrieved a ``GeoQuerySet`` with only one model: the border of Here, you retrieved a ``GeoQuerySet`` with only one model: the border of
the United States (exactly what you would expect). the United States (exactly what you would expect).
Similarly, you may also use a :ref:`GEOS geometry object <ref-geos>`. Similarly, you may also use a :doc:`GEOS geometry object <geos>`.
Here, you can combine the ``intersects`` spatial lookup with the ``get`` Here, you can combine the ``intersects`` spatial lookup with the ``get``
method to retrieve only the ``WorldBorder`` instance for San Marino instead method to retrieve only the ``WorldBorder`` instance for San Marino instead
of a queryset:: of a queryset::
@ -643,7 +643,7 @@ of a queryset::
<WorldBorder: San Marino> <WorldBorder: San Marino>
The ``contains`` and ``intersects`` lookups are just a subset of the The ``contains`` and ``intersects`` lookups are just a subset of the
available queries -- the :ref:`ref-gis-db-api` documentation has more. available queries -- the :doc:`db-api` documentation has more.
Automatic Spatial Transformations Automatic Spatial Transformations
--------------------------------- ---------------------------------
@ -787,7 +787,7 @@ available with the :class:`~django.contrib.gis.admin.GeoModelAdmin`
First, there are some important requirements: First, there are some important requirements:
* :class:`~django.contrib.gis.admin.OSMGeoAdmin` requires that * :class:`~django.contrib.gis.admin.OSMGeoAdmin` requires that
:ref:`GDAL <ref-gdal>` is installed. If you are running GDAL 1.6 (uncommon) :doc:`GDAL <gdal>` is installed. If you are running GDAL 1.6 (uncommon)
you will also need to add the :ref:`spherical mercator projection you will also need to add the :ref:`spherical mercator projection
<addgoogleprojection>` to the ``spatial_ref_sys`` table. <addgoogleprojection>` to the ``spatial_ref_sys`` table.

View File

@ -1,5 +1,3 @@
.. _ref-gis-utils:
=================== ===================
GeoDjango Utilities GeoDjango Utilities
=================== ===================

View File

@ -370,13 +370,12 @@ methods are new in 1.2:
* :meth:`~django.contrib.gis.db.models.GeoQuerySet.reverse_geom` * :meth:`~django.contrib.gis.db.models.GeoQuerySet.reverse_geom`
* :meth:`~django.contrib.gis.db.models.GeoQuerySet.geohash` * :meth:`~django.contrib.gis.db.models.GeoQuerySet.geohash`
The :ref:`GEOS interface <ref-geos>` was updated to use The GEOS interface was updated to use thread-safe C library functions when
thread-safe C library functions when available on the platform. available on the platform.
The :ref:`GDAL interface <ref-gdal>` now allows the user to The GDAL interface now allows the user to set a
set a :attr:`~django.contrib.gis.gdal.Layer.spatial_filter` on :attr:`~django.contrib.gis.gdal.Layer.spatial_filter` on the features returned
the features returned when iterating over a when iterating over a :class:`~django.contrib.gis.gdal.Layer`.
:class:`~django.contrib.gis.gdal.Layer`.
Finally, :doc:`GeoDjango's documentation </ref/contrib/gis/index>` is now Finally, :doc:`GeoDjango's documentation </ref/contrib/gis/index>` is now
included with Django's and is no longer included with Django's and is no longer

View File

@ -131,9 +131,9 @@ binary data in the database.
GeoDjango form widgets GeoDjango form widgets
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
GeoDjango now provides :ref:`form fields and widgets <ref-gis-forms-api>` for GeoDjango now provides :doc:`form fields and widgets </ref/contrib/gis/forms-api>`
its geo-specialized fields. They are OpenLayers-based by default, but they can for its geo-specialized fields. They are OpenLayers-based by default, but they
be customized to use any other JS framework. can be customized to use any other JS framework.
``check`` management command added for verifying compatibility ``check`` management command added for verifying compatibility
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~