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 ...
Get Python Geospatial Development - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.