mapbox package

Subpackages

Submodules

mapbox.encoding module

mapbox.encoding.encode_coordinates_json(features)

Given an iterable of features return a JSON string to be used as the request body for the distance API: a JSON object, with a key coordinates, which has an array of [ Longitude, Lattitude ] pairs

mapbox.encoding.encode_polyline(features)

Encode and iterable of features as a polyline

mapbox.encoding.encode_waypoints(features, min_limit=None, max_limit=None, precision=6)

Given an iterable of features return a string encoded in waypoint-style used by certain mapbox APIs (“lon,lat” pairs separated by “;”)

mapbox.encoding.read_points(features)

Iterable of features to a sequence of point tuples Where “features” can be either GeoJSON mappings or objects implementing the geo_interface

mapbox.errors module

exception mapbox.errors.HTTPError

Bases: ValidationError

exception mapbox.errors.ImageSizeError

Bases: ValidationError

exception mapbox.errors.InputSizeError

Bases: ValidationError

exception mapbox.errors.InvalidColorError

Bases: ValidationError

exception mapbox.errors.InvalidColumnError

Bases: ValidationError

exception mapbox.errors.InvalidCoordError

Bases: ValidationError

exception mapbox.errors.InvalidCountryCodeError

Bases: ValidationError

exception mapbox.errors.InvalidFeatureError

Bases: ValidationError

exception mapbox.errors.InvalidFeatureFormatError

Bases: ValidationError

exception mapbox.errors.InvalidFileError

Bases: ValidationError

exception mapbox.errors.InvalidFileFormatError

Bases: ValidationError

exception mapbox.errors.InvalidId

Bases: ValidationError

exception mapbox.errors.InvalidLabelError

Bases: ValidationError

exception mapbox.errors.InvalidMarkerNameError

Bases: ValidationError

exception mapbox.errors.InvalidParameterError

Bases: ValidationError

exception mapbox.errors.InvalidPeriodError

Bases: ValidationError

exception mapbox.errors.InvalidPlaceTypeError

Bases: ValidationError

exception mapbox.errors.InvalidProfileError

Bases: ValidationError

exception mapbox.errors.InvalidResourceTypeError

Bases: ValidationError

exception mapbox.errors.InvalidRowError

Bases: ValidationError

exception mapbox.errors.InvalidUsernameError

Bases: ValidationError

exception mapbox.errors.InvalidZoomError

Bases: ValidationError

exception mapbox.errors.MapboxDeprecationWarning

Bases: UserWarning

exception mapbox.errors.TokenError

Bases: ValidationError

exception mapbox.errors.ValidationError

Bases: ValueError

mapbox.utils module

mapbox.utils.normalize_geojson_featurecollection(obj)

Takes a geojson-like mapping representing geometry, Feature or FeatureCollection (or a sequence of such objects) and returns a FeatureCollection-like dict

Module contents