Skip to content

jmnavarro/geojson-objectivec-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Full datamodel & parser for GeoJSON 1.0 specification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published