What is Maptime?
- A time for learning about maps
- Hands-on
- Beginner-focused
- Emphasis on open source, programming, and web-mapping
Tonight:
The Basics of Geodata, Geodesy, and Geocoding within the context of Open Street Map
If following along, use left and right arrows to navigate.
PLEASE interrupt if you have questions!
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:
Let's get started!
Two ways to view/edit OSM:
- web (basic): iD
- desktop (advanced): JOSM
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?
Geodata
Geographic data, or Geodata, represents things that have a location.
This can include
defined physical or abstract features like
- roads
- buildings
- census boundaries
BUILDINGS
It can also include
temporal or ephemeral events, like
- 911 calls
- cloud cover
- trending, geo-located tweets
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
Raster data stores its geographic information in pixels
PIXELS
Pixels can represent color, height, slope, direction...and many other classifications or gradients.
CONTINENTS
Raster data is commonly encountered in:
- satellite imagery
- weather data
- digital elevation model
Elevation
Rasters can be derived from other rasters.
e.g., a digital elevation model can be analyzed to create...
Slope
"Hillshade"
Raster analysis is
very powerful. The format is conducive to complex spatial analyses and modeling:
- kernel density (a.k.a."heat-mapping")
- overlay (e.g., site suitability)
- flow (e.g., surficial hydrology)
In OSM, raster data is provided in the form of satellite imagery.
Try changing the sources and transparencies.
Layers provide sources for
validation.
Vector
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.
BUILDINGS
Market Square!
Vector comes (primarily) in three geometric flavors:
The
OSM translation:
- point = point
- line = line or "way"
- polygon = "area"
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?
Coordinates!
These numbers tell us where the vectors are
located on the globe...more or less!
This brings us to Part 2:
Geodesy
(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?
WHAT DOES IT MEAN
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.
Robinson
Two Point Equidistant
Equidistant Cylindrical
Mercator
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:
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 RIDICULOUS
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.
WHAT DOES IT ALL MEAN
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:
Geocoding
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.
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.
OSM FTW
What else can I do with OSM? Suggestions:
Trace some buildings
Add some POIs (points of interest)
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?
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.
Thanks!
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)
Presentation made with
big