}
private Geometry toSimpleGeometry(GeometryFactory factory, AbstractGeometryInfo geom) {
Geometry geometry = null;
if (geom instanceof PointTypeInfo) {
PointTypeInfo point = (PointTypeInfo) geom;
if (point.ifCoord()) {
geometry = factory.createPoint(getCoordinates(Collections.singletonList(point.getCoord()))[0]);
} else if (point.ifCoordinates()) {
geometry = factory.createPoint(getCoordinates(point.getCoordinates())[0]);
}
} else if (geom instanceof LineStringTypeInfo) {
LineStringTypeInfo linestring = (LineStringTypeInfo) geom;
if (linestring.ifCoordList()) {
geometry = factory.createLineString(getCoordinates(linestring.getCoordList()));