CoordinateReferenceSystem crs = null;
try {
crs = CRS.decode(srsName);
} catch (NoSuchAuthorityCodeException e) {
// custom CRS
crs = new DefaultVerticalCRS(srsName, DefaultVerticalDatum.GEOIDAL,
DefaultVerticalCS.DEPTH);
} catch (FactoryException e) {
// custom CRS
crs = new DefaultVerticalCRS(srsName, DefaultVerticalDatum.GEOIDAL,
DefaultVerticalCS.DEPTH);
}
// just in case
if (crs == null) {
crs = new DefaultVerticalCRS(srsName, DefaultVerticalDatum.GEOIDAL,
DefaultVerticalCS.DEPTH);
}
LineString linestring = null;