OSM files parser for iOS and MacOS. Also generates spatialite db files from parsing.
Objective-C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.DS_Store
.gitignore
Node.h
Node.m
OSMDAO.h
OSMDAO.m
OSMParser.h
OSMParser.m
OSMParserHandlerAdministrative.h
OSMParserHandlerAdministrative.m
OSMParserHandlerAllRoads.h
OSMParserHandlerAllRoads.m
OSMParserHandlerDefault.h
OSMParserHandlerDefault.m
OSMParserHandlerMotorway.h
OSMParserHandlerMotorway.m
README.md
Relation.h
Relation.m
Way.h
Way.m
optimizeDb.sql
roadNetworkInit.sql

README.md

osm-parser

*A SAX parser to parse large .osm (OpenStreetMaps1) files and convert them into spatiality (spatial extension for sqlite) files.

Dependency

The only required sources files are the ones needed to use the AQXMLParser (aka StreamingXMLParser) from Alan Quatermain Toolkit 2

#import "OSMParser.h"
#import "OSMParserHandlerDefault.h"

..

NSString* myOsmInputFile = @"path/to/your/file/map.osm";
NSString* mySpatialiteOutputFile = @"path/to/your/file/spatial.db";
OSMParser* parser = [[OSMParser alloc] initWithOSMFile:myOsmInputFile];
OSMParserHandlerDefault* handler = [[OSMParserHandlerDefault alloc] initWithOutputFilePath:mySpatialiteOutputFile];
[parser parse];
[parser release];
[handler release];