Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Latest commit

 

History

History

geobase2osm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
-------------
-- STATUS: --
-------------

This tool has been used to import data in Alberta and Ontario and British 
Columbia.

Each provincial dataset differs slightly.  Please review the data
before importing additional provinces.


Introduction:
-------------
This tool is designed to take a Canadian Geobase GML file (or files) and 
convert it to the representative OSM stucture.

This tool is designed to be compatible with the 0.5 API.

How to use:
-----------

python geobase2osm.py -i NRN_GEOM.gml [-a NRN_ADDR.gml] [-o output.osm] [--pretty] [--quiet]

-i filename = The National Road Network Geometry input file
-a filename = The National Road Network Address input file (optional)
-o filename = The file to save to
--pretty    = Create a indented and neatly formatted output file (can add a fair bit of whitespace)
--quiet     = Don't display any messages while processing
-b filename = This option allows you to exclude portions of the GEOM file from
	      being processed. boundsfile.txt should contain a EWKT type 
	      geometry of the area that should be processed. For example 
	      POLYGON(-120 54,-121 55,-122 56,-122 55,-120 54)
-e filename = If this option is specified then RoadMatcherResult.jml should be 
	      a results file genereated from the road matcher application. 
	      geobase2osm will generate two additional output files. 
	      outfile.osm.standalone.osm will only have roads marked as 
	      StandAlone. outfile.osm.excluded.osm will contain the roads 
	      excluded from the .standalone file.



Requirements:
-------------
Python 2.5 or higher
cElementTree (Note: you can use the native python ElementTree but its much slower. To 
do so change the relevant import line in the script)
Shapely
Python gdal bindings

Notes:
-------------
This is a very memory intensive process for some of the larger Geobase datasets. Things will
be optimized in the future, currently processing requires roughly 10 times the datafile size 
of memory.


Contributors:
-------------
Jason Reid   - Initial script development
Steve Singer - OGR integration, junction processing