O'Reilly logo

Python Geospatial Development - Third Edition by Erik Westra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining the data models

We already know which database objects we are going to need to store the uploaded shapefiles:

  • The Shapefile object will represent a single uploaded shapefile
  • Each shapefile will have a number of Attribute objects, giving the name, data type, and other information about each attribute within the shapefile
  • Each shapefile will have a number of Feature objects which hold the geometry for each of the shapefile's features
  • Each feature will have a set of AttributeValue objects which hold the value for each of the feature's attributes

Let's look at each of these in more detail and think about exactly what information will need to be stored in each object.

The Shapefile object

When we import a shapefile, there are a few things we need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required