Issue Details (XML | Word | Printable)

Key: GEOT-1924
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Nicholas Bergson-Shilcock
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
GeoTools

GeoJSON parser and builder

Created: 16/Jul/08 12:52 PM   Updated: 23/Jul/08 05:40 AM
Component/s: data
Affects Version/s: 2.4.4
Fix Version/s: None

File Attachments: 1. Zip Archive geojson_src.zip (16 kB)
2. File GeoJSONBuilder-features.diff (3 kB)
3. File pom.diff (0.8 kB)

Environment: Mac OS X v. 10.5.4, JVM 1.5.

Testcase included: yes


 Description  « Hide
This is the beginning of a GeoJSON parser and builder. The parser takes GeoJSON and parses it into Geometry and Feature objects. The builder takes Java geometry objects and writes out their GeoJSON string representations. GeoJSONBuilder was written by Chris Holmes and has been brought over from its package in GeoServer (org.geoserver.wfs.response.GeoJSONBuilder).

GeoJSONParser will correctly parse basic geometry objects (Point, LineString, Polygon, and their multi versions), as well as GeometryCollections. It will also parse features and feature collections, however, non-required attributes in the GeoJSON object won't be converted. The crs and bbox attributes are also not yet implemented.

This uses the json-lib library: http://json-lib.sourceforge.net/



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Alexey Noskov added a comment - 23/Jul/08 04:19 AM
I attached diff for pom.xml, which adds maven dependency from json-lib.

Alexey Noskov added a comment - 23/Jul/08 05:40 AM
Modification of GeoJSONBuilder to write features and feature collections