Skip to content

Fixed #19243 -- Edit GeoDjango Tutorial for consistency and style. #531

Closed
wants to merge 2 commits into from

3 participants

@shepdl
shepdl commented Nov 18, 2012

Rewrote parts of GeoDjango tutorial.

@claudep claudep commented on an outdated diff Nov 19, 2012
docs/ref/contrib/gis/tutorial.txt
@@ -613,8 +599,8 @@ Now, define a point of interest [#]_::
>>> pnt_wkt = 'POINT(-95.3385 29.7245)'
The ``pnt_wkt`` string represents the point at -95.3385 degrees longitude,
-and 29.7245 degrees latitude. The geometry is in a format known as
-Well Known Text (WKT), an open standard issued by the Open Geospatial
+29.7245 degrees latitude. The geometry is in a format known as
+Well Known Text (WKT), an standard issued by the Open Geospatial
@claudep
Django member
claudep added a note Nov 19, 2012

an -> a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham timgraham commented on an outdated diff Nov 19, 2012
docs/ref/contrib/gis/tutorial.txt
@@ -223,8 +218,8 @@ Geographic Models
Defining a Geographic Model
---------------------------
-Now that we've examined our world borders data set using ``ogrinfo``, we can
-create a GeoDjango model to represent this data::
+Now that you've examined your data set using ``ogrinfo``, create a GeoDjango
@timgraham
Django member
timgraham added a note Nov 19, 2012

I'd suggest doing a find/replace on "data set" -> dataset. the docs are consistent between the two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham timgraham commented on an outdated diff Nov 19, 2012
docs/ref/contrib/gis/tutorial.txt
specificity with regards to geometry types. This shapefile, like
- many others, actually includes ``MultiPolygon`` geometries in its
- features. You need to watch out for this when creating your models
- as a GeoDjango ``PolygonField`` will not accept a ``MultiPolygon``
- type geometry -- thus a ``MultiPolygonField`` is used in our model's
- definition instead.
+ many others, actually includes ``MultiPolygon`` geometries, not Polygons.
+ It's important to use a more general field type in models: a
+ GeoDjango ``MultiPolygonField`` will accept a ``Polygon`` geometry, but a
+ ``PolygonField`` will not accept a ``MultiPolygon`` type geometry. This
+ is why the WorldBorder model defined above uses a ``MultiPolygonField``.
@timgraham
Django member
timgraham added a note Nov 19, 2012

WorldBorder model -> WorldBorder model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham timgraham commented on an outdated diff Nov 19, 2012
docs/ref/contrib/gis/tutorial.txt
@@ -406,9 +392,9 @@ system associated with it -- if it does, the ``srs`` attribute will return a
>>> srs.proj4 # PROJ.4 representation
'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '
-Here we've noticed that the shapefile is in the popular WGS84 spatial reference
-system -- in other words, the data uses units of degrees longitude and
-latitude.
+This shapefile is in the popular WGS84 spatial reference
+system -- in other words, the data uses longitude, latitude pairs and
@timgraham
Django member
timgraham added a note Nov 19, 2012

longitude, latitude pairs "in" units of degrees?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham timgraham commented on an outdated diff Nov 19, 2012
docs/ref/contrib/gis/tutorial.txt
@@ -459,8 +444,9 @@ exported to WKT and GeoJSON::
``LayerMapping``
----------------
-We're going to dive right in -- create a file called ``load.py`` inside the
-``world`` application, and insert the following::
+To import the data at last, use a LayerMapping in a Python script.
@timgraham
Django member
timgraham added a note Nov 19, 2012

remove "at last"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham timgraham commented on the diff Nov 19, 2012
docs/ref/contrib/gis/tutorial.txt
@@ -684,8 +672,8 @@ __ http://spatialreference.org/ref/epsg/32140/
Lazy Geometries
---------------
-Geometries come to GeoDjango in a standardized textual representation. Upon
-access of the geometry field, GeoDjango creates a `GEOS geometry object
+GeoDjango loads geometries in a standardized textual representation. When the
@timgraham
Django member
timgraham added a note Nov 19, 2012

extra "the" (also in next line)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@timgraham
Django member

I've merged this, thanks!

@timgraham timgraham closed this Nov 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.