accessmod/osm.py
def to_multipolygon(record: dict) -> dict:
                        """Convert polygon record to multipolygon."""
                        if record["geometry"].get("type") == "MultiPolygon":
                            return record
                        record["geometry"]["type"] = "MultiPolygon"
                        record["geometry"]["coordinates"] = [
                            record["geometry"]["coordinates"]
                        ]
                        return record
Convert polygon record to multipolygon.
Convert polygon record to multipolygon.
Convert polygon record to multipolygon .
def to_multipolygon(record: dict) -> dict:
                        if record["geometry"].get("type") == "MultiPolygon":
                            return record
                        record["geometry"]["type"] = "MultiPolygon"
                        record["geometry"]["coordinates"] = [
                            record["geometry"]["coordinates"]
                        ]
                        return record
def to_multipolygon ( record : dict ) -> dict : if record [ "geometry" ] . get ( "type" ) == "MultiPolygon" : return record record [ "geometry" ] [ "type" ] = "MultiPolygon" record [ "geometry" ] [ "coordinates" ] = [ record [ "geometry" ] [ "coordinates" ] ] return record
Convert polygon record to multipolygon.
Convert polygon record to multipolygon .
"""Convert polygon record to multipolygon."""
record
dict