Package org.gdal.ogr

## Class Geometry

- java.lang.Object
- - org.gdal.ogr.Geometry

- All Implemented Interfaces:
    `java.lang.Cloneable`

      public class Geometry
      extends java.lang.Object
      implements java.lang.Cloneable

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Geometry​(int type)` |
    `Geometry​(int type, java.lang.String wkt, byte[] nLen, java.lang.String gml)` |
    `Geometry​(long cPtr, boolean cMemoryOwn)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `AddGeometry​(Geometry other)` |
    `int` | `AddGeometryDirectly​(Geometry other_disown)` |
    `void` | `AddPoint​(double x, double y)` |
    `void` | `AddPoint​(double x, double y, double z)` |
    `void` | `AddPoint_2D​(double x, double y)` |
    `void` | `AddPointM​(double x, double y, double m)` |
    `void` | `AddPointZM​(double x, double y, double z, double m)` |
    `double` | `Area​()` |
    `void` | `AssignSpatialReference​(SpatialReference reference)` |
    `Geometry` | `Boundary​()` |
    `Geometry` | `Buffer​(double distance)` |
    `Geometry` | `Buffer​(double distance, int quadsecs)` |
    `Geometry` | `Centroid​()` |
    `java.lang.Object` | `clone​()` |
    `Geometry` | `Clone​()` |
    `void` | `CloseRings​()` |
    `boolean` | `Contains​(Geometry other)` |
    `Geometry` | `ConvexHull​()` |
    `int` | `CoordinateDimension​()` |
    `static Geometry` | `CreateFromGML​(java.lang.String gml)` |
    `static Geometry` | `CreateFromJson​(java.lang.String json)` |
    `static Geometry` | `CreateFromWkb​(byte[] wkb)` |
    `static Geometry` | `CreateFromWkt​(java.lang.String wkt)` |
    `boolean` | `Crosses​(Geometry other)` |
    `Geometry` | `DelaunayTriangulation​()` |
    `Geometry` | `DelaunayTriangulation​(double dfTolerance)` |
    `Geometry` | `DelaunayTriangulation​(double dfTolerance, int bOnlyEdges)` |
    `void` | `delete​()` |
    `Geometry` | `Difference​(Geometry other)` |
    `boolean` | `Disjoint​(Geometry other)` |
    `double` | `Distance​(Geometry other)` |
    `double` | `Distance3D​(Geometry other)` |
    `void` | `Empty​()` |
    `boolean` | `Equal​(Geometry other)` |
    `boolean` | `equals​(java.lang.Object obj)` |
    `boolean` | `Equals​(Geometry other)` |
    `java.lang.String` | `ExportToGML​()` |
    `java.lang.String` | `ExportToGML​(java.util.Vector options)` |
    `byte[]` | `ExportToIsoWkb​()` |
    `byte[]` | `ExportToIsoWkb​(int byte_order)` |
    `int` | `ExportToIsoWkt​(java.lang.String[] argout)` |
    `java.lang.String` | `ExportToJson​()` |
    `java.lang.String` | `ExportToJson​(java.util.Vector options)` |
    `java.lang.String` | `ExportToKML​()` |
    `java.lang.String` | `ExportToKML​(java.lang.String altitude_mode)` |
    `byte[]` | `ExportToWkb​()` |
    `int` | `ExportToWkb​(byte[] wkbArray, int byte_order)` |
    `byte[]` | `ExportToWkb​(int byte_order)` |
    `java.lang.String` | `ExportToWkt​()` |
    `int` | `ExportToWkt​(java.lang.String[] argout)` |
    `void` | `FlattenTo2D​()` |
    `double` | `GetArea​()` |
    `Geometry` | `GetBoundary​()` |
    `int` | `GetCoordinateDimension​()` |
    `static long` | `getCPtr​(Geometry obj)` |
    `Geometry` | `GetCurveGeometry​()` |
    `Geometry` | `GetCurveGeometry​(java.util.Vector options)` |
    `int` | `GetDimension​()` |
    `void` | `GetEnvelope​(double[] argout)` |
    `void` | `GetEnvelope3D​(double[] argout)` |
    `int` | `GetGeometryCount​()` |
    `java.lang.String` | `GetGeometryName​()` |
    `Geometry` | `GetGeometryRef​(int geom)` |
    `int` | `GetGeometryType​()` |
    `Geometry` | `GetLinearGeometry​()` |
    `Geometry` | `GetLinearGeometry​(double dfMaxAngleStepSizeDegrees)` |
    `Geometry` | `GetLinearGeometry​(double dfMaxAngleStepSizeDegrees, java.util.Vector options)` |
    `double` | `GetM​()` |
    `double` | `GetM​(int point)` |
    `double[]` | `GetPoint​(int iPoint)` |
    `void` | `GetPoint​(int iPoint, double[] argout)` |
    `double[]` | `GetPoint_2D​(int iPoint)` |
    `void` | `GetPoint_2D​(int iPoint, double[] argout)` |
    `int` | `GetPointCount​()` |
    `double[][]` | `GetPoints​()` |
    `double[][]` | `GetPoints​(int nCoordDimension)` |
    `void` | `GetPointZM​(int iPoint, double[] argout)` |
    `SpatialReference` | `GetSpatialReference​()` |
    `double` | `GetX​()` |
    `double` | `GetX​(int point)` |
    `double` | `GetY​()` |
    `double` | `GetY​(int point)` |
    `double` | `GetZ​()` |
    `double` | `GetZ​(int point)` |
    `int` | `HasCurveGeometry​()` |
    `int` | `HasCurveGeometry​(int bLookForCircular)` |
    `int` | `hashCode​()` |
    `boolean` | `Intersect​(Geometry other)` |
    `Geometry` | `Intersection​(Geometry other)` |
    `boolean` | `Intersects​(Geometry other)` |
    `int` | `Is3D​()` |
    `boolean` | `IsEmpty​()` |
    `int` | `IsMeasured​()` |
    `boolean` | `IsRing​()` |
    `boolean` | `IsSimple​()` |
    `boolean` | `IsValid​()` |
    `double` | `Length​()` |
    `Geometry` | `MakeValid​()` |
    `boolean` | `Overlaps​(Geometry other)` |
    `Geometry` | `PointOnSurface​()` |
    `Geometry` | `Polygonize​()` |
    `int` | `RemoveGeometry​(int iSubGeom)` |
    `Geometry` | `RemoveLowerDimensionSubGeoms​()` |
    `void` | `Segmentize​(double dfMaxLength)` |
    `void` | `Set3D​(int b3D)` |
    `void` | `SetCoordinateDimension​(int dimension)` |
    `void` | `SetMeasured​(int bMeasured)` |
    `void` | `SetPoint​(int point, double x, double y)` |
    `void` | `SetPoint​(int point, double x, double y, double z)` |
    `void` | `SetPoint_2D​(int point, double x, double y)` |
    `void` | `SetPointM​(int point, double x, double y, double m)` |
    `void` | `SetPointZM​(int point, double x, double y, double z, double m)` |
    `Geometry` | `Simplify​(double tolerance)` |
    `Geometry` | `SimplifyPreserveTopology​(double tolerance)` |
    `void` | `SwapXY​()` |
    `Geometry` | `SymDifference​(Geometry other)` |
    `Geometry` | `SymmetricDifference​(Geometry other)` |
    `boolean` | `Touches​(Geometry other)` |
    `Geometry` | `Transform​(GeomTransformer transformer)` |
    `int` | `Transform​(CoordinateTransformation trans)` |
    `int` | `TransformTo​(SpatialReference reference)` |
    `Geometry` | `Union​(Geometry other)` |
    `Geometry` | `UnionCascaded​()` |
    `Geometry` | `Value​(double dfDistance)` |
    `boolean` | `Within​(Geometry other)` |
    `int` | `WkbSize​()` |

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Geometry

          public Geometry​(long cPtr,
                          boolean cMemoryOwn)

    - #### Geometry

          public Geometry​(int type,
                          java.lang.String wkt,
                          byte[] nLen,
                          java.lang.String gml)

    - #### Geometry

          public Geometry​(int type)

  - ### Method Detail

    - #### getCPtr

          public static long getCPtr​(Geometry obj)

    - #### delete

          public void delete​()

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode​()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### clone

          public java.lang.Object clone​()

      Overrides:
        `clone` in class `java.lang.Object`

    - #### GetPoint_2D

          public double[] GetPoint_2D​(int iPoint)

    - #### GetPoint

          public double[] GetPoint​(int iPoint)

    - #### CreateFromWkt

          public static Geometry CreateFromWkt​(java.lang.String wkt)

    - #### CreateFromWkb

          public static Geometry CreateFromWkb​(byte[] wkb)

    - #### CreateFromGML

          public static Geometry CreateFromGML​(java.lang.String gml)

    - #### CreateFromJson

          public static Geometry CreateFromJson​(java.lang.String json)

    - #### ExportToWkb

          public int ExportToWkb​(byte[] wkbArray,
                                 int byte_order)

    - #### ExportToWkt

          public int ExportToWkt​(java.lang.String[] argout)

    - #### ExportToIsoWkt

          public int ExportToIsoWkt​(java.lang.String[] argout)

    - #### ExportToWkb

          public byte[] ExportToWkb​(int byte_order)

    - #### ExportToWkb

          public byte[] ExportToWkb​()

    - #### ExportToIsoWkb

          public byte[] ExportToIsoWkb​(int byte_order)

    - #### ExportToIsoWkb

          public byte[] ExportToIsoWkb​()

    - #### ExportToGML

          public java.lang.String ExportToGML​(java.util.Vector options)

    - #### ExportToGML

          public java.lang.String ExportToGML​()

    - #### ExportToKML

          public java.lang.String ExportToKML​(java.lang.String altitude_mode)

    - #### ExportToKML

          public java.lang.String ExportToKML​()

    - #### ExportToJson

          public java.lang.String ExportToJson​(java.util.Vector options)

    - #### ExportToJson

          public java.lang.String ExportToJson​()

    - #### AddPoint

          public void AddPoint​(double x,
                               double y,
                               double z)

    - #### AddPoint

          public void AddPoint​(double x,
                               double y)

    - #### AddPointM

          public void AddPointM​(double x,
                                double y,
                                double m)

    - #### AddPointZM

          public void AddPointZM​(double x,
                                 double y,
                                 double z,
                                 double m)

    - #### AddPoint_2D

          public void AddPoint_2D​(double x,
                                  double y)

    - #### AddGeometryDirectly

          public int AddGeometryDirectly​(Geometry other_disown)

    - #### AddGeometry

          public int AddGeometry​(Geometry other)

    - #### RemoveGeometry

          public int RemoveGeometry​(int iSubGeom)

    - #### Clone

          public Geometry Clone​()

    - #### GetGeometryType

          public int GetGeometryType​()

    - #### GetGeometryName

          public java.lang.String GetGeometryName​()

    - #### Length

          public double Length​()

    - #### Area

          public double Area​()

    - #### GetArea

          public double GetArea​()

    - #### GetPointCount

          public int GetPointCount​()

    - #### GetPoints

          public double[][] GetPoints​(int nCoordDimension)

    - #### GetPoints

          public double[][] GetPoints​()

    - #### GetX

          public double GetX​(int point)

    - #### GetX

          public double GetX​()

    - #### GetY

          public double GetY​(int point)

    - #### GetY

          public double GetY​()

    - #### GetZ

          public double GetZ​(int point)

    - #### GetZ

          public double GetZ​()

    - #### GetM

          public double GetM​(int point)

    - #### GetM

          public double GetM​()

    - #### GetPoint

          public void GetPoint​(int iPoint,
                               double[] argout)

    - #### GetPointZM

          public void GetPointZM​(int iPoint,
                                 double[] argout)

    - #### GetPoint_2D

          public void GetPoint_2D​(int iPoint,
                                  double[] argout)

    - #### GetGeometryCount

          public int GetGeometryCount​()

    - #### SetPoint

          public void SetPoint​(int point,
                               double x,
                               double y,
                               double z)

    - #### SetPoint

          public void SetPoint​(int point,
                               double x,
                               double y)

    - #### SetPointM

          public void SetPointM​(int point,
                                double x,
                                double y,
                                double m)

    - #### SetPointZM

          public void SetPointZM​(int point,
                                 double x,
                                 double y,
                                 double z,
                                 double m)

    - #### SetPoint_2D

          public void SetPoint_2D​(int point,
                                  double x,
                                  double y)

    - #### SwapXY

          public void SwapXY​()

    - #### GetGeometryRef

          public Geometry GetGeometryRef​(int geom)

    - #### Simplify

          public Geometry Simplify​(double tolerance)

    - #### SimplifyPreserveTopology

          public Geometry SimplifyPreserveTopology​(double tolerance)

    - #### DelaunayTriangulation

          public Geometry DelaunayTriangulation​(double dfTolerance,
                                                int bOnlyEdges)

    - #### DelaunayTriangulation

          public Geometry DelaunayTriangulation​(double dfTolerance)

    - #### DelaunayTriangulation

          public Geometry DelaunayTriangulation​()

    - #### Polygonize

          public Geometry Polygonize​()

    - #### Boundary

          public Geometry Boundary​()

    - #### GetBoundary

          public Geometry GetBoundary​()

    - #### ConvexHull

          public Geometry ConvexHull​()

    - #### MakeValid

          public Geometry MakeValid​()

    - #### RemoveLowerDimensionSubGeoms

          public Geometry RemoveLowerDimensionSubGeoms​()

    - #### Buffer

          public Geometry Buffer​(double distance,
                                 int quadsecs)

    - #### Buffer

          public Geometry Buffer​(double distance)

    - #### Intersection

          public Geometry Intersection​(Geometry other)

    - #### Union

          public Geometry Union​(Geometry other)

    - #### UnionCascaded

          public Geometry UnionCascaded​()

    - #### Difference

          public Geometry Difference​(Geometry other)

    - #### SymDifference

          public Geometry SymDifference​(Geometry other)

    - #### SymmetricDifference

          public Geometry SymmetricDifference​(Geometry other)

    - #### Distance

          public double Distance​(Geometry other)

    - #### Distance3D

          public double Distance3D​(Geometry other)

    - #### Empty

          public void Empty​()

    - #### IsEmpty

          public boolean IsEmpty​()

    - #### IsValid

          public boolean IsValid​()

    - #### IsSimple

          public boolean IsSimple​()

    - #### IsRing

          public boolean IsRing​()

    - #### Intersects

          public boolean Intersects​(Geometry other)

    - #### Intersect

          public boolean Intersect​(Geometry other)

    - #### Equals

          public boolean Equals​(Geometry other)

    - #### Equal

          public boolean Equal​(Geometry other)

    - #### Disjoint

          public boolean Disjoint​(Geometry other)

    - #### Touches

          public boolean Touches​(Geometry other)

    - #### Crosses

          public boolean Crosses​(Geometry other)

    - #### Within

          public boolean Within​(Geometry other)

    - #### Contains

          public boolean Contains​(Geometry other)

    - #### Overlaps

          public boolean Overlaps​(Geometry other)

    - #### TransformTo

          public int TransformTo​(SpatialReference reference)

    - #### Transform

          public int Transform​(CoordinateTransformation trans)

    - #### GetSpatialReference

          public SpatialReference GetSpatialReference​()

    - #### AssignSpatialReference

          public void AssignSpatialReference​(SpatialReference reference)

    - #### CloseRings

          public void CloseRings​()

    - #### FlattenTo2D

          public void FlattenTo2D​()

    - #### Segmentize

          public void Segmentize​(double dfMaxLength)

    - #### GetEnvelope

          public void GetEnvelope​(double[] argout)

    - #### GetEnvelope3D

          public void GetEnvelope3D​(double[] argout)

    - #### Centroid

          public Geometry Centroid​()

    - #### PointOnSurface

          public Geometry PointOnSurface​()

    - #### WkbSize

          public int WkbSize​()

    - #### GetCoordinateDimension

          public int GetCoordinateDimension​()

    - #### CoordinateDimension

          public int CoordinateDimension​()

    - #### Is3D

          public int Is3D​()

    - #### IsMeasured

          public int IsMeasured​()

    - #### SetCoordinateDimension

          public void SetCoordinateDimension​(int dimension)

    - #### Set3D

          public void Set3D​(int b3D)

    - #### SetMeasured

          public void SetMeasured​(int bMeasured)

    - #### GetDimension

          public int GetDimension​()

    - #### HasCurveGeometry

          public int HasCurveGeometry​(int bLookForCircular)

    - #### HasCurveGeometry

          public int HasCurveGeometry​()

    - #### GetLinearGeometry

          public Geometry GetLinearGeometry​(double dfMaxAngleStepSizeDegrees,
                                            java.util.Vector options)

    - #### GetLinearGeometry

          public Geometry GetLinearGeometry​(double dfMaxAngleStepSizeDegrees)

    - #### GetLinearGeometry

          public Geometry GetLinearGeometry​()

    - #### GetCurveGeometry

          public Geometry GetCurveGeometry​(java.util.Vector options)

    - #### GetCurveGeometry

          public Geometry GetCurveGeometry​()

    - #### Value

          public Geometry Value​(double dfDistance)

    - #### Transform

          public Geometry Transform​(GeomTransformer transformer)

    - #### ExportToWkt

          public java.lang.String ExportToWkt​()