invertedai.api.location_info(location: str, include_map_source: bool = False, rendering_fov: Optional[int] = None, rendering_center: Optional[Tuple[float, float]] = None) LocationResponse[source]#

Provides static information about a given location.

  • location – Location string in IAI format.

  • include_map_source – Whether to return full map specification in Lanelet2 OSM format. This significantly increases the response size, consuming more network resources.

  • rendering_fov – Optional fov for both x and y axis for the rendered birdview in meters.

  • rendering_center – Optional center x,y coordinates for the rendered birdview.

See also

drive(), initialize(), light(), blame()

class invertedai.api.LocationResponse(*, version: str, max_agent_number: int, bounding_polygon: Optional[List[Point]], birdview_image: Image, osm_map: Optional[LocationMap], map_center: Point, map_fov: float, static_actors: List[StaticMapActor])[source]#

Response returned from an API call to iai.location_info().

birdview_image: Image#

Visualization of the location.

bounding_polygon: Optional[List[Point]]#

Convex polygon denoting the boundary of the supported area within the location.

map_center: Point#

The x,y coordinate of the center of the map.

map_fov: float#

The field of view in meters for the birdview image.

max_agent_number: int#

Maximum number of agents recommended in the location. Use more at your own risk.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'birdview_image': FieldInfo(annotation=Image, required=True), 'bounding_polygon': FieldInfo(annotation=Union[List[invertedai.common.Point], NoneType], required=True), 'map_center': FieldInfo(annotation=Point, required=True), 'map_fov': FieldInfo(annotation=float, required=True), 'max_agent_number': FieldInfo(annotation=int, required=True), 'osm_map': FieldInfo(annotation=Union[LocationMap, NoneType], required=True), 'static_actors': FieldInfo(annotation=List[invertedai.common.StaticMapActor], required=True), 'version': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

osm_map: Optional[LocationMap]#

Underlying map annotation, returned if include_map_source was set.

static_actors: List[StaticMapActor]#

Lists traffic lights with their IDs and locations.

version: str#

Map version. Matches the version in the input location string, if one was specified.