return factory.createPoint(convertCoordinate(geometry.getCoordinate())); case LINE_STRING: return factory.createLineString(convertCoordinates(geometry.getCoordinates())); case POLYGON: { com.vividsolutions.jts.geom.Polygon p = (com.vividsolutions.jts.geom.Polygon) geometry;
/** * Convert the supplied {@code LineString} to a {@code LinearRing}. * * @param factory the geometry factory * @param geometry the line string * * @return the linear ring */ private org.locationtech.jts.geom.LinearRing createLinearRing( org.locationtech.jts.geom.GeometryFactory factory, com.vividsolutions.jts.geom.LineString geometry) { return factory.createLinearRing(convertCoordinates(geometry.getCoordinates())); } }