Codota Logo
Geometry.reverse
Code IndexAdd Codota to your IDE (free)

How to use
reverse
method
in
com.vividsolutions.jts.geom.Geometry

Best Java code snippets using com.vividsolutions.jts.geom.Geometry.reverse (Showing top 16 results out of 315)

  • Common ways to obtain Geometry
private void myMethod () {
Geometry g =
  • Codota IconGeometryCollection gc;gc.getGeometryN(n)
  • Codota IconSimpleFeature feature;(Geometry) feature.getDefaultGeometry()
  • Codota IconString wellKnownText;new WKTReader().read(wellKnownText)
  • Smart code suggestions by Codota
}
origin: com.vividsolutions/jts

 /**
  * Creates a {@link GeometryCollection} with
  * every component reversed.
  * The order of the components in the collection are not reversed.
  *
  * @return a {@link GeometryCollection} in the reverse order
  */
 public Geometry reverse()
 {
  int n = geometries.length;
  Geometry[] revGeoms = new Geometry[n];
  for (int i = 0; i < geometries.length; i++) {
   revGeoms[i] = geometries[i].reverse();
  }
  return getFactory().createGeometryCollection(revGeoms);
 }
}
origin: com.vividsolutions/jts

 /**
  * Creates a {@link MultiPolygon} with
  * every component reversed.
  * The order of the components in the collection are not reversed.
  *
  * @return a MultiPolygon in the reverse order
  */
 public Geometry reverse()
 {
  int n = geometries.length;
  Polygon[] revGeoms = new Polygon[n];
  for (int i = 0; i < geometries.length; i++) {
   revGeoms[i] = (Polygon) geometries[i].reverse();
  }
  return getFactory().createMultiPolygon(revGeoms);
 }
}
origin: com.vividsolutions/jts

/**
 * Creates a {@link MultiLineString} in the reverse
 * order to this object.
 * Both the order of the component LineStrings
 * and the order of their coordinate sequences
 * are reversed.
 *
 * @return a {@link MultiLineString} in the reverse order
 */
public Geometry reverse()
{
 int nLines = geometries.length;
 LineString[] revLines = new LineString[nLines];
 for (int i = 0; i < geometries.length; i++) {
  revLines[nLines - 1 - i] = (LineString)geometries[i].reverse();
 }
 return getFactory().createMultiLineString(revLines);
}
origin: org.geotools/gt-render

public Geometry reverse() {
  return geometry.reverse();
}
origin: DataSystemsLab/GeoSpark

@Override
public Geometry reverse()
{
  Geometry g = this.centerGeometry.reverse();
  Circle newCircle = new Circle(g, this.radius);
  return newCircle;
}
origin: org.datasyslab/geospark

@Override
public Geometry reverse()
{
  Geometry g = this.centerGeometry.reverse();
  Circle newCircle = new Circle(g, this.radius);
  return newCircle;
}
origin: org.orbisgis/h2gis-functions

/**
 * Returns the geometry with vertex order reversed.
 *
 * @param geometry Geometry
 * @return geometry with vertex order reversed
 */
public static Geometry reverse(Geometry geometry) {
  if (geometry == null) {
    return null;
  }
  if (geometry instanceof MultiPoint) {
    return reverseMultiPoint((MultiPoint) geometry);
  }
  return geometry.reverse();
}
origin: org.orbisgis/h2gis

/**
 * Returns the geometry with vertex order reversed.
 *
 * @param geometry Geometry
 * @return geometry with vertex order reversed
 */
public static Geometry reverse(Geometry geometry) {
  if (geometry == null) {
    return null;
  }
  if (geometry instanceof MultiPoint) {
    return reverseMultiPoint((MultiPoint) geometry);
  }
  return geometry.reverse();
}
origin: com.vividsolutions/jts-core

 /**
  * Creates a {@link GeometryCollection} with
  * every component reversed.
  * The order of the components in the collection are not reversed.
  *
  * @return a {@link GeometryCollection} in the reverse order
  */
 public Geometry reverse()
 {
  int n = geometries.length;
  Geometry[] revGeoms = new Geometry[n];
  for (int i = 0; i < geometries.length; i++) {
   revGeoms[i] = geometries[i].reverse();
  }
  return getFactory().createGeometryCollection(revGeoms);
 }
}
origin: com.vividsolutions/jts-core

 /**
  * Creates a {@link MultiPolygon} with
  * every component reversed.
  * The order of the components in the collection are not reversed.
  *
  * @return a MultiPolygon in the reverse order
  */
 public Geometry reverse()
 {
  int n = geometries.length;
  Polygon[] revGeoms = new Polygon[n];
  for (int i = 0; i < geometries.length; i++) {
   revGeoms[i] = (Polygon) geometries[i].reverse();
  }
  return getFactory().createMultiPolygon(revGeoms);
 }
}
origin: com.vividsolutions/jts-core

/**
 * Creates a {@link MultiLineString} in the reverse
 * order to this object.
 * Both the order of the component LineStrings
 * and the order of their coordinate sequences
 * are reversed.
 *
 * @return a {@link MultiLineString} in the reverse order
 */
public Geometry reverse()
{
 int nLines = geometries.length;
 LineString[] revLines = new LineString[nLines];
 for (int i = 0; i < geometries.length; i++) {
  revLines[nLines - 1 - i] = (LineString)geometries[i].reverse();
 }
 return getFactory().createMultiLineString(revLines);
}
origin: org.orbisgis/h2gis-functions

  /**
   * Returns the MultiPoint with vertex order reversed. We do our own
   * implementation here because JTS does not handle it.
   *
   * @param mp MultiPoint
   * @return MultiPoint with vertex order reversed
   */
  public static Geometry reverseMultiPoint(MultiPoint mp) {
    int nPoints = mp.getNumGeometries();
    Point[] revPoints = new Point[nPoints];
    for (int i = 0; i < nPoints; i++) {
      revPoints[nPoints - 1 - i] = (Point) mp.getGeometryN(i).reverse();
    }
    return mp.getFactory().createMultiPoint(revPoints);
  }
}
origin: org.orbisgis/h2gis

  /**
   * Returns the MultiPoint with vertex order reversed. We do our own
   * implementation here because JTS does not handle it.
   *
   * @param mp MultiPoint
   * @return MultiPoint with vertex order reversed
   */
  public static Geometry reverseMultiPoint(MultiPoint mp) {
    int nPoints = mp.getNumGeometries();
    Point[] revPoints = new Point[nPoints];
    for (int i = 0; i < nPoints; i++) {
      revPoints[nPoints - 1 - i] = (Point) mp.getGeometryN(i).reverse();
    }
    return mp.getFactory().createMultiPoint(revPoints);
  }
}
origin: mapplus/spatial_statistics_for_geotools_udig

  public SimpleFeature next() throws NoSuchElementException {
    SimpleFeature feature = delegate.next();
    for (Object attribute : feature.getAttributes()) {
      if (attribute instanceof Geometry) {
        Geometry geometry = (Geometry) attribute;
        attribute = geometry.reverse();
      }
      builder.add(attribute);
    }
    return builder.buildFeature(feature.getID());
  }
}
origin: osmlab/atlas

final List<Geometry> reversedPieces = map.slice(2000000L, geometry.reverse());
Assert.assertEquals(4, reversedPieces.size());
Assert.assertEquals("DOM",
Assert.assertEquals(pieces.get(0), reversedPieces.get(0).reverse());
Assert.assertEquals(pieces.get(1), reversedPieces.get(3).reverse());
Assert.assertEquals(pieces.get(2), reversedPieces.get(2).reverse());
Assert.assertEquals(pieces.get(3), reversedPieces.get(1).reverse());
origin: mapplus/spatial_statistics_for_geotools_udig

} else {
  line = line.reverse();
  Double value = doValue.evaluate(source, Double.class);
  if (value == null) {
com.vividsolutions.jts.geomGeometryreverse

Javadoc

Computes a new geometry which has all component coordinate sequences in reverse order (opposite orientation) to this one.

Popular methods of Geometry

  • getEnvelopeInternal
    Gets an Envelope containing the minimum and maximum x and y values in this Geometry. If the geometr
  • getCoordinates
    Returns an array containing the values of all the vertices for this geometry. If the geometry is a c
  • isEmpty
    Tests whether the set of points covered by this Geometry is empty.
  • getCentroid
    Computes the centroid of this Geometry. The centroid is equal to the centroid of the set of componen
  • getGeometryN
    Returns an element Geometry from a GeometryCollection(or this, if the geometry is not a collection).
  • toText
    Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text
  • getNumGeometries
    Returns the number of Geometrys in a GeometryCollection(or 1, if the geometry is not a collection).
  • getFactory
    Gets the factory which contains the context in which this geometry was created.
  • getGeometryType
    Returns the name of this Geometry's actual class.
  • getSRID
    Returns the ID of the Spatial Reference System used by the Geometry. JTS supports Spatial Reference
  • getCoordinate
    Returns a vertex of this Geometry (usually, but not necessarily, the first one). The returned coordi
  • intersection
    Computes a Geometry representing the point-set which is common to both this Geometry and the other
  • getCoordinate,
  • intersection,
  • buffer,
  • contains,
  • getArea,
  • getEnvelope,
  • intersects,
  • union,
  • apply,
  • getLength

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Path (java.nio.file)
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JCheckBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now