odc.geo.geom.Geometry
- class odc.geo.geom.Geometry(geom, crs=None)[source]
2D Geometry with CRS.
This is a wrapper around
shapely.geometry.BaseGeometrythat adds projection information.Instantiate with a GeoJSON structure. If 3D coordinates are supplied, they are converted to 2D by dropping the Z points.
Methods
__init__(geom[, crs])assign_crs(crs)Same geometry but with crs changed.
buffer(distance[, resolution])clone()contains(other)covers(other)crosses(other)difference(other)disjoint(other)dropna()Only keep finite points.
explore([map, tiles, attr, map_kwds])Plot Geometry on an interactive
foliumleaflet map for rapid data exploration.filter(pred)Keep only those points for which pred(x,y) is True.
geojson([properties, simplify, resolution, ...])Render geometry to GeoJSON.
interpolate(distance)Returns a point
distanceunits along the line.intersection(other)intersects(other)overlaps(other)segmented(resolution)Increase resolution of the geometry.
simplify(tolerance[, preserve_topology])split(splitter)svg(*args, **kw)Returns SVG path element (wraps shapely).
svg_path([ndecimal])Produce SVG path text.
symmetric_difference(other)to_crs(crs[, resolution, wrapdateline, ...])Convert geometry to a different Coordinate Reference System.
touches(other)transform(func, *[, crs])Map through arbitrary transform.
union(other)within(other)Attributes
areaboundaryboundingboxcentroidconvex_hullcoordsenvelopeexteriorgeom_typegeomsinteriorsis_emptyis_multiTrue for multi-geometry types.
is_ringis_validjsonlengthpointstypewktxy