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
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JTable (javax.swing)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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