本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
}