本文整理了Java中org.locationtech.jts.geom.Point.getCoordinates()
方法的一些代码示例,展示了Point.getCoordinates()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.getCoordinates()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Point
类名称:Point
方法名:getCoordinates
暂无
代码示例来源:origin: geotools/geotools
public Coordinate[] getCoordinates() {
return point.getCoordinates();
}
代码示例来源:origin: geotools/geotools
static void encode(Element e, Point g, PrintHandler output) throws IOException {
if ((g == null) || (g.getCoordinate() == null)) {
throw new IOException("Bad Point Data");
}
AttributesImpl ai = getSrsNameAttribute(g);
if (e == null) {
output.startElement(GMLSchema.NAMESPACE, "Point", ai);
} else {
output.startElement(e.getNamespace(), e.getName(), ai);
}
encodeCoords(null, g.getCoordinates(), output);
if (e == null) {
output.endElement(GMLSchema.NAMESPACE, "Point");
} else {
output.endElement(e.getNamespace(), e.getName());
}
}
代码示例来源:origin: locationtech/jts
/**
* Checks validity of a Point.
*/
private void checkValid(Point g)
{
checkInvalidCoordinates(g.getCoordinates());
}
/**
代码示例来源:origin: locationtech/jts
/**
* Add a Point to the graph.
*/
private void addPoint(Point p)
{
// a zero or negative width buffer of a line/point is empty
if (distance <= 0.0)
return;
Coordinate[] coord = p.getCoordinates();
Coordinate[] curve = curveBuilder.getLineCurve(coord, distance);
addCurve(curve, Location.EXTERIOR, Location.INTERIOR);
}
代码示例来源:origin: orbisgis/h2gis
/**
* Interpolate each linestring of the multilinestring.
*
* @param multiLineString
* @return
*/
private static MultiLineString linearZInterpolation(MultiLineString multiLineString) {
int nbGeom = multiLineString.getNumGeometries();
LineString[] lines = new LineString[nbGeom];
for (int i = 0; i < nbGeom; i++) {
LineString subGeom = (LineString) multiLineString.getGeometryN(i);
double startz = subGeom.getStartPoint().getCoordinates()[0].z;
double endz = subGeom.getEndPoint().getCoordinates()[0].z;
double length = subGeom.getLength();
subGeom.apply(new LinearZInterpolationFilter(startz, endz, length));
lines[i] = subGeom;
}
return FACTORY.createMultiLineString(lines);
}
代码示例来源:origin: locationtech/jts
assertEquals(0, (geometryFactory.createMultiPoint((Point[]) null)).getNumPoints());
assertEquals(0, (geometryFactory.createPoint((Coordinate)null)).getCoordinates().length);
assertEquals(0, (geometryFactory.createLinearRing((CoordinateSequence)null)).getCoordinates().length);
assertEquals(0, (geometryFactory.createLineString((Coordinate[])null)).getCoordinates().length);
内容来源于网络,如有侵权,请联系作者删除!