congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Geometry.normalize
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.vividsolutions/jts

public void normalize() {
 for (int i = 0; i < geometries.length; i++) {
  geometries[i].normalize();
 }
 Arrays.sort(geometries);
}
origin: com.vividsolutions/jts

/**
 * Creates a new Geometry which is a normalized
 * copy of this Geometry. 
 * 
 * @return a normalized copy of this geometry.
 * @see #normalize()
 */
public Geometry norm()
{
 Geometry copy = (Geometry) clone();
 copy.normalize();
 return copy;
}
 
origin: org.orbisgis/h2gis

  /**
   * Converts this Geometry to normal form (canonical form).
   * 
   * @param geometry
   * @return 
   */
  public static Geometry normalize(Geometry geometry) {
    if(geometry == null){
      return null;
    }
    geometry.normalize();
    return geometry;
  }
}
origin: org.geotools/gt-render

public void normalize() {
  geometry.normalize();
}
origin: org.orbisgis/h2gis-functions

  /**
   * Converts this Geometry to normal form (canonical form).
   * 
   * @param geometry
   * @return 
   */
  public static Geometry normalize(Geometry geometry) {
    if(geometry == null){
      return null;
    }
    geometry.normalize();
    return geometry;
  }
}
origin: com.vividsolutions/jts-core

public void normalize() {
 for (int i = 0; i < geometries.length; i++) {
  geometries[i].normalize();
 }
 Arrays.sort(geometries);
}
origin: org.locationtech.geogig/geogig-core

Geometry normalizeIfNeeded(Geometry value) {
  if (value instanceof Polygon) {
    value.normalize();
  } else if (value instanceof MultiPolygon
      || GeometryCollection.class.equals(value.getClass())) {// ignore
                                  // multipoint/linestring
    normalize((GeometryCollection) value);
  }
  return value;
}
origin: com.vividsolutions/jts-core

/**
 * Creates a new Geometry which is a normalized
 * copy of this Geometry. 
 * 
 * @return a normalized copy of this geometry.
 * @see #normalize()
 */
public Geometry norm()
{
 Geometry copy = (Geometry) clone();
 copy.normalize();
 return copy;
}
 
origin: stackoverflow.com

if(geom instanceof Polygon){
  if(geom.isValid()){
    geom.normalize(); // validate does not pick up rings in the wrong order - this will fix that
    return geom; // If the polygon is valid just return it
}else if(geom instanceof MultiPolygon){
  if(geom.isValid()){
    geom.normalize(); // validate does not pick up rings in the wrong order - this will fix that
    return geom; // If the multipolygon is valid just return it
origin: com.googlecode.jaitools/jt-utils

    PRECISION.makePrecise(cc1);
  cloned.normalize();
} else {
  geomFactory = new GeometryFactory();
com.vividsolutions.jts.geomGeometrynormalize

Javadoc

Converts this Geometry to normal form (or canonical form ). Normal form is a unique representation for Geometry s. It can be used to test whether two Geometrys are equal in a way that is independent of the ordering of the coordinates within them. Normal form equality is a stronger condition than topological equality, but weaker than pointwise equality. The definitions for normal form use the standard lexicographical ordering for coordinates. "Sorted in order of coordinates" means the obvious extension of this ordering to sequences of coordinates.

NOTE that this method mutates the value of this geometry in-place. If this is not safe and/or wanted, the geometry should be cloned prior to normalization.

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

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now