Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
OSM files parser for iOS and MacOS. Also generates spatialite db files from parsing.
Objective-C
Branch: master

This branch is even with y0n3l:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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];
Something went wrong with that request. Please try again.