Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I am creating a Java web service that receives GeoJSON.
Does anyone know a java library to manage GeoJSON?
Geotools as a support for geojson. See here.
Otherwise, you could simply use a typical JSON parser (such as json-simple) together with the geoJSON spec, which is really easy to use.
The best solution depends on what you want to do with the parsed information.
To parse or deserialize geojson in Java REST webservice, i prefere to use geojson-jackson , which integrate itself very nicely with jackson.
Another alternative is GeoGson, which is built on top of Google's Gson:
Geometry geometry = new GsonBuilder()
Required, but never shown