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

x33g5p2x  于2022-01-19 转载在 其他  
字(7.9k)|赞(0)|评价(0)|浏览(142)

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

Geometry.geometryChanged介绍

[英]Notifies this geometry that its coordinates have been changed by an external party (for example, via a CoordinateFilter). When this method is called the geometry will flush and/or update any derived information it has cached (such as its Envelope ). The operation is applied to all component Geometries.
[中]通知此几何体其坐标已被外部方更改(例如,通过CoordinateFilter)。调用此方法时,几何体将刷新和/或更新其缓存的任何派生信息(例如其封套)。该操作将应用于所有零部件几何图形。

代码示例

代码示例来源:origin: com.vividsolutions/jts

  1. /**
  2. * Adds the common coordinate bits back into a Geometry.
  3. * The coordinates of the Geometry are changed.
  4. *
  5. * @param geom the Geometry to which to add the common coordinate bits
  6. */
  7. public void addCommonBits(Geometry geom)
  8. {
  9. Translater trans = new Translater(commonCoord);
  10. geom.apply(trans);
  11. geom.geometryChanged();
  12. }

代码示例来源:origin: com.vividsolutions/jts

  1. /**
  2. * Removes the common coordinate bits from a Geometry.
  3. * The coordinates of the Geometry are changed.
  4. *
  5. * @param geom the Geometry from which to remove the common coordinate bits
  6. * @return the shifted Geometry
  7. */
  8. public Geometry removeCommonBits(Geometry geom)
  9. {
  10. if (commonCoord.x == 0.0 && commonCoord.y == 0.0)
  11. return geom;
  12. Coordinate invCoord = new Coordinate(commonCoord);
  13. invCoord.x = -invCoord.x;
  14. invCoord.y = -invCoord.y;
  15. Translater trans = new Translater(invCoord);
  16. geom.apply(trans);
  17. geom.geometryChanged();
  18. return geom;
  19. }

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

  1. public void geometryChanged() {
  2. geometry.geometryChanged();
  3. }

代码示例来源:origin: com.vividsolutions/jts-core

  1. /**
  2. * Adds the common coordinate bits back into a Geometry.
  3. * The coordinates of the Geometry are changed.
  4. *
  5. * @param geom the Geometry to which to add the common coordinate bits
  6. */
  7. public void addCommonBits(Geometry geom)
  8. {
  9. Translater trans = new Translater(commonCoord);
  10. geom.apply(trans);
  11. geom.geometryChanged();
  12. }

代码示例来源:origin: com.vividsolutions/jts-core

  1. /**
  2. * Removes the common coordinate bits from a Geometry.
  3. * The coordinates of the Geometry are changed.
  4. *
  5. * @param geom the Geometry from which to remove the common coordinate bits
  6. * @return the shifted Geometry
  7. */
  8. public Geometry removeCommonBits(Geometry geom)
  9. {
  10. if (commonCoord.x == 0.0 && commonCoord.y == 0.0)
  11. return geom;
  12. Coordinate invCoord = new Coordinate(commonCoord);
  13. invCoord.x = -invCoord.x;
  14. invCoord.y = -invCoord.y;
  15. Translater trans = new Translater(invCoord);
  16. geom.apply(trans);
  17. geom.geometryChanged();
  18. return geom;
  19. }

代码示例来源:origin: org.geoserver/kml

  1. /**
  2. * Extracts the
  3. *
  4. * @param sf
  5. * @param context
  6. * @return
  7. */
  8. private Geometry getFeatureGeometry(SimpleFeature sf, final double height) {
  9. Geometry geom = (Geometry) sf.getDefaultGeometry();
  10. if (!Double.isNaN(height) && height != 0) {
  11. geom.apply(new CoordinateFilter() {
  12. public void filter(Coordinate c) {
  13. c.setCoordinate(new Coordinate(c.x, c.y, height));
  14. }
  15. });
  16. geom.geometryChanged();
  17. }
  18. return geom;
  19. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

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

  1. /**
  2. * Switches the coordinates of a JTS Geometry.
  3. *
  4. * @param <G>
  5. * the geometry type
  6. * @param geometry
  7. * Geometry to switch coordinates.
  8. * @return Geometry with switched coordinates
  9. */
  10. public static <G extends Geometry> G switchCoordinateAxisOrder(G geometry) {
  11. if (geometry == null) {
  12. return null;
  13. }
  14. @SuppressWarnings("unchecked")
  15. G geom = (G) geometry.clone();
  16. geom.apply(COORDINATE_SWITCHING_FILTER);
  17. geom.geometryChanged();
  18. return geom;
  19. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. private void dragGeometryNode(int mx, int my) {
  2. Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  3. Geometry geo = geoms.get(0);
  4. Set<Geometry> set = editedNodes.keySet();
  5. for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
  6. Geometry subgeo = ite.next();
  7. Integer[] nodeIndexes = editedNodes.get(subgeo);
  8. for (int index : nodeIndexes) {
  9. subgeo.getCoordinates()[index].x = mouseCoord.x;
  10. subgeo.getCoordinates()[index].y = mouseCoord.y;
  11. }
  12. subgeo.geometryChanged();
  13. }
  14. clearMemoryLayer();
  15. setMemoryLayerGeometry(geoms);
  16. }

代码示例来源:origin: com.spatial4j/spatial4j

  1. geom.geometryChanged();//applies to call component Geometries
  2. return crossings[0];

代码示例来源:origin: harbby/presto-connectors

  1. geom.geometryChanged();//applies to call component Geometries
  2. return crossings[0];

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

  1. if (decimator != null) {
  2. decimator.decimateTransformGeneralize(this.geometry,this.mathTransform);
  3. this.geometry.geometryChanged();
  4. } else {
  5. this.geometry.geometryChanged();
  6. this.geometry.geometryChanged();

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

  1. geom.geometryChanged();
  2. geom.geometryChanged();
  3. shape = new LiteShape2(geom, null, null, false, false);

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

  1. representativeGeom.geometryChanged(); // djb -- jessie should

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing

  1. geometry.geometryChanged();

相关文章