diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-01-11 17:58:29 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-01-11 17:58:29 +0100 |
| commit | 3d4ed28dce851beab8f679190fc91366742bca68 (patch) | |
| tree | c7137a6832f9e495fe747d07db7e0f693f07aa57 /docs/ref/contrib/gis/tutorial.txt | |
| parent | 0179852d7faf461d55cf3ae69393abb3f3cd2910 (diff) | |
Fixed #21547 -- Updated GeoDjango tutorial with PostGIS 2 output
Thanks awilliams at cironline.org for the report.
Diffstat (limited to 'docs/ref/contrib/gis/tutorial.txt')
| -rw-r--r-- | docs/ref/contrib/gis/tutorial.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt index 183b2b9875..4081a11157 100644 --- a/docs/ref/contrib/gis/tutorial.txt +++ b/docs/ref/contrib/gis/tutorial.txt @@ -289,13 +289,18 @@ This command should produce the following output: "subregion" integer NOT NULL, "lon" double precision NOT NULL, "lat" double precision NOT NULL + "mpoly" geometry(MULTIPOLYGON,4326) NOT NULL ) ; - SELECT AddGeometryColumn('world_worldborder', 'mpoly', 4326, 'MULTIPOLYGON', 2); - ALTER TABLE "world_worldborder" ALTER "mpoly" SET NOT NULL; - CREATE INDEX "world_worldborder_mpoly_id" ON "world_worldborder" USING GIST ( "mpoly" GIST_GEOMETRY_OPS ); + CREATE INDEX "world_worldborder_mpoly_id" ON "world_worldborder" USING GIST ( "mpoly" ); COMMIT; +.. note:: + + With PostGIS < 2.0, the output is slightly different. The ``mpoly`` geometry + column is added through a separate ``SELECT AddGeometryColumn(...)`` + statement. + If this looks correct, run :djadmin:`migrate` to create this table in the database:: $ python manage.py migrate |
