02-vector-data
02-vector-data
Johnny Ryan
[email protected]
Office hours: Monday 15:00-17:00
Some good questions…
• How do we format the Canvas pdf submissions?
• Right-click à Print... à Destination = Save as PDF
• Anything else?
Overview
• Review basic characteristics of vector data
• Object types and extent
• Coordinate systems
• Attributes
• Formats
• Extent
• Other attributes
Object type and extent
Single entity:
• Point
• Line (formally known as a LineString)
• Polygon
These files need to have the same name and to be stored in the same directory (folder) to open with Python.
Formats: Shapefile
• A digital vector storage format for storing geographic location and associated attribute information
developed by ESRI
These files need to have the same name and to be stored in the same directory (folder) to open with Python.
• .prj: contains information on projection format including the coordinate system and projection
information
• .sbn and .sbx: the files that are a spatial index of the features
• .xml: contains the metadata associated with the shapefile
• .cpg: optional plain text files that describes the encoding applied to create the Shapefile.
Relationships
• The vector data spatial model is accompanied by a group of natural language relationships
between geometric objects – contains, intersects, overlaps, touches, etc. –
• These are termed binary predicates (e.g. covers, crosses, touches, within, intersects)
• Builds on several other libraries including shapely for geometric operations, fiona for file access and
matplotlib for plotting.
• Extends pandas to allow spatial operations on geometric types.
• Builds on several other libraries including shapely for geometric operations, fiona for file access and
matplotlib for plotting.
Follow along!
• Go to the course Dropbox link à Lecture2 à Download the us_mainland_states shapefile