0% found this document useful (0 votes)
15 views

02-vector-data

The lecture covers the basics of vector geospatial data, including object types, coordinate systems, and formats such as Well-Known Text, GeoJSON, and Shapefile. It introduces the GeoPandas package for spatial operations and discusses vector data relationships and operations like spatial joins. The lab focuses on exploring wildfire data and Census Bureau data using GeoPandas.

Uploaded by

Richa Shree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

02-vector-data

The lecture covers the basics of vector geospatial data, including object types, coordinate systems, and formats such as Well-Known Text, GeoJSON, and Shapefile. It introduces the GeoPandas package for spatial operations and discusses vector data relationships and operations like spatial joins. The lab focuses on exploring wildfire data and Census Bureau data using GeoPandas.

Uploaded by

Richa Shree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Geospatial Data Science Applications: GEOG 4/590

Lecture 2: 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

• Do we make a new notebook for our submission?


• Yes

• Anything else?
Overview
• Review basic characteristics of vector data
• Object types and extent
• Coordinate systems
• Attributes
• Formats

• Review common types of vector operations

• Introduce GeoPandas package

• This week’s lab


Vector Geospatial Data
• “Vector” is a term commonly used in Geographical Information
Systems (GIS) to refer to discrete geometric entities

• Vector data has several attributes:

• Object type (e.g. point, line or polygon)

• Extent

• Coordinate reference system

• Other attributes
Object type and extent
Single entity:
• Point
• Line (formally known as a LineString)
• Polygon

Homogeneous entity collections:


• Multi-Point
• Multi-Line (MultiLineString)
• Multi-Polygon

Spatial extent of the vector data is represented by


discrete geometric locations (x, y values)
Coordinate reference system (CRS)
• CRS information connects data to the Earth’s surface using a mathematical model

• A data structure cannot be considered geospatial unless it is accompanied by CRS information


Other attributes
• Vector attributes are like columns in a
spreadsheet.

• For example, a line object that contains the


locations of streams, might contain the
name of each stream.
Formats: Well-Known Text (WKT)
• A text markup language for representing vector geometry objects
Formats: GeoJSON
• An open standard format designed for representing simple geographical features
and their non-spatial attributes.
Formats: Shapefile
• A digital vector storage format for storing geographic location and associated attribute information
developed by ESRI

Three mandatory files:

• .shp: contains the geometry for all features


• .shx: indexes the geometry
• .dbf: is a standard database file used to store attribute data and object IDs.

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

Three mandatory files:

• .shp: contains the geometry for all features


• .shx: indexes the geometry
• .dbf: is a standard database file used to store attribute data and object IDs.

These files need to have the same name and to be stored in the same directory (folder) to open with Python.

Sometimes, a shapefile will have other associated files including:

• .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)

• Returns either True or False


Operations
• As well as boolean attributes and methods, we can use spatial analysis methods to combine two or
more vector datasets based on the spatial relationship between their geometries.
Spatial joins
• Many uses in geospatial analysis (e.g. points within polygon)
• 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.
• 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

• Open up Spyder or a Jupyter Notebook

• Run the code in the next few slides


Reading geospatial data
Measuring area
Compute polygon boundary and centroid
Compute distances
Find projection
Convert projection
Write data to file
Lab #2

• Explore a large wildfire dataset using


GeoPandas.

• Introduce Census Bureau data data variables


and geographic units using cenpy.
Lab #2: Wildfire dataset
• Spatial database of wildfires that occurred in
the Oregon from 1992 to 2018.

• Records of 67,402 fires


Lab #2: Census data
• We will use data from the American Community Survey
(ACS) product

• Provides social and economic information every year but,


unlike the Decenniel Survey, only represents a sample
(about 3.5 million) of US households.

You might also like