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


Java Point.setY方法代码示例

本文整理汇总了Java中com.esri.core.geometry.Point.setY方法的典型用法代码示例。如果您正苦于以下问题:Java Point.setY方法的具体用法?Java Point.setY怎么用?Java Point.setY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.esri.core.geometry.Point的用法示例。


在下文中一共展示了Point.setY方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: constructBuffer

import com.esri.core.geometry.Point; //导入方法依赖的package包/类
private com.esri.ges.spatial.Geometry constructBuffer(double x, double y, double radius, String units, int wkidin, int wkidbuffer, int wkidout) throws GeometryException
{
	Point center = new Point();
	center.setX(x);
	center.setY(y);
	SpatialReference srIn = SpatialReference.create(wkidin);
	SpatialReference srBuffer = SpatialReference.create(wkidbuffer);
	SpatialReference srOut = SpatialReference.create(wkidout);
	UnitConverter uc = new UnitConverter();
	String c_name = uc.findConnonicalName(units);
	int unitout = uc.findWkid(c_name);
	Unit  u = new LinearUnit(unitout);
	Point centerProj = (Point) GeometryEngine.project(center, srIn, srBuffer);
	Geometry buffer = GeometryEngine.buffer(centerProj, srBuffer, radius, u);
	Geometry bufferout = GeometryEngine.project(buffer, srBuffer, srOut);
	String json = GeometryEngine.geometryToJson(srOut, bufferout);
	return spatial.fromJson(json);
	
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:20,代码来源:BufferProcessor.java

示例2: constructEllipse

import com.esri.core.geometry.Point; //导入方法依赖的package包/类
private MapGeometry constructEllipse(double x, double y, double majorAxis, double minorAxis, double rotation, int wkidin, int wkidbuffer, int wkidout)
{
	Point center = new Point();
	center.setX(x);
	center.setY(y);
	SpatialReference srIn = SpatialReference.create(wkidin);
	SpatialReference srBuffer = SpatialReference.create(wkidbuffer);
	SpatialReference srOut = SpatialReference.create(wkidout);
	UnitConverter uc = new UnitConverter();
	majorAxis = uc.Convert(majorAxis, units, srBuffer);
	minorAxis = uc.Convert(minorAxis, units, srBuffer);
	Point centerProj = (Point) GeometryEngine.project(center, srIn, srBuffer);
	GeometryUtility geoutil = new GeometryUtility();
	Polygon ellipse = geoutil.GenerateEllipse(centerProj, majorAxis, minorAxis, rotation);
	Geometry ellipseOut = GeometryEngine.project(ellipse, srBuffer, srOut);
	MapGeometry mapGeo = new MapGeometry(ellipseOut, srOut);
	return mapGeo;
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:19,代码来源:EllipseProcessor.java

示例3: constructBuffer

import com.esri.core.geometry.Point; //导入方法依赖的package包/类
private Geometry constructBuffer(double x, double y,
		double radius, String units, int wkidin, int wkidbuffer, int wkidout)
		 {
	Point center = new Point();
	center.setX(x);
	center.setY(y);
	SpatialReference srIn = SpatialReference.create(wkidin);
	SpatialReference srBuffer = SpatialReference.create(wkidbuffer);
	SpatialReference srOut = SpatialReference.create(wkidout);
	UnitConverter uc = new UnitConverter();
	String c_name = uc.findConnonicalName(units);
	int unitout = uc.findWkid(c_name);
	Unit u = LinearUnit.create(unitout);
	Point centerProj = (Point) GeometryEngine.project(center, srIn,
			srBuffer);
	Geometry buffer = GeometryEngine
			.buffer(centerProj, srBuffer, radius, u);
	Geometry bufferout = GeometryEngine.project(buffer, srBuffer, srOut);
	//String json = GeometryEngine.geometryToJson(srOut, bufferout);
	return bufferout;

}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:23,代码来源:BufferProcessor.java

示例4: constructEllipse

import com.esri.core.geometry.Point; //导入方法依赖的package包/类
private com.esri.ges.spatial.Geometry constructEllipse(double x, double y, double majorAxis, double minorAxis, double rotation, int wkidin, int wkidbuffer, int wkidout) throws GeometryException
{
	Point center = new Point();
	center.setX(x);
	center.setY(y);
	SpatialReference srIn = SpatialReference.create(wkidin);
	SpatialReference srBuffer = SpatialReference.create(wkidbuffer);
	SpatialReference srOut = SpatialReference.create(wkidout);
	Point centerProj = (Point) GeometryEngine.project(center, srIn, srBuffer);
	GeometryUtility geoutil = new GeometryUtility();
	Polygon ellipse = geoutil.GenerateEllipse(centerProj, majorAxis, minorAxis, rotation);
	Geometry ellipseOut = GeometryEngine.project(ellipse, srBuffer, srOut);
	String json = GeometryEngine.geometryToJson(srOut, ellipseOut);
	return spatial.fromJson(json);
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:16,代码来源:EllipseProcessor.java

示例5: constructRangeFan

import com.esri.core.geometry.Point; //导入方法依赖的package包/类
private Geometry constructRangeFan(double x, double y, double range,
		String unit, double bearing, double traversal)
		throws GeometryException {
	Polygon fan = new Polygon();
	Point center = new Point();
	center.setX(x);
	center.setY(y);
	// SpatialReference srIn = SpatialReference.create(wkidin);
	// SpatialReference srBuffer = SpatialReference.create(wkidbuffer);
	// SpatialReference srOut = SpatialReference.create(wkidout);
	Point centerProj = (Point) GeometryEngine.project(center, srIn,
			srBuffer);

	double centerX = centerProj.getX();
	double centerY = centerProj.getY();
	bearing = GeometryUtility.Geo2Arithmetic(bearing);
	double leftAngle = bearing - (traversal / 2);
	double rightAngle = bearing + (traversal / 2);
	int count = (int) Math.round(Math.abs(leftAngle - rightAngle));
	fan.startPath(centerProj);
	UnitConverter uc = new UnitConverter();
	range = uc.Convert(range, unit, srBuffer);
	for (int i = 0; i < count; ++i) {
		double d = Math.toRadians(leftAngle + i);
		double arcX = centerX + (range * Math.cos(d));
		double arcY = centerY + (range * Math.sin(d));
		Point arcPt = new Point(arcX, arcY);
		// arcPt = (Point) GeometryEngine.project(arcPt, srBuffer, srOut);
		fan.lineTo(arcPt);
	}
	fan.closeAllPaths();
	return fan;
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:34,代码来源:RangeFanProcessor.java

示例6: constructRangeFan

import com.esri.core.geometry.Point; //导入方法依赖的package包/类
private Geometry constructRangeFan(double x, double y, double range,
		String unit, double bearing, double traversal) throws Exception {
	try {
		Polygon fan = new Polygon();
		Point center = new Point();
		center.setX(x);
		center.setY(y);

		Point centerProj = (Point) GeometryEngine.project(center, srIn,
				srBuffer);

		double centerX = centerProj.getX();
		double centerY = centerProj.getY();
		bearing = GeometryUtility.Geo2Arithmetic(bearing);
		double leftAngle = bearing - (traversal / 2);
		double rightAngle = bearing + (traversal / 2);
		int count = (int) Math.round(Math.abs(leftAngle - rightAngle));
		fan.startPath(centerProj);
		UnitConverter uc = new UnitConverter();
		range = uc.Convert(range, unit, srBuffer);
		for (int i = 0; i < count; ++i) {
			double d = Math.toRadians(leftAngle + i);
			double arcX = centerX + (range * Math.cos(d));
			double arcY = centerY + (range * Math.sin(d));
			Point arcPt = new Point(arcX, arcY);
			fan.lineTo(arcPt);
		}
		fan.closeAllPaths();
		return fan;
	} catch (Exception e) {
		LOG.error(e.getMessage());
		throw e;
	}
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:35,代码来源:RangeFanProcessor.java


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