本软件下载地址未录入,如想要软件请评论,我们会补上!JSON轻松序列化和反序列化对象 A small package of all GeoJson DTOs (Data Transfer Objects) for serializing and deserializing of objects via JSON Jackson Parser.
Usage
If you know what kind of object you expect from a GeoJson file you can directly read it like this:
FeatureCollection featureCollection =
new ObjectMapper().readValue(inputStream, FeatureCollection.class);
If you what to read any GeoJson file read the value as GeoJsonObject and then test for the contents via instanceOf:
GeoJsonObject object = new ObjectMapper().readValue(inputStream, GeoJsonObject.class);
if (object instanceOf Polygon) {
...
} else if (object instanceOf Feature) {
...