本文整理了Java中com.vividsolutions.jts.geom.Polygon.apply()
方法的一些代码示例,展示了Polygon.apply()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Polygon.apply()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Polygon
类名称:Polygon
方法名:apply
暂无
代码示例来源:origin: com.vividsolutions/jts
private Geometry getPolygonLines(Geometry g)
{
List lines = new ArrayList();
LinearComponentExtracter lineExtracter = new LinearComponentExtracter(lines);
List polys = PolygonExtracter.getPolygons(g);
for (Iterator i = polys.iterator(); i.hasNext(); ) {
Polygon poly = (Polygon) i.next();
poly.apply(lineExtracter);
}
return g.getFactory().buildGeometry(lines);
}
代码示例来源:origin: org.geotools/gt-render
public void apply(CoordinateSequenceFilter filter) {
polygon.apply(filter);
}
代码示例来源:origin: org.geotools/gt-render
public void apply(CoordinateFilter filter) {
polygon.apply(filter);
}
代码示例来源:origin: org.geotools/gt-render
public void apply(GeometryComponentFilter filter) {
polygon.apply(filter);
}
代码示例来源:origin: org.geotools/gt-render
public void apply(GeometryFilter filter) {
polygon.apply(filter);
}
代码示例来源:origin: com.vividsolutions/jts-core
private Geometry getPolygonLines(Geometry g)
{
List lines = new ArrayList();
LinearComponentExtracter lineExtracter = new LinearComponentExtracter(lines);
List polys = PolygonExtracter.getPolygons(g);
for (Iterator i = polys.iterator(); i.hasNext(); ) {
Polygon poly = (Polygon) i.next();
poly.apply(lineExtracter);
}
return g.getFactory().buildGeometry(lines);
}
代码示例来源:origin: org.orbisgis/h2gis
/**
* Drape a polygon on a set of triangles
* @param p
* @param triangles
* @param sTRtree
* @return
*/
public static Geometry drapePolygon(Polygon p, Geometry triangles, STRtree sTRtree) {
GeometryFactory factory = p.getFactory();
//Split the triangles in lines to perform all intersections
Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true);
Polygon splittedP = processPolygon(p, triangleLines, factory);
CoordinateSequenceFilter drapeFilter = new DrapeFilter(sTRtree);
splittedP.apply(drapeFilter);
return splittedP;
}
代码示例来源:origin: org.geotools/gt-main
offseted.apply(new OffsetOrdinateFilter(0, extrusion));
faces.add(0, (Polygon) geom);
faces.add(offseted);
if(g instanceof Polygon) {
Polygon offseted = (Polygon) g.clone();
offseted.apply(new OffsetOrdinateFilter(0, extrusion));
faces.add(0, (Polygon) g);
faces.add(offseted);
代码示例来源:origin: org.orbisgis/h2gis-functions
/**
* Extract the roof of a polygon
*
* @param polygon
* @param height
* @return
*/
public static Polygon extractRoof(Polygon polygon, double height) {
GeometryFactory factory = polygon.getFactory();
Polygon roofP = (Polygon) polygon.clone();
roofP.apply(new TranslateCoordinateSequenceFilter(height));
final LinearRing shell = factory.createLinearRing(getCounterClockWise(roofP.getExteriorRing()).getCoordinates());
final int nbOfHoles = roofP.getNumInteriorRing();
final LinearRing[] holes = new LinearRing[nbOfHoles];
for (int i = 0; i < nbOfHoles; i++) {
holes[i] = factory.createLinearRing(getClockWise(
roofP.getInteriorRingN(i)).getCoordinates());
}
return factory.createPolygon(shell, holes);
}
代码示例来源:origin: org.orbisgis/h2gis
/**
* Extract the roof of a polygon
*
* @param polygon
* @param height
* @return
*/
public static Polygon extractRoof(Polygon polygon, double height) {
GeometryFactory factory = polygon.getFactory();
Polygon roofP = (Polygon) polygon.clone();
roofP.apply(new TranslateCoordinateSequenceFilter(height));
final LinearRing shell = factory.createLinearRing(getCounterClockWise(roofP.getExteriorRing()).getCoordinates());
final int nbOfHoles = roofP.getNumInteriorRing();
final LinearRing[] holes = new LinearRing[nbOfHoles];
for (int i = 0; i < nbOfHoles; i++) {
holes[i] = factory.createLinearRing(getClockWise(
roofP.getInteriorRingN(i)).getCoordinates());
}
return factory.createPolygon(shell, holes);
}
代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig
polygon.apply(affineTrans);
代码示例来源:origin: org.geotools/gt-process-raster
polygon.setUserData(null);
polygon.apply(jtsTransformation);
内容来源于网络,如有侵权,请联系作者删除!