Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #21547 -- Updated GeoDjango tutorial with PostGIS 2 output

Thanks awilliams at cironline.org for the report.
  • Loading branch information...
commit 3d4ed28dce851beab8f679190fc91366742bca68 1 parent 0179852
Claude Paroz authored January 11, 2014

Showing 1 changed file with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. 11  docs/ref/contrib/gis/tutorial.txt
11  docs/ref/contrib/gis/tutorial.txt
@@ -289,13 +289,18 @@ This command should produce the following output:
289 289
         "subregion" integer NOT NULL,
290 290
         "lon" double precision NOT NULL,
291 291
         "lat" double precision NOT NULL
  292
+        "mpoly" geometry(MULTIPOLYGON,4326) NOT NULL
292 293
     )
293 294
     ;
294  
-    SELECT AddGeometryColumn('world_worldborder', 'mpoly', 4326, 'MULTIPOLYGON', 2);
295  
-    ALTER TABLE "world_worldborder" ALTER "mpoly" SET NOT NULL;
296  
-    CREATE INDEX "world_worldborder_mpoly_id" ON "world_worldborder" USING GIST ( "mpoly" GIST_GEOMETRY_OPS );
  295
+    CREATE INDEX "world_worldborder_mpoly_id" ON "world_worldborder" USING GIST ( "mpoly" );
297 296
     COMMIT;
298 297
 
  298
+.. note::
  299
+
  300
+    With PostGIS < 2.0, the output is slightly different. The ``mpoly`` geometry
  301
+    column is added through a separate ``SELECT AddGeometryColumn(...)``
  302
+    statement.
  303
+
299 304
 If this looks correct, run :djadmin:`migrate` to create this table in the database::
300 305
 
301 306
     $ python manage.py migrate

0 notes on commit 3d4ed28

Please sign in to comment.
Something went wrong with that request. Please try again.