Tabnine Logo
Geometry.compareTo
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.geotools/gt-render

public int compareTo(Object o) {
  return geometry.compareTo(o);
}
origin: org.geotools/gt-render

public int compareTo(Object o, CoordinateSequenceComparator comp) {
  return geometry.compareTo(o, comp);
}
origin: NationalSecurityAgency/datawave

@Override
public int compareTo(Geometry other) {
  int cmp;
  if (geometry == null) {
    if (other == null || other.geometry == null) {
      cmp = 0;
    }
    cmp = -1;
  }
  cmp = geometry.compareTo(other.geometry);
  if (0 == cmp) {
    return compareMetadata(other);
  }
  
  return cmp;
}

origin: org.wowtools/h2

@Override
protected int compareSecure(Value v, CompareMode mode) {
  Geometry g = ((ValueGeometry) v).getGeometryNoCopy();
  return getGeometryNoCopy().compareTo(g);
}
origin: com.eventsourcing/h2

@Override
protected int compareSecure(Value v, CompareMode mode) {
  Geometry g = ((ValueGeometry) v).getGeometryNoCopy();
  return getGeometryNoCopy().compareTo(g);
}
origin: com.vividsolutions/jts-core

public int compare(Object obj0, Object obj1) {
 EdgeRing r0 = (EdgeRing) obj0;
 EdgeRing r1 = (EdgeRing) obj1;
 return r0.getRing().getEnvelope().compareTo(r1.getRing().getEnvelope());
}
 
origin: org.fudaa.framework.ctulu/ctulu-gis

/**
 * Recopie de GeometryCollection.
 */
protected int compareToSameClass(final Object _o, final CoordinateSequenceComparator _comp) {
 final GISCollection gc = (GISCollection) _o;
 final int n1 = getNumGeometries();
 final int n2 = gc.getNumGeometries();
 int i = 0;
 while (i < n1 && i < n2) {
  final Geometry thisGeom = getGeometryN(i);
  final Geometry otherGeom = gc.getGeometryN(i);
  final int holeComp = thisGeom.compareTo(otherGeom, _comp);
  if (holeComp != 0) {
   return holeComp;
  }
  i++;
 }
 if (i < n1) {
  return 1;
 }
 if (i < n2) {
  return -1;
 }
 return 0;
}
com.vividsolutions.jts.geomGeometrycompareTo

Javadoc

Returns whether this Geometry is greater than, equal to, or less than another Geometry.

If their classes are different, they are compared using the following ordering:

  • Point (lowest)
  • MultiPoint
  • LineString
  • LinearRing
  • MultiLineString
  • Polygon
  • MultiPolygon
  • GeometryCollection (highest)
If the two Geometrys have the same class, their first elements are compared. If those are the same, the second elements are compared, etc.

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

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JList (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Github Copilot alternatives
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