landtransportsg.geospatial¶
Geospatial module.
Example usage:
# get a geospatial whole island layer
from landtransportsg import Geospatial
client = Geospatial(API_KEY)
geospatial_whole_island = client.geospatial_whole_island('ArrowMarking')
Methods¶
- class landtransportsg.geospatial.Client(account_key: str, cache_backend: str | BaseCache = 'sqlite')¶
Bases:
LandTransportSgInteract with the geospatial-related endpoints.
References: https://datamall.lta.gov.sg/content/dam/datamall/datasets/LTA_DataMall_API_User_Guide.pdf
- geospatial_whole_island(**kwargs: Unpack[GeospatiaWholeIslandArgsDict]) str¶
Get the SHP files of the requested geospatial layer.
- Parameters:
kwargs (GeospatiaWholeIslandArgsDict) – Key-value arguments to be passed as parameters to the endpoint URL.
- Raises:
ValueError – geospatial_layer_id is not a valid ID.
- Returns:
Link for downloading the requested SHP file.
- Return type: