Package nl.b3p.tailormap.api.geotools
Class TransformationUtil
- java.lang.Object
-
- nl.b3p.tailormap.api.geotools.TransformationUtil
-
public class TransformationUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.geotools.api.referencing.operation.MathTransformgetTransformationToApplication(@NotNull Application application, @NotNull org.geotools.api.data.SimpleFeatureSource simpleFeatureSource)Determine whether we need to transform geometries to the application CRS.static org.geotools.api.referencing.operation.MathTransformgetTransformationToDataSource(@NotNull Application application, @NotNull org.geotools.api.data.SimpleFeatureSource simpleFeatureSource)Determine whether we need to transform geometry to data source crs.
-
-
-
Method Detail
-
getTransformationToApplication
public static org.geotools.api.referencing.operation.MathTransform getTransformationToApplication(@NotNull @NotNull Application application, @NotNull @NotNull org.geotools.api.data.SimpleFeatureSource simpleFeatureSource) throws org.geotools.api.referencing.FactoryExceptionDetermine whether we need to transform geometries to the application CRS. Note that this uses the "default geometry" attribute of the feature source, in cases where a feature source has multiple geometry attributes (with possibly different CRSs) or heterogenous CRSs across a single geometry attribute this may not be accurate.- Parameters:
application- the referenced applicationsimpleFeatureSource- the feature source used in the application- Returns:
nullwhen no transform is required and a valid transform otherwise- Throws:
org.geotools.api.referencing.FactoryException- when the CRS cannot be decoded
-
getTransformationToDataSource
public static org.geotools.api.referencing.operation.MathTransform getTransformationToDataSource(@NotNull @NotNull Application application, @NotNull @NotNull org.geotools.api.data.SimpleFeatureSource simpleFeatureSource) throws org.geotools.api.referencing.FactoryExceptionDetermine whether we need to transform geometry to data source crs. Note that this uses the "default geometry" attribute of the feature source, in cases where a feature source has multiple geometry attributes (with possibly different CRSs) or heterogenous CRSs across a single geometry attribute this may not be accurate.- Parameters:
application- the referenced applicationsimpleFeatureSource- the feature source used in the application- Returns:
nullwhen no transform is required and a valid transform otherwise- Throws:
org.geotools.api.referencing.FactoryException- when the CRS cannot be decoded
-
-