maps

45
Maps For web developers and enthusiasts

Upload: konstantin-delchev

Post on 31-Oct-2014

433 views

Category:

Technology


1 download

DESCRIPTION

Maps for web developers and enthusiasts 1. Projections 2. Providers 3. Own map server

TRANSCRIPT

Page 1: Maps

MapsFor web developers and enthusiasts

Page 3: Maps

Contents1. Map projections2. Map providers3. How to create your own map

Page 4: Maps

Earth…

Page 5: Maps

…is flat…

Page 6: Maps

…when using projections.• Projections

• Datums• Geocentric datums

• WSG84• Local datums

• NAD83• NAD27• ED1950

Page 7: Maps

Degrees Minutes Seconds

Page 8: Maps

Latitude and Longitude• Latitude, Longitude = 42° 41' 53.0916" , 23° 19' 18.894“ (geographic

coordinates)• Latitude = 42 + 41/60 + 53.0916/3600 = 42.698081 (decimal)• Longitude = 23 + 19/60 + 18.894/3600 = 23.317191 (decimal)• Latitude, Longitude = 42.698081, 23.317191 (in decimal)

• 1 min ≈ 1.85km• 1 sec ≈ 31m

• Latitude distance ≈ 42.67 * 60 * 1.85 ≈ 4 736km• Longitude distance ≈ 23.32 * 60 * 1.85 ≈ 2 588km

Page 9: Maps

• Use at least 6symbols afterthe dot for keepingmax precision

• Degrees vary indifferent placesin the worldby 21.5km

Konstantin Delchev
Add background color for the blue text above the water
Page 10: Maps

Universal Traverse MercatorUTM – 328204 E (easting), 4746040 N (northing)

Page 11: Maps

Aspects of projections• Distance• Scale• Direction• Bearing• Shape• Area• Distance

Page 12: Maps
Konstantin Delchev
Add notes to hint what slide is next
Page 13: Maps

Equidistant cylindrical map• Showing distances (km) between lines connected by identical lines. Each graphic scale

is only valid along its own parallel, or the one symmetrically opposite the Equator. Only the vertical scale is valid anywhere, and none of the four is valid if rotated.

Page 14: Maps

Equatorial van der Grinten III map• Parallels are straight but not standard lines.

Page 15: Maps

Equatorial cylindrical equidistant map• Equatorial cylindrical equidistant map showing standard lines.

Markers divide segments proportionally.

Page 16: Maps

Transverse cylindrical equidistant map• Transverse cylindrical equidistant map showing standard lines,

which no more coincide with meridians and the Equator except accidentally. Markers divide segments proportionally.

Page 17: Maps

Equatorial sinusoidal map• Equatorial sinusoidal (Sanson-Flamsteed) map showing

standard lines. Markers divide segments proportionally.

Page 18: Maps

Normal Werner map• Normal Werner map showing standard lines. Markers divide

segments proportionally.

Page 19: Maps

Polar azimuthal equidistant map• Polar azimuthal equidistant map showing standard lines.

Markers divide segments proportionally.

Page 20: Maps

Which projection is best• Depends on the purpose• What we want to show on the map• Know target audience• Put important information on map• More in “How to lie with maps”

http://imgs.xkcd.com/comics/map_projections.png

Page 21: Maps

Tools• Proj4 – conversions between cartographic projections• http://trac.osgeo.org/proj/

• GEOS – geometry processing and analysis• http://trac.osgeo.org/geos/

• GDAL – geometry data abstraction, translation and processing• http://www.gdal.org/

Page 22: Maps

More information

Page 23: Maps

Map providers

Page 24: Maps

Google Maps• https://www.google.com/maps/preview• Free for commercial use with public access with 25 000

requests per day• Zoom level up to 18-23 depend on area• Started 2004 as C++ application by Lars and Jens Rasmussen

from Sydney’s Where 2 Technologies• 2005 first announced• Satellite images updated regularly, not older than 3y• 54% usage of mobile apps

Page 25: Maps

Bing Maps• http://www.bing.com/maps/• API with 90 days trial• December 2005 first release• 2009 rebranded from Live Search Maps to Bing Maps• Based on MS MapPoint (.NET application to view, edit and

integrate maps) and TerraServer (free repository of aerial imagery and topographic maps provided by USGS, known as MS Research Maps as of 2010)

Page 26: Maps

MapQuest• http://www.mapquest.com/• API, free with app key• Free map tiles• Static map

• Founded 1967 as Cartographic Services• 1994 Renamed to GeoSystems Global Corporation• 1996 launched as a web service• 2000 Acquired by AOL

Page 27: Maps

ArcGIS Online (ESRI)• http://www.arcgis.com/home/webmap/viewer.html• ESRI• Founded 1969, California USA

• API, paid• ArcGIS desktop application• Load data from database• Creating and using maps as shape file• Compiling geographic data• Analyzing mapped information

• ArcGIS reader• 40% market share in GIS software• Paid license• Proprietary data formats

Page 28: Maps

HERE maps• http://here.com/• API

• Map tiles• Static maps

• 2001 as SmartGo• 2006 acquired gate 5 – Berlin-based route planning software• 2007 acquired NAVTEQ• 2008 acquired Plazes, Plum, Dopplr - geo related web sites• 2010 acquired Metacarta• 2011 bought earthmine• 2011 Former Ovi Maps (2007-2010) renamed to Nokia Maps (2011-2012)• 2012 rebranded to HERE Maps

Page 29: Maps

CloudMade• http://maps.cloudmade.com/• Co-founded by Steve Coast in 2007• Many OSM based GIS APIs and services• Map style editor

Page 30: Maps

OpenStreetMap• http://www.openstreetmap.org/• Collaborative project starter by Steve Coast in UK in 2004• 2006 OpenStreetMap Foundation created to support the project• 2006 OSM reuses Yahoo aerial photography• AND donated road data• The State of the Map conference• first held 2007• 9 000 registered users• Sponsored by Google, Yahoo and Multimap

• 1 million users (not all contributing)• Open Database License• Uses Ruby On Rails for back end

Registered users2006 20

12

Page 31: Maps

Creating own map server

Page 32: Maps

What we need• Tiles - images of 256 x 256 pixels each• Already pre-rendered or rendered on demand from map

database• Use from 3rd party provider (at charge or free)

• JavaScript API library• OpenLayers – powerful and long-established• Leaflet – lightweight and easy-to-learn

Page 33: Maps
Page 34: Maps
Page 35: Maps

Open layers

Page 36: Maps

Leaflet

Page 37: Maps

Mapstraction• http://mapstraction.com/• CloudMade• ESRI ArcGIS• Google• MapQuest and MapQuest Open• Microsoft Bing• Nokia HERE• OpenLayers• Ordnance Survey OpenSpace• Yandex

Page 38: Maps

What is in the black box• Planet file (33Gb of data so far) or extract (Geofabrik, Metro Extracts, CloudMade)• PostgreSQL + PostGIS• Apache + mod_tile for serving tiles• Mapnik• slippy_map

Page 39: Maps

Put data in database• Get planet file or extract• Use osm2pgsql to import the data into Postgres• Add world boundaries, coastlines etc.• Modify stylesheets (not required)• render_list to pre-render tiles

Page 40: Maps
Page 42: Maps

Stamen watercolor

Page 43: Maps

Stamen toner

Page 44: Maps

Example of Mars

Page 45: Maps

http://gis.stackexchange.com/