package documentation
Shape object.
The Shape object implements the IShape protocol (georefenced geometry). Internally, it holds a pointer to a Shapely geometry object and a Crs object.
From __init__.py
:
Class |
|
Shape properties object. |
Class |
|
Undocumented |
Exception |
|
Undocumented |
Function | from |
Creates a polygon Shape from a Bounds object. |
Function | from |
Creates a Shape from a dictionary. |
Function | from |
Creates a polygon Shape from an extent. |
Function | from |
Creates a shape object from a GeoJSON geometry dict. |
Function | from |
Creates a Shape from a properties object. |
Function | from |
Creates a shape object from a WKB byte string. |
Function | from |
Undocumented |
Function | from |
Creates a shape object from a hex-encoded WKB string. |
Function | from |
Creates a shape object from a WKT string. |
Function | from |
Creates a point Shape from coordinates. |
Function | _from |
Undocumented |
Function | _shapely |
Undocumented |
Function | _swap |
Undocumented |
Constant | _CIRCLE |
Undocumented |
Constant | _MIN |
Undocumented |
Constant | _TOLERANCE |
Undocumented |
Creates a shape object from a WKT string.
Parameters | |
wkt:str | A WKT or EWKT string. |
defaultgws.ICrs | Default Crs. |
Returns | |
gws.IShape | A Shape object. |
Creates a shape object from a WKB byte string.
Parameters | |
wkb:bytes | A WKB or EWKB byte string. |
defaultgws.ICrs | Default Crs. |
Returns | |
gws.IShape | A Shape object. |
Creates a shape object from a hex-encoded WKB string.
Parameters | |
wkb:str | A hex-encoded WKB or EWKB byte string. |
defaultgws.ICrs | Default Crs. |
Returns | |
gws.IShape | A Shape object. |
Creates a shape object from a GeoJSON geometry dict.
Parses a dict as a GeoJSON geometry object (https://www.rfc-editor.org/rfc/rfc7946#section-3.1).
The coordinates are assumed to be in the projection order, unless always_xy is True.
Parameters | |
geojson:dict | A GeoJSON geometry dict |
crs:gws.ICrs | A Crs object. |
always | If True, coordinates are assumed to be in the XY (lon/lat) order |
Returns | |
gws.IShape | A Shape object. |
Creates a Shape from a properties object.
Parameters | |
props:gws.Props | A properties object. |
Returns | |
gws.IShape | A Shape object. |
Creates a Shape from a dictionary.
Parameters | |
d:dict | A dictionary with the keys 'crs' and 'geometry'. |
Returns | |
gws.IShape | A Shape object. |
Creates a polygon Shape from an extent.
Parameters | |
extent:gws.Extent | A hex-encoded WKB byte string. |
crs:gws.ICrs | A Crs object. |
always | If True, coordinates are assumed to be in the XY (lon/lat) order |
Returns | |
gws.IShape | A Shape object. |
Creates a polygon Shape from a Bounds object.
Parameters | |
bounds:gws.Bounds | A Bounds object. |
Returns | |
gws.IShape | A Shape object. |
Creates a point Shape from coordinates.
Parameters | |
x:float | X coordinate (lon/easting) |
y:float | Y coordinate (lat/northing) |
crs:gws.ICrs | A Crs object. |
Returns | |
gws.IShape | A Shape object. |