import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.district.network.ontology.DistrictNetworkResource;
+import org.simantics.layer0.Layer0;
public class ModelledCRS implements CRS {
private GeodeticCalculator calculator;
public ModelledCRS(ReadGraph graph, Resource type) throws DatabaseException, FactoryException {
- String wkt = graph.getRelatedValue2(type, DistrictNetworkResource.getInstance(graph).HasSRTEXT, Bindings.STRING);
- CoordinateReferenceSystem crs = org.geotools.referencing.CRS.parseWKT(wkt);
+ String code = graph.getRelatedValue2(type, Layer0.getInstance(graph).HasLabel, Bindings.STRING);
+ CoordinateReferenceSystem crs = org.geotools.referencing.CRS.decode(code);
this.calculator = new GeodeticCalculator(crs);
}