Spatial Data 101

Points, Lines, Polygons & Pixels

where is your data? gis.stanford.edu

Open a LIVE version of these slides at:

slides.com/staceymaples/spatial101/live

about me

gis.stanford.edu

All things are related. Near things are more related than distant things.

-Waldo Tobler's 1st Law of Geography

Everything is somewhere and that somewhere matters.

-Stace's 1st Law of Geography

Spatial Data is Everywhere

Modeling the World

Data Models

Everything is somewhere, but how do we say where?

Coordinate Systems

Geographic Coordinates

Projections

Think of them as translations from 3d to 2d

Credit: @chris_whong

Demo / Hands-on (if you like)

Vector Data

Vector Formats

Shapefiles*

*(a shapefile isn't really a file)

  • *.shp
  • *.shx
  • *.dbf
  • *.prj
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "Label": "\"Null Island\""
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          0,
          0
        ]
      }
    },

Relational Databases

https://carto.com/   https://postgis.net/

SELECT * FROM clowns
WHERE clown_name LIKE '%BUB%'

Tabular

OBJECTID Num_Cases Address xcoord ycoord
1 1 29 Kingly Street -0.140033817 51.51326827
2 3 27 Heddon Street -0.139874596 51.51122647
3 1 31 Heddon Street -0.13991682 51.51127459
4 2 18 Fouberts Place -0.139587437 51.51353757
5 1 18 Kingly Street -0.139681937 51.51299401
6 2 18 Fouberts Place -0.139587437 51.51353757
7 1 1 Ramillies Place -0.139478997 51.51500072
Extension File Type
Geography Markup Language (GML) .GML
Google Keyhole Markup Language (KML/KMZ) .KML .KMZ
GPS eXchange Format (GPX) .GPX
IDRISI Vector .VCT .VDC
MapInfo TAB .TAB .DAT .ID .MAP .IND
OpenStreetMap OSM XML .OSM
Digital Line Graph (DLG) .DLG
Geographic Base File-Dual Independent Mask Encoding (GBF-DIME)
ArcInfo Coverage

Other Formats...

Raster Data

Raster Data is Pixels

Pixels are numeric values

Hands-on with QGIS

But imagery is special, so let's talk a little more about THAT...

Spatial Imagery

a tiny introduction to

remote sensing

Digital images are made of pixels, and pixels are representations of numeric values

Electromagnetic energy is everywhere and everything reflects or absorbs it, differently

(and measurably). 

Finally, cadence...

How often does a satellite revisit locations?

  • Landsat - 16 days
  • Sentinel 2 - 10 days at the equator, 2-3 at mid-latitudes
  • Planet.com - Daily
  • Digital Globe - varies, tasked

Often it turns out to be more efficient to move the questions than to move the data.

 

- Jim Gray

Raster Formats

GeoTIFF

(a TIFF with Geo)

The GeoTIFF file format was developed as a distribution format for satellite or aerial imagery as well as other data such as Digital Elevation Model (DEM) data, and Digital Ortho Quadrangle data.

COG

(Cloud-optimized GeoTIFF)

A Cloud Optimized GeoTIFF (COG) is a regular GeoTIFF file, hosted on a HTTP file server, with an internal organization that enables  clients issuing ​HTTP GET range requests to ask for just the parts of a file they need.

Esri GRID

(proprietary format)

A proprietary binary format, developed and supported by Esri, QGIS and GDAL

Now go to:

Login and wait for the workshop repo to load. You should then see this item in your GEE Scripts Panel

Web Maps

The "special" case of Web Mercator

Credit: @chris_whong

Vector Tiles are a little different

Thinking "Spatially"

Spatial Relationships

  • Adjacency
  • Containment
  • Intersection
  • Proximity

Cartographic Modeling

  • Local
  • Neighborhood
  • Zonal
  • Global

Simulation

  • Hillshade
  • Viewshed
  • Hydrology
  • Movement/Least-cost paths
  • Agent-based models

APIs / SDKs / Libraries

GDAL/OGR

Geospatial Data Abstraction Library

(it basically runs everything)

Basemap & Vector Tile Services

Geocoding

Turning text-based locations (addresses, placenames, localities, ...) into latitude & longitude coordinates.

(reverse geocoding searching nearby places or features with a lat/long)

Routing

  • Directions
  • Isochrones
  • Distance Matrices
  • Route Optimization

Routing Services

Roll your own Routing Services

Machine Learning

Data Sources

Data Collection/Creation

3D / LIDAR / Elevation

3D / Lidar 

Digitization

Spatial Data Carpentry

  • Classification & Segmentation
  • Placement (geocoding)
  • Conversion (Point>Line>Polygon>Pixels)
  • Aggregation
  • Transfer (spatial join)
  • ArcGIS Desktop & ArcGIS Pro (W)
  • QGIS Desktop (Mac, W, Linux, Android)
  • GDAL (Mac, W, Linux)

Cloud GIS

  • ArcGIS.com
  • Carto.com
  • Mapbox.com
  • Google Earth Engine
  • CloudGIS

Getting Help

Points, Lines, Polygons & Pixels: Spatial Data 101

By Stace Maples

Points, Lines, Polygons & Pixels: Spatial Data 101

Slide deck for Basic Introduction to Spatial Data Models, Formats and Carpentry.

  • 802