mapbox package

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: mapbox.errors.ValidationError

exception mapbox.errors.ImageSizeError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InputSizeError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidColorError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidColumnError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidCoordError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidCountryCodeError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidFeatureError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidFeatureFormatError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidFileError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidFileFormatError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidId

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidLabelError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidMarkerNameError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidParameterError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidPeriodError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidPlaceTypeError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidProfileError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidResourceTypeError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidRowError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidUsernameError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.InvalidZoomError

Bases: mapbox.errors.ValidationError

exception mapbox.errors.MapboxDeprecationWarning

Bases: UserWarning

exception mapbox.errors.TokenError

Bases: mapbox.errors.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