Skip to content
Snippets Groups Projects

Resolve "Create the Geometry, Quadkey, RelationID and Floorspace rules"

Files
10
+ 15
0
class GeometryRule:
def __call__(self, geometry, *args, **kwargs):
"""
Wrap the WKT formatted geometry of a building in the `ST_GeomFromText()` function
Args:
geometry (str):
WKT formatted geometry of the building
Returns:
A dictionary with the WKT formatted geometry of the building wrapped in the
`ST_GeomFromText()` function.
"""
return {"geometry": f"ST_GeomFromText('{geometry}', 4326)"}
Loading