Full datamodel & parser for GeoJSON 1.0 specification
Objective-C
Switch branches/tags
Nothing to show
Latest commit 33ae977 Dec 9, 2014 @jmnavarro Added license
Permalink
Failed to load latest commit information.
GeoJSONParserSample fixed bug supporting null geometries Jul 4, 2012
img added screenshot Jul 4, 2012
parser more tests Jul 4, 2012
.gitmodules added submodule Jul 4, 2012
README.md Added license Dec 9, 2014

README.md

geojson-objectivec-parser

This set of Objective-C classes implements a data model for GeoJSON specification. It uses a one-to-one approach, so don't be intimidated by the amount of classes: they are just data wrappers of json objects.

Dependencies

json-framework (https://github.com/stig/json-framework/)

Usage

  1. Clone code (with recursive git clone git://github.com/jmnavarro/geojson-objectivec-parser.git --recursive

  2. Open copy classes from parser/classes to your project. Note you should copy also json-framework classes

  3. Use GeoJSONFactory class to parse your jsons, like this:

GeoJSONFactory *factory = [[GeoJSONFactory alloc] init];
    
if ([factory createObjectFromJSON:@"the geojson string"]) {
	// parse ok
	// factory.type contains the type of object created (GeoJSONPoint, GeoJSONFeature, etc.)
	// factory.object contains the object of previous type
} else {
	// parse error. No more info, sorry
}

TODO (feel free to pull)

Screeshot

Emulator showing one object tree created

License

This library is free software ("Licensed Software"); you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; including but not limited to, the implied warranty of MERCHANTABILITY, NONINFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA