本文整理匯總了Java中org.opengis.referencing.operation.TransformException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java TransformException.printStackTrace方法的具體用法?Java TransformException.printStackTrace怎麽用?Java TransformException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.opengis.referencing.operation.TransformException
的用法示例。
在下文中一共展示了TransformException.printStackTrace方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: worldToLLong
import org.opengis.referencing.operation.TransformException; //導入方法依賴的package包/類
public static Point2d worldToLLong( Tweed tweed, Point3d cen ) {
Point3d out = new Point3d( cen );
TweedSettings.settings.fromOrigin.transform( out );
try {
double[] latLong = new double[3];
toLatLong.transform( new double[] { out.x, out.y, out.z }, 0, latLong, 0, 1 );
return new Point2d( latLong[ 0 ], latLong[ 1 ] );
} catch ( TransformException e ) {
e.printStackTrace();
}
return null;
}
示例2: convertLonLatToEuclidean
import org.opengis.referencing.operation.TransformException; //導入方法依賴的package包/類
@Deprecated
public static ProjectedCoordinate convertLonLatToEuclidean(
Coordinate lonlat) {
final MathTransform transform = getTransform(lonlat);
final Coordinate to = new Coordinate();
// the transform seems to swap the lat lon pairs
Coordinate latlon = new Coordinate(lonlat.y, lonlat.x);
try {
JTS.transform(latlon, to,
transform);
} catch (final TransformException e) {
e.printStackTrace();
}
return new ProjectedCoordinate(transform, new Coordinate(to.y, to.x), lonlat);
}
示例3: transform
import org.opengis.referencing.operation.TransformException; //導入方法依賴的package包/類
@Override
public Geometry transform(final Geometry g) {
// Remove uselessly complicated multigeometries
if (g instanceof GeometryCollection && g.getNumGeometries() == 1) { return transform(g.getGeometryN(0)); }
Geometry geom = GeometryUtils.GEOMETRY_FACTORY.createGeometry(g);
if (transformer != null) {
try {
geom = transformer.transform(geom);
} catch (final TransformException e) {
e.printStackTrace();
}
}
translate(geom);
convertUnit(geom);
return geom;
}
示例4: analyze
import org.opengis.referencing.operation.TransformException; //導入方法依賴的package包/類
@Override
public void analyze(IVgiOperation operation, Date timePeriod) {
if (!operation.getVgiOperationType().equals(VgiOperationType.OP_ADD_NODE) && !operation.getVgiOperationType().equals(VgiOperationType.OP_MODIFY_WAY_COORDINATE)) return;
if (!data.containsKey(operation.getVersion())) {
data.put(operation.getVersion(), new GeometryUpdates());
}
GeometryUpdates geomUpdates = data.get(operation.getVersion());
Point currentCoordinate = null;
try {
// transform = CRS.findMathTransform(sourceCRS, targetCRS, true);
Point point = geometryFactory.createPoint(operation.getCoordinate());
point.setSRID(4326);
// MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);
currentCoordinate = (Point)JTS.transform( point, transform);
// } catch (FactoryException e) {
// e.printStackTrace();
} catch (TransformException e) {
e.printStackTrace();
}
if (geomUpdates.coordinates.containsKey(operation.getRefId())) {
geomUpdates.updatesCount++;
geomUpdates.sumCoordinateDelta += geomUpdates.coordinates.get(operation.getRefId()).distance(currentCoordinate);
}
geomUpdates.coordinates.put(operation.getRefId(), currentCoordinate);
}
示例5: convertToLonLat
import org.opengis.referencing.operation.TransformException; //導入方法依賴的package包/類
@Deprecated
public static Coordinate convertToLonLat(
MathTransform transform, Coordinate xy) {
final Coordinate to = new Coordinate();
final Coordinate yx = new Coordinate(xy.y, xy.x);
try {
JTS.transform(yx, to, transform.inverse());
} catch (final TransformException e) {
e.printStackTrace();
}
return new Coordinate(to.y, to.x);
}
示例6: inverseTransform
import org.opengis.referencing.operation.TransformException; //導入方法依賴的package包/類
@Override
public Geometry inverseTransform(final Geometry g) {
Geometry geom = GeometryUtils.GEOMETRY_FACTORY.createGeometry(g);
inverseConvertUnit(geom);
inverseTranslate(geom);
if (inverseTransformer != null) {
try {
geom = inverseTransformer.transform(geom);
} catch (final TransformException e) {
e.printStackTrace();
}
}
return geom;
}