I would like to create a GeoJSON containing a MultiPoint
from a list of WGS coordinates in my custom format (say MyLonLat
). I wanted to use geotools library to simplify this, but I can't find a nice and easy way to do this. One can create a MultiPoint
from Coordinate[]
or Point[]
or CoordinateSequence
, but not regular Java Collection
, like List
.
I found that GeometryFactory
has method toGeometryArray
, which can convert my list into Geometry[]
(like Point[]
). The problem is, that Point
is not as simple a Coordinate
so converting MyLonLat
to Point
requires implementing methods that I don't need.
MyLonLat
extendPoint
? orCoordinate
?