Class OGRGeometry
 Encapsulate an OGR geometry. 
Declaration
source linkDocumentation
Methods
▷ def __and__(self, other)  Return the intersection of this Geometry and the other. 
 ▷ def __eq__(self, other)  Is this Geometry equal to the other? 
 ▷ def __init__(self, geom_input, srs=None)  Initialize Geometry on either WKT or an OGR pointer as input. 
 ▷ def __or__(self, other)  Return the union of the two geometries. 
 ▷ def __str__(self)  WKT is used for the string representation. 
 ▷ def __sub__(self, other)  Return the difference this Geometry and the other. 
 ▷ def __xor__(self, other)  Return the symmetric difference of this Geometry and the other. 
 ▷ def area(self) @property Return the area for a LinearRing, Polygon, or MultiPolygon; 0 otherwise. 
 ▷ def boundary(self) @property Return the boundary of this geometry. 
  @property
def boundary(self) 
▷ def clone(self)  Clone this OGR Geometry. 
 ▷ def close_rings(self)  If there are any rings within this geometry that have not been closed, this routine will do so by adding the starting point at the end. 
 ▷ def contains(self, other)  Return True if this geometry contains the other. 
 ▷ def convex_hull(self) @property Return the smallest convex Polygon that contains all the points in this Geometry. 
  @property
def convex_hull(self) 
▷ def crosses(self, other)  Return True if this geometry crosses the other. 
 ▷ def difference(self, other)  Return a new geometry consisting of the region which is the difference of this geometry and the other. 
 ▷ def dimension(self) @property Return 0 for points, 1 for lines, and 2 for surfaces. 
  @property
def dimension(self) 
▷ def disjoint(self, other)  Return True if this geometry and the other are spatially disjoint. 
 ▷ def empty(self) @property ▷ def envelope(self) @property Return the envelope for this Geometry. 
  @property
def envelope(self) 
▷ def equals(self, other)  Return True if this geometry is equivalent to the other. 
 ▷ def ewkt(self) @property Return the EWKT representation of the Geometry. 
 ▷ def extent(self) @property Return the envelope as a 4-tuple, instead of as an Envelope object. 
  @property
def extent(self) 
▷ def geom_count(self) @property Return the number of elements in this Geometry. 
  @property
def geom_count(self) 
▷ def geom_name(self) @property Return the Name of this Geometry. 
  @property
def geom_name(self) 
▷ def geom_type(self) @property Return the Type for this Geometry. 
  @property
def geom_type(self) 
▷ def geos(self) @property Return a GEOSGeometry object from this OGRGeometry. 
 ▷ def gml(self) @property Return the GML representation of the Geometry. 
 ▷ def hex(self) @property Return the hexadecimal representation of the WKB (a string). 
 ▷ def intersection(self, other)  Return a new geometry consisting of the region of intersection of this geometry and the other. 
 ▷ def intersects(self, other)  Return True if this geometry intersects with the other. 
 ▷ def json(self) @property Return the GeoJSON representation of this Geometry. 
 ▷ def kml(self) @property Return the KML representation of the Geometry. 
 ▷ def num_coords(self) @property Alias for `point_count`. 
  @property
def num_coords(self) 
▷ def num_points(self) @property Alias for `point_count` (same name method in GEOS API.) 
  @property
def num_points(self) 
▷ def overlaps(self, other)  Return True if this geometry overlaps the other. 
 ▶ def point_count(self) @property Return the number of Points in this Geometry. 
  @property
def point_count(self) 
Overrides
This method is overriden in:
▷ def sym_difference(self, other)  Return a new geometry which is the symmetric difference of this geometry and the other. 
 ▷ def touches(self, other)  Return True if this geometry touches the other. 
 ▶ def transform(self, coord_trans, clone=False)  Transform this geometry to a different spatial reference system. 
 ▷ def union(self, other)  Return a new geometry consisting of the region which is the union of this geometry and the other. 
 ▷ def within(self, other)  Return True if this geometry is within the other. 
 ▷ def wkb(self) @property Return the WKB representation of the Geometry. 
 ▷ def wkb_size(self) @property Return the size of the WKB buffer. 
  @property
def wkb_size(self) 
▷ def wkt(self) @property Return the WKT representation of the Geometry. 
 
Class methods
▷ def from_bbox(cls, bbox) @classmethod Construct a Polygon from a bounding box (4-tuple). 
  @classmethod
def from_bbox( 
cls,
bbox,
 ) 
 ▷ def from_gml(cls, gml_string) @classmethod  @classmethod
def from_gml( 
cls,
gml_string,
 ) 
  @staticmethod
def from_json(geom_input)