Geo spatial python princeton pug

Post on 15-Apr-2017

1071 Views

Category:

Data & Analytics

7 Downloads

Preview:

Click to see full reader

Transcript

Python GeoSpatial Analysis

https://www.jasondavies.com/maps/transition/

GeoSpatial Python• GeoSpatial analysis• Key concepts

• Representations of the earth• Projections• Coordinate Systems• Geometry• Remote Sensing • GeoFunctions

• Software • Geo Foundations• Python

About me• by day

• Traveling salesman in wireless communications • Network neurologist• Mobile networking

• by night• Pythonista (middling)• Music • Photography

• Education• West Windsor Plainsboro High School• Thomas Edison State College, BSBA• Lehigh University, MBA

DonHolloway

DonHolloway

DonHolloway

Geospatial Fundamentals• Statistical analysis + place• Spatial

• Points of Interest• Geolocation• Geometry

• Analysis• Big Data• Familiar tools

• Numpy• Pandas• Pillow

• Visualization

Terrestrial scale - shape and sizeNaming of placesNeed for rigour – coordinate systems and datums2D vs 3D perspectives on geospatial issues

Representations of the Earth Map Globe Oblate Spheroid

datum• a set of reference points on the Earth's surface against which position

measurements are made• North American Datum of 1927 (NAD27)• NAD83 (adopted internationally as GRS80)• World Geodetic System 1984 (WGS84)

ProjectionsProjections convert spherical coordinates (lat-long) to planar coordinates.

Three primary types:• Azimuthal: projection onto a planar surface• Cylindrical: projection onto a cylinder, which is then ‘unrolled’ to a plane.• Conic: projection onto a cone, which can be unrolled to a plane.

All projections create distortions of shape, area, or distanceWeb Mercator (EPSG:3857) – Used by Google maps, OpenStreet Maps• Cylindrical – Uses ellipsoidal coordinate data, spherical calculations

Coordinate Systems• Geographic (Lat-Long)

• UTM (Universal Transverse Mercator) • Worldwide system with units in meters• In Northern hemisphere, Y coordinate (northing) is distance in meters from equator• X-coordinate (easting) is distance in meters east from a central meridian for a zone• Consists of 60 zones each 6 degrees wide

• State Plane Coordinate System (SPCS) • Different for each state• Some states divided into multiple zones with different grid systems for each zone• Either Transverse Mercator (NJ) or conical (PA * 2) projections

Geometry (vectors)• Vector Data

• Points, Lines, Polygons• Spatial representation

• WKT, WKB• Simple features spec

• Points of Interest• Shapefiles

• Semi Proprietary• Loosely structured• Decades of data

• GeoJSON• Emerging open standard

• Tools• GEOS / Shapely• OGR / Fiona• Geojson• PyShp• dbfpy

https://njgin.state.nj.us/NJ_NJGINExplorer/index.jsp

NJ MunicipalitiesEarthquake epicenters

Remote Sensing Imagery(Raster)• “Image-like”• Typical formats

• TIFF (tags inherent)• JPEG (exif), GIF, BMP and PNG(world files)

• Alternates• BLOB, NetCDF

• Resolution is specified in ground distance thateach cell represents• GDAL / Pillow / OpenCV

Landsat 8 – acquired 2/2/2016

Geospatial functions• Bounding Box• Convex Hull• Buffer / erode• Dissolve• Generalize• Intersection• Merge• Point in Polygon• Union

Environment:WindowsPython 3.4Anaconda package

Software• Geo Foundations• GDAL,OGR, Geos, PROJ4

• Geo General Purpose• QGIS, PostGIS, MapServer

• Analysis• Pandas, Numpy, Pillow, PostGIS, Matplotlib

• Python • geoPandas*(pandas), shapely (geos), pyproj(proj4), Fiona(OGR), geopy

(geolocation), Descartes(matplotlib),

References• Resources• Wikipedia list of GIS software - et.gy/1Q327gk• OSGeo project list – www.osgeo.org/

• Data• NJ Shape files - https://njgin.state.nj.us/NJ_NJGINExplorer/index.jsp• Raster images - http://earthexplorer.usgs.govPython libraries/

• Shapely http://toblerity.org/shapely

top related