gis.utils

Attributes

Endpoint

GeocodeProfile

DirectionsProfile

Classes

MapboxRequests

Functions

outside_bbox(→ bool)

Checks if the Coordinates instance is inside the bounding box defined

Module Contents

gis.utils.Endpoint[source]
gis.utils.GeocodeProfile[source]
gis.utils.DirectionsProfile[source]
class gis.utils.MapboxRequests(access_token: str | None, endpoint: Literal['geocoding'] = 'geocoding', profile: GeocodeProfile = 'places', api_version: str = 'v5')[source]
class gis.utils.MapboxRequests(access_token: str | None, endpoint: Literal['directions'], profile: DirectionsProfile, api_version: str = 'v5')
host: ClassVar[str] = 'https://api.mapbox.com'[source]
endpoints: ClassVar[tuple[Endpoint, Ellipsis]] = ('directions', 'geocoding')[source]
geocode_profiles: ClassVar[tuple[GeocodeProfile, Ellipsis]] = ('places',)[source]
directions_profiles: ClassVar[tuple[DirectionsProfile, Ellipsis]] = ('driving-traffic', 'driving', 'walking', 'cycling')[source]
property base_url: purl.URL[source]
geocode(text: str | None = None, street: str | None = None, zip_code: str | None = None, city: str | None = None, ctry: str | None = None, locale: str | None = None, as_url: bool = False) requests.Response[source]
directions(coordinates: Iterable[tuple[str | float, str | float]], as_url: bool = False) requests.Response[source]

coordinates: iterable of tuples of (lat, lon)

gis.utils.outside_bbox(coordinate: AnyCoordinates | None, bbox: Collection[RealCoordinates] | None) bool[source]

Checks if the Coordinates instance is inside the bounding box defined by the most outward sitting points in an iterable of two+ Coordinates.