Java Code Examples for com.esri.core.geometry.Point#setXY()
The following examples show how to use
com.esri.core.geometry.Point#setXY() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BearingProcessor.java From defense-solutions-proofs-of-concept with Apache License 2.0 | 5 votes |
private MapGeometry GenerateGeometry(Double ox, Double oy, Double dx, Double dy, SpatialReference sr) { Point origin = new Point(); Point destination = new Point(); origin.setXY(ox, oy); destination.setXY(dx, dy); Polyline ln = new Polyline(); ln.startPath(origin); ln.lineTo(destination); MapGeometry mapGeo = new MapGeometry(ln, sr); return mapGeo; }
Example 2
Source File: BearingProcessor.java From defense-solutions-proofs-of-concept with Apache License 2.0 | 5 votes |
private MapGeometry GenerateGeometry(Double ox, Double oy, Double dx, Double dy, SpatialReference srin, SpatialReference srout) { Point origin = new Point(); Point destination = new Point(); origin.setXY(ox, oy); destination.setXY(dx, dy); Polyline ln = new Polyline(); ln.startPath(origin); ln.lineTo(destination); MapGeometry tmp_mapGeo = new MapGeometry(ln, srin); Geometry projected = GeometryEngine.project(tmp_mapGeo.getGeometry(), srin, srout); MapGeometry mapGeo = new MapGeometry(projected, srout); return mapGeo; }
Example 3
Source File: GeoJsonParser.java From arcgis-runtime-demo-java with Apache License 2.0 | 5 votes |
/** * Parses a point * Example: * [101.0, 0.0]. * @param parser * @return a point. * @throws Exception */ private Point parsePointCoordinates(JsonNode node) { Point p = new Point(); p.setXY(node.get(0).asDouble(), node.get(1).asDouble()); if (node.size() == 3) { p.setZ(node.get(2).asDouble()); } return p; }