diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-25 14:37:00 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-25 14:39:52 +0200 |
| commit | 62e1c5a441d957e44d7527a6d901587b40203a51 (patch) | |
| tree | 435aa0f3ec1ec4d9de77730f3beee977c14d5d05 /docs/ref/contrib/gis/tutorial.txt | |
| parent | e6e01f619dbc56aafaa57811ab4de32140ef33e2 (diff) | |
Fixed #17448 -- Improved test and documented raw-sql gis query
Diffstat (limited to 'docs/ref/contrib/gis/tutorial.txt')
| -rw-r--r-- | docs/ref/contrib/gis/tutorial.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index 3a63493137..15863aee7b 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -671,6 +671,17 @@ of abstraction:: __ http://spatialreference.org/ref/epsg/32140/ +.. admonition:: Raw queries + + When using :doc:`raw queries </topics/db/sql>`, you should generally wrap + your geometry fields with the ``asText()`` SQL function so as the field + value will be recognized by GEOS:: + + City.objects.raw('SELECT id, name, asText(point) from myapp_city') + + This is not absolutely required by PostGIS, but generally you should only + use raw queries when you know exactly what you are doing. + Lazy Geometries --------------- Geometries come to GeoDjango in a standardized textual representation. Upon |
