/** * Creates the position section of the SensorML description. * * @param position * SOS position * @return XML Position element * @throws OwsExceptionReport * if an error occurs */ private Position createPosition(final SmlPosition position) throws OwsExceptionReport { final Position xbPosition = Position.Factory.newInstance(getOptions()); if (position.isSetName()) { xbPosition.setName(position.getName().getValue()); } else { xbPosition.setName("position"); } final PositionType xbSwePosition = xbPosition.addNewPosition(); xbSwePosition.setFixed(position.isFixed()); xbSwePosition.setReferenceFrame(position.getReferenceFrame()); final VectorType xbVector = xbSwePosition.addNewLocation().addNewVector(); for (final SweCoordinate<?> coordinate : position.getPosition()) { if (coordinate != null && coordinate.getValue() != null && (!coordinate.getValue().isSetValue() || !coordinate.getValue().getValue().equals(Double.NaN))) { // FIXME: SWE Common NS xbVector.addNewCoordinate().set(CodingHelper.encodeObjectToXml(SweConstants.NS_SWE_101, coordinate)); } } return xbPosition; }
xbSwePosition.setFixed(position.isFixed()); xbSwePosition.setReferenceFrame(position.getReferenceFrame()); final VectorType xbVector = xbSwePosition.addNewLocation().addNewVector(); for (SweCoordinate<?> coordinate : position.getPosition()) { if (coordinate.getValue().getValue() != null
pT.setReferenceFrame(EPSG_CODE_PREFIX + referenceFrame); final VectorType vT = pT.addNewLocation().addNewVector(); vT.setId(vectorId);