use of com.revolsys.geometry.cs.datum.VerticalDatum in project com.revolsys.open by revolsys.
the class WktCsParser method processVerticalCoordinateSystem.
private VerticalCoordinateSystem processVerticalCoordinateSystem(final List<Object> values) {
final String name = (String) values.get(0);
VerticalDatum verticalDatum = null;
final Map<ParameterName, ParameterValue> parameters = new LinkedHashMap<>();
LinearUnit linearUnit = null;
Authority authority = null;
final List<Axis> axises = new ArrayList<>();
for (int i = 1; i < values.size(); i++) {
final Object value = values.get(i);
if (value instanceof VerticalDatum) {
verticalDatum = (VerticalDatum) value;
} else if (value instanceof LinearUnit) {
linearUnit = (LinearUnit) value;
} else if (value instanceof Axis) {
final Axis axis = (Axis) value;
axises.add(axis);
} else if (value instanceof Authority) {
authority = (Authority) value;
} else if (value instanceof Map) {
final Map<String, List<Object>> map = (Map<String, List<Object>>) value;
final String key = map.keySet().iterator().next();
if (key.equals("PARAMETER")) {
final List<Object> paramValues = map.get(key);
final String paramName = (String) paramValues.get(0);
final ParameterName parameterName = new SingleParameterName(paramName);
final BigDecimal paramValue = (BigDecimal) paramValues.get(1);
parameters.put(parameterName, new ParameterValueBigDecimal(paramValue));
}
}
}
return new VerticalCoordinateSystem(authority, name, verticalDatum, parameters, linearUnit, axises);
}
Aggregations