当前位置: 首页>>代码示例>>Java>>正文


Java TransformException.printStackTrace方法代码示例

本文整理汇总了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;
	}
 
开发者ID:twak,项目名称:chordatlas,代码行数:17,代码来源:SatUtils.java

示例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);
}
 
开发者ID:conveyal,项目名称:gtfs-lib,代码行数:20,代码来源:GeoUtils.java

示例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;
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:17,代码来源:Projection.java

示例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);
		
	}
 
开发者ID:SGroe,项目名称:vgi-analytics-framework,代码行数:36,代码来源:VgiAnalysisUpdateGeometry.java

示例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);
}
 
开发者ID:conveyal,项目名称:gtfs-lib,代码行数:13,代码来源:GeoUtils.java

示例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;
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:15,代码来源:Projection.java


注:本文中的org.opengis.referencing.operation.TransformException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。