use of org.geotools.referencing.crs.AbstractSingleCRS in project collect by openforis.
the class GeoToolsCoordinateOperations method getDescription.
/**
* It returns a concatenation of datum, aliases and scope
*/
private String getDescription(CoordinateReferenceSystem crs) {
List<String> parts = new ArrayList<String>();
// datum
if (crs instanceof AbstractSingleCRS) {
Datum datum = ((AbstractSingleCRS) crs).getDatum();
String datumName = datum.getName().toString();
parts.add(datumName);
}
// aliases
for (GenericName genericName : crs.getAlias()) {
parts.add(genericName.toString());
}
// scope
InternationalString scope = crs.getScope();
if (scope != null && StringUtils.isNotBlank(scope)) {
parts.add(scope.toString());
}
String result = StringUtils.join(parts, "\n");
return result;
}
Aggregations