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

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

本文整理了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

/**
 * Adds the common coordinate bits back into a Geometry.
 * The coordinates of the Geometry are changed.
 *
 * @param geom the Geometry to which to add the common coordinate bits
 */
public void addCommonBits(Geometry geom)
{
 Translater trans = new Translater(commonCoord);
 geom.apply(trans);
 geom.geometryChanged();
}

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

/**
 * Removes the common coordinate bits from a Geometry.
 * The coordinates of the Geometry are changed.
 *
 * @param geom the Geometry from which to remove the common coordinate bits
 * @return the shifted Geometry
 */
public Geometry removeCommonBits(Geometry geom)
{
 if (commonCoord.x == 0.0 && commonCoord.y == 0.0)
  return geom;
 Coordinate invCoord = new Coordinate(commonCoord);
 invCoord.x = -invCoord.x;
 invCoord.y = -invCoord.y;
 Translater trans = new Translater(invCoord);
 geom.apply(trans);
 geom.geometryChanged();
 return geom;
}

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

public void geometryChanged() {
  geometry.geometryChanged();
}

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

/**
 * Adds the common coordinate bits back into a Geometry.
 * The coordinates of the Geometry are changed.
 *
 * @param geom the Geometry to which to add the common coordinate bits
 */
public void addCommonBits(Geometry geom)
{
 Translater trans = new Translater(commonCoord);
 geom.apply(trans);
 geom.geometryChanged();
}

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

/**
 * Removes the common coordinate bits from a Geometry.
 * The coordinates of the Geometry are changed.
 *
 * @param geom the Geometry from which to remove the common coordinate bits
 * @return the shifted Geometry
 */
public Geometry removeCommonBits(Geometry geom)
{
 if (commonCoord.x == 0.0 && commonCoord.y == 0.0)
  return geom;
 Coordinate invCoord = new Coordinate(commonCoord);
 invCoord.x = -invCoord.x;
 invCoord.y = -invCoord.y;
 Translater trans = new Translater(invCoord);
 geom.apply(trans);
 geom.geometryChanged();
 return geom;
}

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

/**
 * Extracts the
 * 
 * @param sf
 * @param context
 * @return
 */
private Geometry getFeatureGeometry(SimpleFeature sf, final double height) {
  Geometry geom = (Geometry) sf.getDefaultGeometry();
  if (!Double.isNaN(height) && height != 0) {
    geom.apply(new CoordinateFilter() {
      public void filter(Coordinate c) {
        c.setCoordinate(new Coordinate(c.x, c.y, height));
      }
    });
    geom.geometryChanged();
  }
  return geom;
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

/**
 * Switches the coordinates of a JTS Geometry.
 *
 * @param <G>
 *            the geometry type
 * @param geometry
 *            Geometry to switch coordinates.
 * @return Geometry with switched coordinates
 */
public static <G extends Geometry> G switchCoordinateAxisOrder(G geometry) {
  if (geometry == null) {
    return null;
  }
  @SuppressWarnings("unchecked")
  G geom = (G) geometry.clone();
  geom.apply(COORDINATE_SWITCHING_FILTER);
  geom.geometryChanged();
  return geom;
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

private void dragGeometryNode(int mx, int my) {
  Coordinate mouseCoord = map2D.getRenderingStrategy().toMapCoord(mx, my);
  Geometry geo = geoms.get(0);
  Set<Geometry> set = editedNodes.keySet();
  for (Iterator<Geometry> ite = set.iterator(); ite.hasNext();) {
    Geometry subgeo = ite.next();
    Integer[] nodeIndexes = editedNodes.get(subgeo);
    for (int index : nodeIndexes) {
      subgeo.getCoordinates()[index].x = mouseCoord.x;
      subgeo.getCoordinates()[index].y = mouseCoord.y;
    }
    subgeo.geometryChanged();
  }
  clearMemoryLayer();
  setMemoryLayerGeometry(geoms);
}

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

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

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

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

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

if (decimator != null) {
  decimator.decimateTransformGeneralize(this.geometry,this.mathTransform);
  this.geometry.geometryChanged();
} else {
    this.geometry.geometryChanged();
    this.geometry.geometryChanged();

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

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

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

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

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

geometry.geometryChanged();

相关文章