Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 856 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 856 Bytes

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