- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
public DirectPosition unmarshalDirectPosition(DirectPositionType src) { DirectPosition dest = new DirectPosition(); if (src.isSetValue()) dest.setValue(src.getValue()); if (src.isSetSrsName()) dest.setSrsName(src.getSrsName()); if (src.isSetSrsDimension()) dest.setSrsDimension(src.getSrsDimension().intValue()); if (src.isSetAxisLabels()) dest.setAxisLabels(src.getAxisLabels()); if (src.isSetUomLabels()) dest.setUomLabels(src.getUomLabels()); return dest; }
if (srid == -1 && xbPos.getSrsName() != null) { srid = CRSHelper.parseSrsName(xbPos.getSrsName());
private Object parsePointType(PointType xbPointType) throws OwsExceptionReport { String geomWKT = null; int srid = -1; if (xbPointType.getSrsName() != null) { srid = SosHelper.parseSrsName(xbPointType.getSrsName()); } if (xbPointType.getPos() != null) { DirectPositionType xbPos = xbPointType.getPos(); if (srid == -1 && xbPos.getSrsName() != null) { srid = SosHelper.parseSrsName(xbPos.getSrsName()); } String directPosition = getString4Pos(xbPos); geomWKT = JTSHelper.createWKTPointFromCoordinateString(directPosition); } else if (xbPointType.getCoordinates() != null) { CoordinatesType xbCoords = xbPointType.getCoordinates(); String directPosition = getString4Coordinates(xbCoords); geomWKT = JTSHelper.createWKTPointFromCoordinateString(directPosition); } else { throw new NoApplicableCodeException().withMessage("For geometry type 'gml:Point' only elements " + "'gml:pos' and 'gml:coordinates' are allowed"); } checkSrid(srid); if (srid == -1) { throw new NoApplicableCodeException().withMessage("No SrsName ist specified for geometry!"); } return JTSHelper.createGeometryFromWKT(geomWKT, srid); }