opendatalab-de / geojson-jackson

GeoJson POJOs for Jackson - serialize and deserialize objects with ease
http://blog.opendatalab.de
Apache License 2.0
263 stars 94 forks source link

polygon should List<List<LngLatAlt>> #59

Open targei opened 3 years ago

targei commented 3 years ago

According to RFC7946 definition, to present the ring (with hole), it has to two dementional array.

https://tools.ietf.org/html/rfc7946#section-3.1.6 { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }, "properties": { "prop0": "value0", "prop1": { "this": "that" } }

Degooya commented 1 year ago

If you look at the Geometry class, it already wraps T inside of a list

protected List<T> coordinates = new ArrayList<T>();