org.locationtech.jts.geom.Point.getFactory()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.locationtech.jts.geom.Point.getFactory()方法的一些代码示例,展示了Point.getFactory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.getFactory()方法的具体详情如下:
包路径:org.locationtech.jts.geom.Point
类名称:Point
方法名:getFactory

Point.getFactory介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

public GeometryFactory getFactory() {
  return point.getFactory();
}

代码示例来源:origin: geotools/geotools

Coordinate c = new Coordinate(centroid.getCoordinate());
Coordinate cc = centroid.getCoordinate();
Point testPoint = centroid.getFactory().createPoint(c);
while (radius < labelItem.getMaxDisplacement()) {
  for (int angle : displacementAngles) {

代码示例来源:origin: locationtech/jts

/**
 * Gets the boundary of this geometry.
 * Zero-dimensional geometries have no boundary by definition,
 * so an empty GeometryCollection is returned.
 *
 * @return an empty GeometryCollection
 * @see Geometry#getBoundary
 */
public Geometry getBoundary() {
 return getFactory().createGeometryCollection();
}

代码示例来源:origin: locationtech/jts

private void init(CoordinateSequence coordinates)
{
 if (coordinates == null) {
  coordinates = getFactory().getCoordinateSequenceFactory().create(new Coordinate[]{});
 }
 Assert.isTrue(coordinates.size() <= 1);
 this.coordinates = coordinates;
}

代码示例来源:origin: locationtech/jts

/**
 *  Constructs a <code>Point</code> with the given coordinate.
 *
 *@param  coordinate      the coordinate on which to base this <code>Point</code>
 *      , or <code>null</code> to create the empty geometry.
 *@param  precisionModel  the specification of the grid of allowable points
 *      for this <code>Point</code>
 *@param  SRID            the ID of the Spatial Reference System used by this
 *      <code>Point</code>
 * @deprecated Use GeometryFactory instead
 */
public Point(Coordinate coordinate, PrecisionModel precisionModel, int SRID) {
 super(new GeometryFactory(precisionModel, SRID));
 init(getFactory().getCoordinateSequenceFactory().create(
    coordinate != null ? new Coordinate[]{coordinate} : new Coordinate[]{}));
}

代码示例来源:origin: orbisgis/h2gis

private Point makePointValid(Point point) {
  CoordinateSequence sequence = point.getCoordinateSequence();
  GeometryFactory factory = point.getFactory();
  CoordinateSequenceFactory csFactory = factory.getCoordinateSequenceFactory();
  if (sequence.size() == 0) {
    return point;
  } else if (Double.isNaN(sequence.getOrdinate(0, 0)) || Double.isNaN(sequence.getOrdinate(0, 1))) {
    return factory.createPoint(csFactory.create(0, sequence.getDimension()));
  } else if (sequence.size() == 1) {
    return point;
  } else {
    throw new RuntimeException("JTS cannot create a point from a CoordinateSequence containing several points");
  }
}

代码示例来源:origin: Geomatys/geotoolkit

@Override
public MultiPoint apply(Point object) throws UnconvertibleObjectException {
  final MultiPoint geom = object.getFactory().createMultiPoint(new Point[]{object});
  geom.setSRID(object.getSRID());
  geom.setUserData(object.getUserData());
  return geom;
}

代码示例来源:origin: locationtech/geowave

/** farther point in longitudinal axis given a latitude */
private static Point farthestPoint(
  final CoordinateReferenceSystem crs,
  final Point point,
  final double meters) {
 final GeodeticCalculator calc = new GeodeticCalculator(crs);
 calc.setStartingGeographicPoint(point.getX(), point.getY());
 calc.setDirection(90, meters);
 Point2D dest2D = calc.getDestinationGeographicPoint();
 // if this flips over the date line then try the other direction
 if (dest2D.getX() < point.getX()) {
  calc.setDirection(-90, meters);
  dest2D = calc.getDestinationGeographicPoint();
 }
 return point.getFactory().createPoint(new Coordinate(dest2D.getX(), dest2D.getY()));
}

代码示例来源:origin: orbisgis/h2gis

GeometryFactory factory = pt.getFactory();

代码示例来源:origin: org.n52.arctic-sea/shetland

for (PointValuePair pointValuePair : pointValuePairs) {
  if (factory == null && pointValuePair.getPoint() != null) {
    factory = pointValuePair.getPoint().getFactory();

相关文章