SlideShare a Scribd company logo
1 of 41
Download to read offline
OSM Data Manipulation
Robert Savoye
Seneca Software & Solar, Inc.
rob@senecass.com
https://www.senecass.com
Resources We’ll Use
● Download OSM data for Nepal http://download.geofabrik.de/asia/nepal-
latest.osm.bz2
● Install Josm, osmconvert, osmfilter, gpsbabel
● Optionally install Qgis
Documentation
● http://wiki.openstreetmap.org/wiki/Osmfilter
● http://wiki.openstreetmap.org/wiki/Osmconvert
● https://www.gpsbabel.org
Primary Data Format Groups
● OSM (Open Street Map)
● ODK (Open Data Kit)
● Output formats (KML/KMZ, GPX, JSON, CSV)
● Shapefiles
Open Street Map Formats
● osm - Default XML based format
● o5m - High speed binary format
● osc - Change set for updating OSM data
● pbf - Very compressed binary format
● poly - Simple text file with a list of coordinates
Open Data Kit Formats
● XLSForm
• Excel/LibreCalc form
• http:/www.xlsform.org
● XForm
• XLSForm converted to XForm for ODKCollect
• Pyxform
• http://build.opendatakit.org
● ODK Instance
• XML output format from ODKCollect
Qgis can also export a layer to both XLSForm and XForm formats.
ODKCollect
● Android app
● Uses an XML format as a data input template, and a different output format.
• Data input templates are built using the ODK builder or pyxform.
● Kathmandu Living Labs has derived versions that are more Nepal mapping
task specific.
● Can use ODKAggregate to download forms and upload data files.
● Can also use ODKBriefcase to extract data using a laptop or desktop.
● Can also use the adb program, or mount the phone as a USB drive.
Shapefiles
● A binary format with arbitrary data fields that don’t map directly to OSM data
fields.
● Commonly used by many public agencies.
● Can be read by Josm and Qgis.
● Often have many fields not relevant to OSM, so conversions need to be
filtered.
Shapefile Sample
./shp2map.py -i ../MapData/Gilpin/RoadCenterlines/RoadCenterlines.shp --dump
Fields in: '../MapData/Gilpin/RoadCenterlines/RoadCenterlines.shp'
'DeletionFlag' 'centerline' 'fromleft' 'toleft' 'fromright' 'toright' 'fullname' 'altname'
'fedroute' 'fedrtetype' 'afedrte' 'afedrtetyp' 'stroute' 'strtetype' 'astrte' 'astrtetype'
'ctyroute' 'onewaydir' 'roadlevel' 'speedlimit' 'fromzelev' 'tozelev' 'inwater'
'roadclass' 'mtfcc' 'ownedby' 'maintby' 'munileft' 'muniright' 'coleft' 'coright'
'stateleft' 'stateright' 'zipleft' 'zipright' 'msagleft' 'msagright' 'esnleft' 'esnright'
'lastupdate' 'lasteditor' 'shape_Leng'
OSM Node
● A node represents a single location, and can be referenced by other
application.
<node id="267680857" lat="28.1568909" lon="85.4147102" version="4" times
tamp="2010-11-11T22:56:01Z" changeset="6347737" uid="331348"
user="janedoe"/>
OSM Waypoint
<node id="632389857" lat="28.1522222" lon="85.3781199" version="5"
timestamp="2014-02-24T23:02:05Z" changeset="20761187" uid="1772211"
user="4rch">
<tag k="ele" v="1770"/>
<tag k="name" v="Landslide"/>
<tag k="name:np" v="pairo"/>
<tag k="tourism" v="guest_house"/>
<tag k="wpt_symbol" v="Lodging"/>
<tag k="wpt_description" v="Landslide lodge (1770m)"/>
OSM Polygon or LineString
<way id="61427277" version="5" timestamp="2013-12-02T00:41:38Z"
changeset="19226127" uid="463033" user="synalik">
<nd ref="632403048"/>
<nd ref="766912443"/>
<nd ref="766912342"/>
<nd ref="766912416"/>
<tag k="boundary" v="administrative"/>
The only difference between a Polygon and a LineString is Polygons are closed.
ODKBuild
● Web based design tool
● Creates XLSForm or XForm
● Requires OSM account
XLSForm
● Standard format used by LibreOffice, Google Sheets, and MS Office.
● Binary format
● Needs to be converted to XForm for use by ODKCollect
XForm
● XML format
● Can be edited using any text editor
● Template for ODKCollect
● Supports choices, multiple choices, labels, media files
● ODKAggregate can be used to store and download Xforms to ODKCollect
based apps
ODK Aggregate
● ODKCollect can download
XForms for an input data
template
● ODKCollect can upload
data using a network
connection
● Can export in data as KML,
CSV, or JSON format
● Data is coupled to the
version of the XForm
ODKBriefcase
● Reads data from mounted
smartphone
● Reads data from local
directory
● Exports CSV format
● Can also upload to
ODKAggregate
● CVS file can be loaded into
Josm
Desktop Tools
● Qgis - Powerful GIS editor
● Josm - Desktop OSM data editor
● osmconvert - Concerts between the various OSM formats and can also do filtering using
polygons
● osmosis - Swiss army knife for OSM editing operations
● osmfilter - Can be used to filter OSM data based on tags
Android Tools
● OSMAnd
• Primarily used for data viewing and navigation
● Vespuci
• Full editor for OSM data
• Can create and edit OSM data
• Can download and upload OSM data
● StreetComplete
• Used to find incomplete or wrong data
KML
● Created by Google for Maps and Earth
● Can be edited in a text editor
<Placemark>
<name>Kharpani hot springs</name>
<styleUrl>#HotSpring</styleUrl>
<description>
Osmid: 1959686217
</description>
<Point><coordinates>83.958343088312887,28.360128796374827</coordinates>
</Point>
</Placemark>
KMZ
● Binary zip format
● Contains a single KML file
● Also contains all custom icons
CSV
● Widely supported by many GIS applications
● Can be edited by any spreadsheet program
● Can be edited in a text editor
"name","latitude","longitude","altitude","accuracy","amenity"
"Porta potty 1","44.11682204","-107.25125132","2135.0","6.068","toilets"
"Porta potty 2","44.08421973","-107.30796647","1647.0","6.068","toilets"
"Sallys Cafe","44.03392162","-107.44992966","1347.0","7.585",""
"Ten Sleep Ranch","44.06935172","-107.34920497","1491.0","13.653","campground"
GPX
● Used by most GPS devices
● Widely supported by most all GIS applications
● Can be edited in a text editor
<wpt lat="28.360128796" lon="83.958343088">
<name>Kharpani hot springs</name>
<cmt>Osmid: 1959686217</cmt>
<desc>Natural Hot Spring near Pokhara</desc>
</wpt>
Filtering data`
● Most OSM data files are huge
● Data can be reduced by using bounding boxes or polygons using osmconvert
or osmosis.
● Data can be reduced by searching for specific tags.
● Data can be reduced using Josm or QGIS
OSMConvert
● Can extract data using a bounding box or polygon
● Can produce an OSM change set by diffing OSM files
● Can upload OSM file into a database
● Can convert between OSM formats
OSMConvert Examples
osmconvert -B=test.poly tmp.osm --complete-ways -o=new.osm --drop-broken-
refs
● -B - Input polygon
● --complete-ways - Include data that extends out of the polygon, like a road
● --out-osm - Output file in OSM format
● --drop-broken-refs - Drop refs outside of the boundary
OSMFilter
● Can filter based on tags
● Faster when using o5m file for input
● Produces OSM output file
● Can keep or delete based on the tags
● Can modify tags
OSMFilter Examples
osmfilter file.o5m --keep="surface=dirt highway=path bicycle=no" --out-osm
● --keep - Keep objects with the specified tags
● --out-osm - Output file in OSM format. Can also be osm or o5c
gpsbabel
● Can translate between many formats
● Used by Google Earth and Maps
gpsbabel -i kml -f AnnapurnaCA.kml -o gpx -F AnnapurnaCA.gpx
● -i - Input format
● -f - Input file
● -o - Output format
● -F - Output file
Examples
●osmfilter file.o5m --keep="surface=dirt highway=path =footway bicycle=no" -
o=out.osm
gpsbabel -i osm -f out.osm -o kml -F trails.kml
osmfilter file.o5m --keep=”historic=archaeological_site =building =ruins” -
o=out.osm
gpsbabel -i osm -f out.osm -o gpx -F sites.gpx
Osmosis
● Can extract data using a bounding box or polygon
● Can produce an OSM change set by diffing OSM files
● Can upload OSM file into a database
Osmosis Examples
osmosis --read-xml file=colorado-latest.osm --write-apidb dbType="mysql"
host="localhost:3306" validateSchemaVersion=no database="osm" user="rob"
password="foobar"
osmosis --read-xml file=colorado.osm --tee 2 --bounding-polygon file=CO-
polyfiles/Gilpin.poly -bounding-polygon file=CO-polyfiles/Boulder.poly --merge --
write-xml file=bigger.osm
osmosis --read-xml file=colorado.osm --bounding-box top=38.96358
bottom=37.13613 left=-109.06578 right=-107.21458 --write-xml file=co-
subset.osm
Online Conversion
● https://mygeodata.cloud/converter/
● http://www.gpsvisualizer.com
● https://www.gisconvert.com/
● https://geoconverter.hsr.ch/
● https://www.expertgps.com/convert.asp
Convenient but all have file size limitations. Most use gpsbabel to process the file.
How To Make a Polygon With QGIS
● Create new Shapefile layer
● Select Polygon type
● Add name field
● Remove id field
● Click pencil icon to enable edit mode
● Click on Add Feature icon
● Draw polygon, right click to end
● Export OSM polygon
How To Make a Polygon With Josm
● Create New Layer
● Click on Draw Node
● Click to create nodes
● Last node most close
polygon
● Save As “poly”
Extract Polygon with Josm
● You can extract an
existing polygon
● Usually need to load
an OSM file, data is
too large for Overpass
● Select by searching
presets for boundaries
● Paste into New Layer
● Save as poly
Conflation
● Osm_conflate
● JOSM conflate plugin
● Hootenanny
● Gconflate
● OpenJump with RoadMatcher plugin
Hootenanny
● Only works online
● Can read Shapefiles
● Can read OSM file
● Flags conflicts with new tag in
merged output file
OpenJUMP With RoadMatcher
● Focuses on merging road
data
● Can read Shapefile
● Can read OSM file
● Works offline
Josm Conflate Plugin
● Josm can also be used
to conflate files
● Reference file can be
Shapefile
● Each match or conflict
has to be manually
Postgres Setup
createdb Nepal
psql Nepal -c ‘create extension hstore;’
psql Nepal -c ‘create extension postgis;’
psql Nepal -c ‘create extension dblink;’
Using Postgresql
● Data can be imported into the database using several applications
osm2pgsql -v --slim -C 1500 -d Nepal --number-processes 8 infile.osm --hstore
shp2pgsql -p in.zip > out.sql
ogr2ogr -f "PostgreSQL" "PG:Nepal=osm" infile.osm

More Related Content

What's hot

Using GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWindUsing GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWindIlya Rosenfeld
 
COSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingCOSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingEric Lin
 
GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...
GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...
GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...GeoSolutions
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011Jeff McKenna
 
WMS Performance Shootout 2009
WMS Performance Shootout 2009WMS Performance Shootout 2009
WMS Performance Shootout 2009Jeff McKenna
 
Aileen heal postgis osmm cou
Aileen heal postgis osmm couAileen heal postgis osmm cou
Aileen heal postgis osmm couMatt Travis
 
OSGeo Conferences Report
OSGeo Conferences ReportOSGeo Conferences Report
OSGeo Conferences ReportJeff McKenna
 

What's hot (8)

Using GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWindUsing GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWind
 
COSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingCOSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem porting
 
GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...
GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...
GeoServer for Spatio-temporal Data Handling With Examples For MetOc And Remot...
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011
 
WMS Performance Shootout 2009
WMS Performance Shootout 2009WMS Performance Shootout 2009
WMS Performance Shootout 2009
 
Why is postgis awesome?
Why is postgis awesome?Why is postgis awesome?
Why is postgis awesome?
 
Aileen heal postgis osmm cou
Aileen heal postgis osmm couAileen heal postgis osmm cou
Aileen heal postgis osmm cou
 
OSGeo Conferences Report
OSGeo Conferences ReportOSGeo Conferences Report
OSGeo Conferences Report
 

Similar to Rob Savoye, Freelance Developer, OSM Data Manipulation | Workshop | SotM Asia 2017

Contributing to OpenStreetMap (OSMPH)
Contributing to OpenStreetMap (OSMPH)Contributing to OpenStreetMap (OSMPH)
Contributing to OpenStreetMap (OSMPH)esambale
 
Block1.pdf
Block1.pdfBlock1.pdf
Block1.pdfMapTiler
 
Building Location Aware Apps - Get Started with PostGIS, PART II
Building Location Aware Apps - Get Started with PostGIS, PART IIBuilding Location Aware Apps - Get Started with PostGIS, PART II
Building Location Aware Apps - Get Started with PostGIS, PART IIlasmasi
 
LocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGigLocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGigFrank Gasdorf
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDatagssg
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataHarry Wood
 
Open GeoData, Open GeoTools: An Introduction
Open GeoData, Open GeoTools: An IntroductionOpen GeoData, Open GeoTools: An Introduction
Open GeoData, Open GeoTools: An IntroductionRichard Cantwell
 
OpenStreetMap louis liu
OpenStreetMap   louis liuOpenStreetMap   louis liu
OpenStreetMap louis liuAidIQ
 
Mapnik Sotm 2007
Mapnik Sotm 2007Mapnik Sotm 2007
Mapnik Sotm 2007artemp
 
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...Simone Cortesi
 
Palestra OSGEO e QGIS
Palestra OSGEO e QGIS Palestra OSGEO e QGIS
Palestra OSGEO e QGIS Ayr Gonçalves
 
MapServer Project Status 2013
MapServer Project Status 2013MapServer Project Status 2013
MapServer Project Status 2013Jeff McKenna
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GISbryanluman
 
Analysing OpenStreetMap Data with QGIS
Analysing OpenStreetMap Data with QGISAnalysing OpenStreetMap Data with QGIS
Analysing OpenStreetMap Data with QGISSK53
 
OSM and QGIS
OSM and QGISOSM and QGIS
OSM and QGISQGIS UK
 
Integrating PostGIS in Web Applications
Integrating PostGIS in Web ApplicationsIntegrating PostGIS in Web Applications
Integrating PostGIS in Web ApplicationsCommand Prompt., Inc
 

Similar to Rob Savoye, Freelance Developer, OSM Data Manipulation | Workshop | SotM Asia 2017 (20)

Contributing to OpenStreetMap (OSMPH)
Contributing to OpenStreetMap (OSMPH)Contributing to OpenStreetMap (OSMPH)
Contributing to OpenStreetMap (OSMPH)
 
Block1.pdf
Block1.pdfBlock1.pdf
Block1.pdf
 
Building Location Aware Apps - Get Started with PostGIS, PART II
Building Location Aware Apps - Get Started with PostGIS, PART IIBuilding Location Aware Apps - Get Started with PostGIS, PART II
Building Location Aware Apps - Get Started with PostGIS, PART II
 
LocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGigLocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGig
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoData
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoData
 
Maps tek11
Maps tek11Maps tek11
Maps tek11
 
Open GeoData, Open GeoTools: An Introduction
Open GeoData, Open GeoTools: An IntroductionOpen GeoData, Open GeoTools: An Introduction
Open GeoData, Open GeoTools: An Introduction
 
OpenStreetMap louis liu
OpenStreetMap   louis liuOpenStreetMap   louis liu
OpenStreetMap louis liu
 
Mapnik Sotm 2007
Mapnik Sotm 2007Mapnik Sotm 2007
Mapnik Sotm 2007
 
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
 
Palestra OSGEO e QGIS
Palestra OSGEO e QGIS Palestra OSGEO e QGIS
Palestra OSGEO e QGIS
 
Post gispguk
Post gispgukPost gispguk
Post gispguk
 
MapServer Project Status 2013
MapServer Project Status 2013MapServer Project Status 2013
MapServer Project Status 2013
 
Things to do with OpenStreetMap
Things to do with OpenStreetMapThings to do with OpenStreetMap
Things to do with OpenStreetMap
 
Patch Maps
Patch MapsPatch Maps
Patch Maps
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
 
Analysing OpenStreetMap Data with QGIS
Analysing OpenStreetMap Data with QGISAnalysing OpenStreetMap Data with QGIS
Analysing OpenStreetMap Data with QGIS
 
OSM and QGIS
OSM and QGISOSM and QGIS
OSM and QGIS
 
Integrating PostGIS in Web Applications
Integrating PostGIS in Web ApplicationsIntegrating PostGIS in Web Applications
Integrating PostGIS in Web Applications
 

More from Kathmandu Living Labs

Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017
Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017
Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017Kathmandu Living Labs
 
Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...
Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...
Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...Kathmandu Living Labs
 
Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017
Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017
Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017Kathmandu Living Labs
 
Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017
Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017
Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017Kathmandu Living Labs
 
Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017
Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017
Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017Kathmandu Living Labs
 
Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017
Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017
Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017Kathmandu Living Labs
 
Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...
Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...
Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...Kathmandu Living Labs
 
Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...
Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...
Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...Kathmandu Living Labs
 
Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...
Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...
Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...Kathmandu Living Labs
 
Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...
Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...
Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...Kathmandu Living Labs
 
Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...
Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...
Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...Kathmandu Living Labs
 
Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017
Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017
Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017Kathmandu Living Labs
 
Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017
Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017
Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017Kathmandu Living Labs
 
Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017
Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017
Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017Kathmandu Living Labs
 
Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...
Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...
Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...Kathmandu Living Labs
 
Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...
Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...
Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...Kathmandu Living Labs
 
Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities | SotM Asia 2017
Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities  | SotM Asia 2017Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities  | SotM Asia 2017
Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities | SotM Asia 2017Kathmandu Living Labs
 
Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017
Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017
Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017Kathmandu Living Labs
 
Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017
Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017
Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017Kathmandu Living Labs
 
Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017
Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017
Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017Kathmandu Living Labs
 

More from Kathmandu Living Labs (20)

Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017
Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017
Pradip Khatiwada, Kathmandu Living Labs | Mapping as Activism | SotM Asia 2017
 
Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...
Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...
Maliha Binte Mohiuddin, University of Dhaka | YouthMappers Session | SotM Asi...
 
Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017
Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017
Nikesh Balami, Open Knowledge Nepal | Nepal Session | SotM Asia 2017
 
Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017
Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017
Shashish Maharjan, OSM Lalitpur | Nepal Session | SotM Asia 2017
 
Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017
Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017
Sumit Dugar, Practical Action Consulting | Nepal Session | SotM Asia 2017
 
Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017
Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017
Yogesh Maharjan, OSM Kirtipur | Nepal Session | SotM Asia 2017
 
Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...
Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...
Karan Suthakaran, OpenStreetMap Sri Lanka, OSM and the Sri Lankan Government ...
 
Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...
Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...
Uttam Paudel, Nursing Association of Nepal, EpiNurse: Local Nurses for Partic...
 
Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...
Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...
Jayachandran Mani, Technical Officer, Head, Mission management at Karnataka S...
 
Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...
Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...
Sazal Sthapit, Kathmandu Living Labs, QuakeMap | OSM as a Communication Tool ...
 
Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...
Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...
Harry Mahardhika, HOT Indonesia, OSM for Disaster Management, Harry Mahardhik...
 
Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017
Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017
Monal Bhattarai, Kaasthamandap Vidyalaya |Youth as Mappers | SotM Asia 2017
 
Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017
Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017
Pratichhya Sharma, Western Regional Campus |Youth as Mappers | SotM Asia 2017
 
Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017
Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017
Jasna Budhathoki, Rato Bangala School |Youth as Mappers | SotM Asia 2017
 
Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...
Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...
Dewi Sulistiongrum, HOT Indonesia, The Mapping Strategy to Develop OSM Data |...
 
Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...
Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...
Bradley Wilson, University of Arkansas & Kathmandu Living Labs, From Disaster...
 
Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities | SotM Asia 2017
Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities  | SotM Asia 2017Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities  | SotM Asia 2017
Ramya Raghupathy, Mapbox, Basemap Completeness in Asian Cities | SotM Asia 2017
 
Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017
Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017
Poornima Badrinath, Mapbox, Past holds the mirror to the future | SotM Asia 2017
 
Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017
Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017
Poornima Badrinath, Mapbox, OSM Validation: Workshop | SotM Asia 2017
 
Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017
Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017
Dr. Rajib Subba, DIG, Nepal Police, Nepal Earthquake Session | SotM Asia 2017
 

Recently uploaded

Transport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MITransport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MIRomil Mishra
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Which standard is best for your content?
Which standard is best for your content?Which standard is best for your content?
Which standard is best for your content?Rustici Software
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneUiPathCommunity
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Deliver Latency Free Customer Experience
Deliver Latency Free Customer ExperienceDeliver Latency Free Customer Experience
Deliver Latency Free Customer ExperienceOpsTree solutions
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfROWELL MARQUINA
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Memoori
 
Automation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions managementAutomation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions managementDianaGray10
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationDianaGray10
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactivestartupro
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...BookNet Canada
 

Recently uploaded (20)

Transport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MITransport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MI
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Which standard is best for your content?
Which standard is best for your content?Which standard is best for your content?
Which standard is best for your content?
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyone
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Deliver Latency Free Customer Experience
Deliver Latency Free Customer ExperienceDeliver Latency Free Customer Experience
Deliver Latency Free Customer Experience
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!
 
Automation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions managementAutomation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions management
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automation
 
Bitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactiveBitdefender-CSG-Report-creat7534-interactive
Bitdefender-CSG-Report-creat7534-interactive
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
 

Rob Savoye, Freelance Developer, OSM Data Manipulation | Workshop | SotM Asia 2017

  • 1. OSM Data Manipulation Robert Savoye Seneca Software & Solar, Inc. rob@senecass.com https://www.senecass.com
  • 2. Resources We’ll Use ● Download OSM data for Nepal http://download.geofabrik.de/asia/nepal- latest.osm.bz2 ● Install Josm, osmconvert, osmfilter, gpsbabel ● Optionally install Qgis Documentation ● http://wiki.openstreetmap.org/wiki/Osmfilter ● http://wiki.openstreetmap.org/wiki/Osmconvert ● https://www.gpsbabel.org
  • 3. Primary Data Format Groups ● OSM (Open Street Map) ● ODK (Open Data Kit) ● Output formats (KML/KMZ, GPX, JSON, CSV) ● Shapefiles
  • 4. Open Street Map Formats ● osm - Default XML based format ● o5m - High speed binary format ● osc - Change set for updating OSM data ● pbf - Very compressed binary format ● poly - Simple text file with a list of coordinates
  • 5. Open Data Kit Formats ● XLSForm • Excel/LibreCalc form • http:/www.xlsform.org ● XForm • XLSForm converted to XForm for ODKCollect • Pyxform • http://build.opendatakit.org ● ODK Instance • XML output format from ODKCollect Qgis can also export a layer to both XLSForm and XForm formats.
  • 6. ODKCollect ● Android app ● Uses an XML format as a data input template, and a different output format. • Data input templates are built using the ODK builder or pyxform. ● Kathmandu Living Labs has derived versions that are more Nepal mapping task specific. ● Can use ODKAggregate to download forms and upload data files. ● Can also use ODKBriefcase to extract data using a laptop or desktop. ● Can also use the adb program, or mount the phone as a USB drive.
  • 7. Shapefiles ● A binary format with arbitrary data fields that don’t map directly to OSM data fields. ● Commonly used by many public agencies. ● Can be read by Josm and Qgis. ● Often have many fields not relevant to OSM, so conversions need to be filtered.
  • 8. Shapefile Sample ./shp2map.py -i ../MapData/Gilpin/RoadCenterlines/RoadCenterlines.shp --dump Fields in: '../MapData/Gilpin/RoadCenterlines/RoadCenterlines.shp' 'DeletionFlag' 'centerline' 'fromleft' 'toleft' 'fromright' 'toright' 'fullname' 'altname' 'fedroute' 'fedrtetype' 'afedrte' 'afedrtetyp' 'stroute' 'strtetype' 'astrte' 'astrtetype' 'ctyroute' 'onewaydir' 'roadlevel' 'speedlimit' 'fromzelev' 'tozelev' 'inwater' 'roadclass' 'mtfcc' 'ownedby' 'maintby' 'munileft' 'muniright' 'coleft' 'coright' 'stateleft' 'stateright' 'zipleft' 'zipright' 'msagleft' 'msagright' 'esnleft' 'esnright' 'lastupdate' 'lasteditor' 'shape_Leng'
  • 9. OSM Node ● A node represents a single location, and can be referenced by other application. <node id="267680857" lat="28.1568909" lon="85.4147102" version="4" times tamp="2010-11-11T22:56:01Z" changeset="6347737" uid="331348" user="janedoe"/>
  • 10. OSM Waypoint <node id="632389857" lat="28.1522222" lon="85.3781199" version="5" timestamp="2014-02-24T23:02:05Z" changeset="20761187" uid="1772211" user="4rch"> <tag k="ele" v="1770"/> <tag k="name" v="Landslide"/> <tag k="name:np" v="pairo"/> <tag k="tourism" v="guest_house"/> <tag k="wpt_symbol" v="Lodging"/> <tag k="wpt_description" v="Landslide lodge (1770m)"/>
  • 11. OSM Polygon or LineString <way id="61427277" version="5" timestamp="2013-12-02T00:41:38Z" changeset="19226127" uid="463033" user="synalik"> <nd ref="632403048"/> <nd ref="766912443"/> <nd ref="766912342"/> <nd ref="766912416"/> <tag k="boundary" v="administrative"/> The only difference between a Polygon and a LineString is Polygons are closed.
  • 12. ODKBuild ● Web based design tool ● Creates XLSForm or XForm ● Requires OSM account
  • 13. XLSForm ● Standard format used by LibreOffice, Google Sheets, and MS Office. ● Binary format ● Needs to be converted to XForm for use by ODKCollect
  • 14. XForm ● XML format ● Can be edited using any text editor ● Template for ODKCollect ● Supports choices, multiple choices, labels, media files ● ODKAggregate can be used to store and download Xforms to ODKCollect based apps
  • 15. ODK Aggregate ● ODKCollect can download XForms for an input data template ● ODKCollect can upload data using a network connection ● Can export in data as KML, CSV, or JSON format ● Data is coupled to the version of the XForm
  • 16. ODKBriefcase ● Reads data from mounted smartphone ● Reads data from local directory ● Exports CSV format ● Can also upload to ODKAggregate ● CVS file can be loaded into Josm
  • 17. Desktop Tools ● Qgis - Powerful GIS editor ● Josm - Desktop OSM data editor ● osmconvert - Concerts between the various OSM formats and can also do filtering using polygons ● osmosis - Swiss army knife for OSM editing operations ● osmfilter - Can be used to filter OSM data based on tags
  • 18. Android Tools ● OSMAnd • Primarily used for data viewing and navigation ● Vespuci • Full editor for OSM data • Can create and edit OSM data • Can download and upload OSM data ● StreetComplete • Used to find incomplete or wrong data
  • 19. KML ● Created by Google for Maps and Earth ● Can be edited in a text editor <Placemark> <name>Kharpani hot springs</name> <styleUrl>#HotSpring</styleUrl> <description> Osmid: 1959686217 </description> <Point><coordinates>83.958343088312887,28.360128796374827</coordinates> </Point> </Placemark>
  • 20. KMZ ● Binary zip format ● Contains a single KML file ● Also contains all custom icons
  • 21. CSV ● Widely supported by many GIS applications ● Can be edited by any spreadsheet program ● Can be edited in a text editor "name","latitude","longitude","altitude","accuracy","amenity" "Porta potty 1","44.11682204","-107.25125132","2135.0","6.068","toilets" "Porta potty 2","44.08421973","-107.30796647","1647.0","6.068","toilets" "Sallys Cafe","44.03392162","-107.44992966","1347.0","7.585","" "Ten Sleep Ranch","44.06935172","-107.34920497","1491.0","13.653","campground"
  • 22. GPX ● Used by most GPS devices ● Widely supported by most all GIS applications ● Can be edited in a text editor <wpt lat="28.360128796" lon="83.958343088"> <name>Kharpani hot springs</name> <cmt>Osmid: 1959686217</cmt> <desc>Natural Hot Spring near Pokhara</desc> </wpt>
  • 23. Filtering data` ● Most OSM data files are huge ● Data can be reduced by using bounding boxes or polygons using osmconvert or osmosis. ● Data can be reduced by searching for specific tags. ● Data can be reduced using Josm or QGIS
  • 24. OSMConvert ● Can extract data using a bounding box or polygon ● Can produce an OSM change set by diffing OSM files ● Can upload OSM file into a database ● Can convert between OSM formats
  • 25. OSMConvert Examples osmconvert -B=test.poly tmp.osm --complete-ways -o=new.osm --drop-broken- refs ● -B - Input polygon ● --complete-ways - Include data that extends out of the polygon, like a road ● --out-osm - Output file in OSM format ● --drop-broken-refs - Drop refs outside of the boundary
  • 26. OSMFilter ● Can filter based on tags ● Faster when using o5m file for input ● Produces OSM output file ● Can keep or delete based on the tags ● Can modify tags
  • 27. OSMFilter Examples osmfilter file.o5m --keep="surface=dirt highway=path bicycle=no" --out-osm ● --keep - Keep objects with the specified tags ● --out-osm - Output file in OSM format. Can also be osm or o5c
  • 28. gpsbabel ● Can translate between many formats ● Used by Google Earth and Maps gpsbabel -i kml -f AnnapurnaCA.kml -o gpx -F AnnapurnaCA.gpx ● -i - Input format ● -f - Input file ● -o - Output format ● -F - Output file
  • 29. Examples ●osmfilter file.o5m --keep="surface=dirt highway=path =footway bicycle=no" - o=out.osm gpsbabel -i osm -f out.osm -o kml -F trails.kml osmfilter file.o5m --keep=”historic=archaeological_site =building =ruins” - o=out.osm gpsbabel -i osm -f out.osm -o gpx -F sites.gpx
  • 30. Osmosis ● Can extract data using a bounding box or polygon ● Can produce an OSM change set by diffing OSM files ● Can upload OSM file into a database
  • 31. Osmosis Examples osmosis --read-xml file=colorado-latest.osm --write-apidb dbType="mysql" host="localhost:3306" validateSchemaVersion=no database="osm" user="rob" password="foobar" osmosis --read-xml file=colorado.osm --tee 2 --bounding-polygon file=CO- polyfiles/Gilpin.poly -bounding-polygon file=CO-polyfiles/Boulder.poly --merge -- write-xml file=bigger.osm osmosis --read-xml file=colorado.osm --bounding-box top=38.96358 bottom=37.13613 left=-109.06578 right=-107.21458 --write-xml file=co- subset.osm
  • 32. Online Conversion ● https://mygeodata.cloud/converter/ ● http://www.gpsvisualizer.com ● https://www.gisconvert.com/ ● https://geoconverter.hsr.ch/ ● https://www.expertgps.com/convert.asp Convenient but all have file size limitations. Most use gpsbabel to process the file.
  • 33. How To Make a Polygon With QGIS ● Create new Shapefile layer ● Select Polygon type ● Add name field ● Remove id field ● Click pencil icon to enable edit mode ● Click on Add Feature icon ● Draw polygon, right click to end ● Export OSM polygon
  • 34. How To Make a Polygon With Josm ● Create New Layer ● Click on Draw Node ● Click to create nodes ● Last node most close polygon ● Save As “poly”
  • 35. Extract Polygon with Josm ● You can extract an existing polygon ● Usually need to load an OSM file, data is too large for Overpass ● Select by searching presets for boundaries ● Paste into New Layer ● Save as poly
  • 36. Conflation ● Osm_conflate ● JOSM conflate plugin ● Hootenanny ● Gconflate ● OpenJump with RoadMatcher plugin
  • 37. Hootenanny ● Only works online ● Can read Shapefiles ● Can read OSM file ● Flags conflicts with new tag in merged output file
  • 38. OpenJUMP With RoadMatcher ● Focuses on merging road data ● Can read Shapefile ● Can read OSM file ● Works offline
  • 39. Josm Conflate Plugin ● Josm can also be used to conflate files ● Reference file can be Shapefile ● Each match or conflict has to be manually
  • 40. Postgres Setup createdb Nepal psql Nepal -c ‘create extension hstore;’ psql Nepal -c ‘create extension postgis;’ psql Nepal -c ‘create extension dblink;’
  • 41. Using Postgresql ● Data can be imported into the database using several applications osm2pgsql -v --slim -C 1500 -d Nepal --number-processes 8 infile.osm --hstore shp2pgsql -p in.zip > out.sql ogr2ogr -f "PostgreSQL" "PG:Nepal=osm" infile.osm