本文整理了Java中org.locationtech.jts.geom.GeometryFactory.createMultiPointFromCoords()
方法的一些代码示例,展示了GeometryFactory.createMultiPointFromCoords()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeometryFactory.createMultiPointFromCoords()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.GeometryFactory
类名称:GeometryFactory
方法名:createMultiPointFromCoords
[英]Creates a MultiPoint using the given Coordinates. A null or empty array will create an empty MultiPoint.
[中]使用给定坐标创建多点。空数组或空数组将创建空多点。
代码示例来源:origin: graphhopper/graphhopper
MultiPoint exploredPoints = geometryFactory.createMultiPointFromCoords(z1.keySet().toArray(new Coordinate[0]));
return wrap(exploredPoints);
} else {
router.calcLabelsAndNeighbors(queryResult.getClosestNode(), -1, initialTime, blockedRouteTypes, sptVisitor, label -> label.currentTime <= targetZ);
MultiPoint exploredPointsAndNeighbors = geometryFactory.createMultiPointFromCoords(z1.keySet().toArray(new Coordinate[0]));
代码示例来源:origin: locationtech/geowave
private MultiPoint readMultiPoint(PrecisionReader precision, byte metadata, DataInput input)
throws IOException {
if ((metadata & TWKBUtils.EMPTY_GEOMETRY) != 0) {
return GeometryUtils.GEOMETRY_FACTORY.createMultiPoint();
}
Coordinate[] points = precision.readPointArray(input);
return GeometryUtils.GEOMETRY_FACTORY.createMultiPointFromCoords(points);
}
代码示例来源:origin: org.n52.arctic-sea/svalbard-json
protected MultiPoint decodeMultiPoint(JsonNode node, GeometryFactory fac)
throws GeoJSONDecodingException {
Coordinate[] coordinates = decodeCoordinates(requireCoordinates(node));
return fac.createMultiPointFromCoords(coordinates);
}
代码示例来源:origin: bjornharrtell/jts2geojson
Geometry convert(MultiPoint multiPoint, GeometryFactory factory) {
return factory.createMultiPointFromCoords(convert(multiPoint.getCoordinates()));
}
代码示例来源:origin: org.wololo/jts2geojson
Geometry convert(MultiPoint multiPoint, GeometryFactory factory) {
return factory.createMultiPointFromCoords(convert(multiPoint.getCoordinates()));
}
代码示例来源:origin: locationtech/jts
public Geometry getGeometry()
{
Coordinate[] pts = new Coordinate[numPts];
int i = 0;
while (i < numPts) {
Coordinate p = createRandomCoord(getExtent());
if (extentLocator != null && ! isInExtent(p))
continue;
pts[i++] = p;
}
return geomFactory.createMultiPointFromCoords(pts);
}
代码示例来源:origin: locationtech/jts
public static void main(String[] args)
throws Exception
{
// create a factory using default values (e.g. floating precision)
GeometryFactory fact = new GeometryFactory();
Point p1 = fact.createPoint(new Coordinate(0,0));
System.out.println(p1);
Point p2 = fact.createPoint(new Coordinate(1,1));
System.out.println(p2);
MultiPoint mpt = fact.createMultiPointFromCoords(new Coordinate[] { new Coordinate(0,0), new Coordinate(1,1) } );
System.out.println(mpt);
}
}
代码示例来源:origin: locationtech/jts
private Geometry boundaryMultiLineString(MultiLineString mLine)
{
if (geom.isEmpty()) {
return getEmptyMultiPoint();
}
Coordinate[] bdyPts = computeBoundaryCoordinates(mLine);
// return Point or MultiPoint
if (bdyPts.length == 1) {
return geomFact.createPoint(bdyPts[0]);
}
// this handles 0 points case as well
return geomFact.createMultiPointFromCoords(bdyPts);
}
代码示例来源:origin: locationtech/jts
ptComp = geomFact.createMultiPointFromCoords(coords);
代码示例来源:origin: ElectronicChartCentre/java-vector-tile
geometry = gf.createPoint(allCoords.get(0));
} else if (allCoords.size() > 1) {
geometry = gf.createMultiPointFromCoords(allCoords.toArray(new Coordinate[allCoords.size()]));
代码示例来源:origin: locationtech/jts
return geomFactory.createMultiPointFromCoords(pts);
代码示例来源:origin: locationtech/jts
return geometryFactory.createMultiPointFromCoords(null);
if (shapeType != myShapeType)
return geometryFactory.createMultiPointFromCoords(coords);
内容来源于网络,如有侵权,请联系作者删除!