@Override public com.vividsolutions.jts.geom.LinearRing buildGeometry( GeometryFactory geometryFactory, LinearRing gmlGeometry, GMLBasePointParser firstParser, CoordinateBaseParser secondParser) throws ParserException { return gmlGeometry.isSetPosOrPointPropertyOrPointRep() ? buildLineString(geometryFactory, gmlGeometry, firstParser, secondParser) : buildGeometry(geometryFactory, gmlGeometry, secondParser); }
@Override public com.vividsolutions.jts.geom.LinearRing buildLineString( GeometryFactory geometryFactory, LinearRing gmlGeometry, GMLBasePointParser firstParser, CoordinateBaseParser secondParser) throws ParserException { List<Coordinate> coordinates = new ArrayList<Coordinate>(); for (JAXBElement<?> element : gmlGeometry.getPosOrPointPropertyOrPointRep()) { coordinates.add( this.internalDirectPosHandler .buildGeometry(geometryFactory, element.getValue()) .getCoordinate()); } return geometryFactory.createLinearRing( coordinates.toArray(new Coordinate[coordinates.size()])); }