Database Reference
In-Depth Information
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]]
FIPS: String (2.0)
ISO2: String (2.0)
ISO3: String (3.0)
UN: Integer (3.0)
NAME: String (50.0)
AREA: Integer (7.0)
POP2005: Integer (10.0)
REGION: Integer (3.0)
SUBREGION: Integer (3.0)
LON: Real (8.3)
LAT: Real (7.3)
19. Add a load_countries.py file under chp09/wildlife/sightings ,
and import the shapefile to PostGIS using the LayerMapping GeoDjango
utility with the following code:
"""
Script to load the data for the country
model from a shapefile.
"""
from django.contrib.gis.utils import
mapping, LayerMapping
from models import Country
country_mapping = {
'isocode' : 'ISO2',
'name' : 'NAME',
'geometry' : 'MULTIPOLYGON',
}
Search WWH ::




Custom Search