com.vividsolutions.jts.geom.Polygon.getInteriorPoint()方法的使用及代码示例

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

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

Polygon.getInteriorPoint介绍

暂无

代码示例

代码示例来源:origin: org.geotools/gt-render

public Point getInteriorPoint() {
  return polygon.getInteriorPoint();
}

代码示例来源:origin: org.orbisgis/orbisgis-core

/**
 * Splits a Polygon using a LineString.
 *
 * @param polygon
 * @param lineString
 * @return
 */
public static Collection<Polygon> polygonWithLineSplitter(Polygon polygon, LineString lineString) {
  Collection<Polygon> polygons = splitPolygonizer(polygon, lineString);
  if (polygons != null && polygons.size() > 1) {
    List<Polygon> pols = new ArrayList<Polygon>();
    for (Polygon pol : polygons) {
      if (polygon.contains(pol.getInteriorPoint())) {
        pols.add(pol);
      }
    }
    return pols;
  }
  return null;
}

代码示例来源:origin: org.orbisgis/h2gis-functions

/**
 * Splits a Polygon using a LineString.
 *
 * @param polygon
 * @param lineString
 * @return
 */
private static Collection<Polygon> polygonWithLineSplitter(Polygon polygon, LineString lineString) throws SQLException {
  Collection<Polygon> polygons = splitPolygonizer(polygon, lineString);
  if (polygons != null && polygons.size() > 1) {
    List<Polygon> pols = new ArrayList<Polygon>();
    for (Polygon pol : polygons) {
      if (polygon.contains(pol.getInteriorPoint())) {
        pols.add(pol);
      }
    }
    return pols;
  }
  return null;
}

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

/**
 * Splits a Polygon using a LineString.
 *
 * @param polygon
 * @param lineString
 * @return
 */
private static Collection<Polygon> polygonWithLineSplitter(Polygon polygon, LineString lineString) throws SQLException {
  Collection<Polygon> polygons = splitPolygonizer(polygon, lineString);
  if (polygons != null && polygons.size() > 1) {
    List<Polygon> pols = new ArrayList<Polygon>();
    for (Polygon pol : polygons) {
      if (polygon.contains(pol.getInteriorPoint())) {
        pols.add(pol);
      }
    }
    return pols;
  }
  return null;
}

代码示例来源:origin: osmlab/atlas

/**
 * Returns a location that is the closest point within the polygon to the centroid. The function
 * delegates to the Geometry class which delegates to the InteriorPointPoint class. You can see
 * the javadocs in the link below. <a href=
 * "http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/algorithm/InteriorPointPoint">
 * http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/algorithm/InteriorPointPoint
 * </a> .html
 *
 * @return location that is the closest point within the polygon to the centroid
 */
public Location interiorCenter()
{
  final Point point = JTS_POLYGON_CONVERTER.convert(this).getInteriorPoint();
  return new JtsLocationConverter().backwardConvert(point.getCoordinate());
}

代码示例来源:origin: kiselev-dv/gazetteer

if (polygon.contains(p.getInteriorPoint()))
  output.add(p);

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

for (Object object : polygonizer.getPolygons()) {
  Polygon polygon = (Polygon) object;
  Coordinate p = polygon.getInteriorPoint().getCoordinate();
  int location = RayCrossingCounter.locatePointInRing(p, ring.getCoordinateSequence());
  if (location == Location.INTERIOR) {

代码示例来源:origin: org.orbisgis/h2gis-functions

for (Object object : polygonizer.getPolygons()) {
  Polygon polygon = (Polygon) object;
  Coordinate p = polygon.getInteriorPoint().getCoordinate();
  int location = RayCrossingCounter.locatePointInRing(p, ring.getCoordinateSequence());
  if (location == Location.INTERIOR) {

相关文章