/osm-parser

OSM files parser for iOS and MacOS. Also generates spatialite db files from parsing.

Primary LanguageObjective-C

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];