Ticket #13267: gis_tutorial_update.diff
File gis_tutorial_update.diff, 1.2 KB (added by , 15 years ago) |
---|
-
docs/ref/contrib/gis/tutorial.txt
342 342 Now, the world borders shapefile may be opened using GeoDjango's 343 343 :class:`~django.contrib.gis.gdal.DataSource` interface:: 344 344 345 >>> from django.contrib.gis.gdal import *345 >>> from django.contrib.gis.gdal.datasource import DataSource 346 346 >>> ds = DataSource(world_shp) 347 347 >>> print ds 348 348 / ... /geodjango/world/data/TM_WORLD_BORDERS-0.3.shp (ESRI Shapefile) … … 459 459 'subregion' : 'SUBREGION', 460 460 'lon' : 'LON', 461 461 'lat' : 'LAT', 462 ' mpoly' : 'MULTIPOLYGON',462 'geom' : 'MULTIPOLYGON', 463 463 } 464 464 465 465 world_shp = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data/TM_WORLD_BORDERS-0.3.shp')) … … 468 468 lm = LayerMapping(WorldBorders, world_shp, world_mapping, 469 469 transform=False, encoding='iso-8859-1') 470 470 471 lm.save(strict=True, verbose= verbose)471 lm.save(strict=True, verbose=True) 472 472 473 473 A few notes about what's going on: 474 474