Welcome to
Maptime Pittsburgh

Wifi: "DQE-Carnegie Museums Wifi"

View this presentation

Sign up for Open Street Map

What is Maptime?


The Basics of Geodata, Geodesy, and Geocoding within the context of Open Street Map
Go to maptime.io / pittsburgh / presentations / geo101
to follow along.
If following along, use left and right arrows to navigate.
Links are highlighted
PLEASE interrupt if you have questions!
What is Open Street Map?
Open Street Map (OSM)is the "Wikipedia of maps"
OSM is an editable database with global coverage
OSM is licensed under the Open Database License: ODbL
Anyone can edit OSM
So, let's sign up now!
While everyone is doing that...here are some resources for later:
To learn how to add any kind of thing to the map:

wiki.osm.org / wiki / Map_Features
Am I doing it the right way?

Read about wiki.osm.org / wiki / Good_practice
Let's get started!
Two ways to view/edit OSM:
Today we'll use iD
Go to OSM and, assuming you've signed in, click edit in top left corner
Are you able to scroll around and zoom in (i.e., is our wifi fast enough here)?

If so, find the Carnegie Museum in Oakland
What are we looking at here?
Geographic data, or Geodata, represents things that have a location.
This can include defined physical or abstract features like
It can also include temporal or ephemeral events, like
There are numerous types of geodata.
Let's talk about the data types you can see right in front of you, in OSM.
Geodata typically is stored and managed in one of two formats:
Raster data stores its geographic information in pixels
Pixels can represent color, height, slope, direction...and many other classifications or gradients.
Raster data is commonly encountered in:
Rasters can be derived from other rasters.

e.g., a digital elevation model can be analyzed to create...
Raster analysis is very powerful. The format is conducive to complex spatial analyses and modeling:
In OSM, raster data is provided in the form of satellite imagery.
Try changing the sources and transparencies.
Layers provide sources for validation.
Vector data stores geometry, attribute, and location information
No matter how much you 'zoom in', you won't see pixels.
Vector data is dynamically rendered.
Zoom out to see all of Allegheny County on OSM.
Market Square!
Vector comes (primarily) in three geometric flavors:
The OSM translation:
Editing tools are at the top!
The editing tooltips suggest certain kinds of things are best represented by certain vector types.
Select the Map Data button and then Map Features drop-down
Turn some layers on and off!
Select a feature on the map.

Look at its attributes!
Attributes are an important component of vector data.
Each individual vector feature is like a row in a table. Each table column is an attribute.
unique feature id  name operator address website
0001  Carnegie Museum of Natural History Carnegie Institute Unknown carnegiemnh.org
0002  another building another operator another address anotherlink.com
A vector dataset usually stores lots of individual features.
You'll notice that if you have selected a building or street, you'll see on the map the feature is shown as series of of connected points and lines.
Geometry and geographic referencing!
Remember our Market Square buildings?
These numbers tell us where the vectors are located on the globe...more or less!
This brings us to Part 2:


(or, the part where we talk about coordinate systems and projections)
Where do these numbers come from? How do we place geodata on the globe?
Let's back up.
Locations are identified using latitude / longitude (lat/lon) decimal degrees.
LATITUDE north-south horizontal lines, different circumferences -90 to +90 decimal degrees
LONGITUDE east-west vertical lines, same circumferences 0 to 180 decimal degrees
You've probably seen depictions of the globe as a map, both with a lat/lon grid.
So...lumpy, sphere-like 3-D object becomes smooth, planar, 2-D object...?
How do we go from this
to this?
Short answer:

Map Projections

mathematical equations for stretching and warping the lat/long grid to fit the globe to a planar map.
Two Point Equidistant
Equidistant Cylindrical
The science behind this is worth another session entirely.
Suffice to say, there is no way to project the globe onto a map without distorting it.
Distortion is typically worst at the edges of the map, affecting relative scale.
OSM and other web maps use a common projection:

Web Mercator

EPSG (European Petroleum Survey Group) code: 3857
Web Mercator is pretty good, for most of the world. East-West distance is constant. North-south distance is distorted close to the poles.

See the distortion for yourself on OSM (just zoom out!).
This distortion at the map edge is why map projections are typically specific to a certain geographic extent.

Pennsylvania State Plane (South)

EPSG: 2272
Looks (and functions) well here!
These buildings use EPSG 2272.

But the coordinates shown aren't decimal degrees!
A map projection often also has a built-in conversion to a local unit of distance.
Decimal degrees are not useful for communicating: distances between things, the width of a building facade, or calculating the area of a parcel, etc.
Data in the local PA State Plane projection is stored using feet.
If you have some geodata from a local source (say the Allegheny County GIS data available on PASDA) that you want to put on a web map, or use to contribute to OSM...

Re-project the data first.

(to Web Mercator or whichever system the web map is using).
Use desktop software like QGIS - it's a simple "save as"!
Unless of course, you are starting without geodata.

Which you may very well not have yet.
This brings us to Part 3:


So, maybe you don't have any geodata yet. But you have some addresses, or maybe some street intersections.
Geocoding is the process of associating an address, which is only a bit of text, with geodata that references an associated address(es).
Geocoding can be done using a number of different tools.


OSM Nominatim- one at a time
MapQuest Geocoding API - uses the OSM geocoder!
Google Geocoding API - geocode from a table (nice!)


QGIS Geocoding plug-ins - super powerful, free, uses OSM
The APIs and QGIS plugins allow you to geocode a lot of data at once.
For geocoding to work quickly and accurately, the reference data must have accurate geometry, an accurate location, and accurate address attributes.
Addressing around Pittsburgh and in Allegheny County is fairly convoluted, for a lot of reasons.
If you want to your data to be gecoded (or reverse-geocoded) properly, you must choose a reliable data source.
The benefit of using an OSM-based geocoding tool is that if you find a discrepancy in geocoding results, it is within your power to fix the base data!

Not as easy with Google.
What else can I do with OSM? Suggestions:
Trace some buildings
Add some POIs (points of interest)
Play MapRoulette
Do some HOT tasks (Humanitarian OSM Team)
Get outside!
Export some data for use in desktop software
What not to do:
When contributing, don't copy from Google!
I've got some data, can I load it into OSM?
That's complicated. Read more here: wiki.osm.org / wiki / Import / Guidelines
What did we learn today?
OSM is an open-source, global, and editable geodata source that anyone can use and improve.
Geodata are the elements that make up a map.
Raster data (pixels) and Vector data (points, lines, polygons) are the basic geodata types.
The world is a lumpy 3-D ball, maps are flat 2-D objects, and map projections take care of the hard work of converting from one to the other.
Web Mercator (EPSG 3857) is the standard map projection for data used in a web map (lat/lon)
Local data is often published in the PA State Plane South (EPSG 2272) projection (feet).
Geocoding is the process of converting addresses to geodata.
There many tools out there for Geocoding.
OSM-based tools allow you some control over the quality of the geocoding.


Christian Gass | @GassChristianB

Matt Mercurio | @Geologistatlarg

With special guests

Patrick Hammons | @hamhandedly of Code for America and formerly of Maptime Philadelphia
and Bob Gradeck of Open Pittsburgh
Thanks to Maptime HQ for providing some great basic presentation material (from which much of this has been drawn)
Some additional references:
mapschool.io maptime.io/geodata lyzidiamond.com/geodesy
Presentation made with big