alti_api.versions.v1_0.models.alti module

Models used for the elevation endpoints

class alti_api.versions.v1_0.models.alti.CheckParameters(output_format, indent, lon, lat, resource_mgr, resource, type=None)

Bases : object

Checking the validity of the parameters

__init__(output_format, indent, lon, lat, resource_mgr, resource, type=None)
Paramètres:
  • output_format – Output format

  • indent – If true, response indented

  • lon – Longitudes separated by a regular delimiter

  • lat – Latitudes separated by a regular delimiter

  • resource_mgr – List of resources available

  • resource – Name of the resource to use to extract the elevation

  • type – Type of elevation extraction (single or profile)

async check() tuple[list[float], list[float]] | ErrorException

Main function that launches the checks of the lon and lat parameters

Renvoie:

Valid longitudes and latitudes or ErrorException if a parameter is invalid

async check_lon_lat_floating_type(data: list) tuple[list, list]

Check if the values of longitudes and latitudes can be converted to a float

Paramètres:

data – Data to be checked

Renvoie:

List of invalid values and list of floating values

async check_lon_lat_parameters() ErrorException | tuple[list[float], list[float]]

Verification of lon and lat parameters

Paramètres:
  • lon – List of longitudes

  • lat – List of latitudes

  • output_format – Output format

  • indent – If true, data indented

Renvoie:

ErrorException if one of the parameter is invalid or tuple of longitudes and latitudes converted to floats

async check_lon_lat_ranges(data: list, min: float, max: float) list

Check if the values of longitudes and latitudes can be converted to a float

Paramètres:
  • data – Data to be checked

  • min – Minimum value of the range

  • max – Maximum value of the range

Renvoie:

List of invalid values

async check_resource() ErrorException | None

Check if the resource exists

Renvoie:

ErrorException if the resource is invalid or None

async check_valid_coordinate(is_invalid, error_messages)
class alti_api.versions.v1_0.models.alti.ElevationModel(*, lon: float, lat: float, z: float, acc: float, measures: list[MeasureModel] | None = None)

Bases : BaseModel

Model to create elevation property

acc: float
lat: float
lon: float
measures: list[MeasureModel] | None
model_config: ClassVar[ConfigDict] = {}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'acc': FieldInfo(annotation=float, required=True), 'lat': FieldInfo(annotation=float, required=True), 'lon': FieldInfo(annotation=float, required=True), 'measures': FieldInfo(annotation=Union[list[MeasureModel], NoneType], required=False), 'z': FieldInfo(annotation=float, 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.

z: float
class alti_api.versions.v1_0.models.alti.GetElevationProfileRequest(*, lon: str, lat: str, resource: str, delimiter: ~alti_api.versions.v1_0.models.parameters.delimiter_enum | None = delimiter_enum.|, indent: ~alti_api.versions.v1_0.models.parameters.boolean_enum | None = boolean_enum.false, profile_mode: ~alti_api.versions.v1_0.models.parameters.profiles_modes_enum | None = profiles_modes_enum.simple, measures: ~alti_api.versions.v1_0.models.parameters.boolean_enum | None = boolean_enum.false, sampling: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=5001)] = None)

Bases : BaseModel

Parameters to retrieve elevation profile

delimiter: delimiter_enum | None
indent: boolean_enum | None
lat: str
lon: str
measures: boolean_enum | None
model_config: ClassVar[ConfigDict] = {}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'delimiter': FieldInfo(annotation=Union[delimiter_enum, NoneType], required=False, default=<delimiter_enum.|: '|'>), 'indent': FieldInfo(annotation=Union[boolean_enum, NoneType], required=False, default=<boolean_enum.false: 'false'>), 'lat': FieldInfo(annotation=str, required=True), 'lon': FieldInfo(annotation=str, required=True), 'measures': FieldInfo(annotation=Union[boolean_enum, NoneType], required=False, default=<boolean_enum.false: 'false'>), 'profile_mode': FieldInfo(annotation=Union[profiles_modes_enum, NoneType], required=False, default=<profiles_modes_enum.simple: 'simple'>), 'resource': FieldInfo(annotation=str, required=True), 'sampling': FieldInfo(annotation=int, required=False, metadata=[Ge(ge=1), Le(le=5001)])}

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

This replaces Model.__fields__ from Pydantic V1.

profile_mode: profiles_modes_enum | None
resource: str
sampling: int
class alti_api.versions.v1_0.models.alti.GetElevationsRequest(*, lon: str, lat: str, resource: str, delimiter: ~alti_api.versions.v1_0.models.parameters.delimiter_enum | None = delimiter_enum.|, indent: ~alti_api.versions.v1_0.models.parameters.boolean_enum | None = boolean_enum.false, measures: ~alti_api.versions.v1_0.models.parameters.boolean_enum | None = boolean_enum.false, zonly: ~alti_api.versions.v1_0.models.parameters.boolean_enum | None = boolean_enum.false)

Bases : BaseModel

Parameters to retrieve elevations

delimiter: delimiter_enum | None
indent: boolean_enum | None
lat: str
lon: str
measures: boolean_enum | None
model_config: ClassVar[ConfigDict] = {}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'delimiter': FieldInfo(annotation=Union[delimiter_enum, NoneType], required=False, default=<delimiter_enum.|: '|'>), 'indent': FieldInfo(annotation=Union[boolean_enum, NoneType], required=False, default=<boolean_enum.false: 'false'>), 'lat': FieldInfo(annotation=str, required=True), 'lon': FieldInfo(annotation=str, required=True), 'measures': FieldInfo(annotation=Union[boolean_enum, NoneType], required=False, default=<boolean_enum.false: 'false'>), 'resource': FieldInfo(annotation=str, required=True), 'zonly': FieldInfo(annotation=Union[boolean_enum, NoneType], required=False, default=<boolean_enum.false: 'false'>)}

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

This replaces Model.__fields__ from Pydantic V1.

resource: str
zonly: boolean_enum | None
class alti_api.versions.v1_0.models.alti.HeightDifferencesModel(*, positive: float, negative: float)

Bases : BaseModel

Model to create height_differences property

model_config: ClassVar[ConfigDict] = {}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'negative': FieldInfo(annotation=float, required=True), 'positive': FieldInfo(annotation=float, 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.

negative: float
positive: float
class alti_api.versions.v1_0.models.alti.MeasureModel(*, z: float, source_name: str, source_measure: str, acc: float, title: str)

Bases : BaseModel

Model to create measure property

acc: float
model_config: ClassVar[ConfigDict] = {}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'acc': FieldInfo(annotation=float, required=True), 'source_measure': FieldInfo(annotation=str, required=True), 'source_name': FieldInfo(annotation=str, required=True), 'title': FieldInfo(annotation=str, required=True), 'z': FieldInfo(annotation=float, 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.

source_measure: str
source_name: str
title: str
z: float
class alti_api.versions.v1_0.models.alti.ResponseGetElevationProfileRequest(*, elevations: list[ElevationModel], height_differences: HeightDifferencesModel)

Bases : BaseModel

Response with elevation profile and various information: longitude, latitude, accuracy

elevations: list[ElevationModel]
height_differences: HeightDifferencesModel
model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'example': {'elevations': [{'acc': 2.5, 'lat': 43.54, 'lon': 1.48, 'z': 168.75}, {'acc': 4.5, 'lat': 88.54, 'lon': 56.86, 'z': 53.6}], 'height_differences': {'negative': 27.48, 'positive': 0}}}}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'elevations': FieldInfo(annotation=list[ElevationModel], required=True, json_schema_extra={'example': [{'lon': 1.48, 'lat': 43.54, 'z': 168.75, 'acc': 2.5}, {'lon': 56.86, 'lat': 88.54, 'z': 53.6, 'acc': 4.5}]}), 'height_differences': FieldInfo(annotation=HeightDifferencesModel, required=True, json_schema_extra={'example': {'positive': 0, 'negative': 27.48}})}

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

This replaces Model.__fields__ from Pydantic V1.

class alti_api.versions.v1_0.models.alti.ResponseGetElevationsRequest(*, elevations: list[ElevationModel])

Bases : BaseModel

Response with elevations and various information: longitude, latitude, accuracy

elevations: list[ElevationModel]
model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'example': {'elevations': [{'acc': 2.5, 'lat': 43.54, 'lon': 1.48, 'z': 168.75}, {'acc': 4.5, 'lat': 88.54, 'lon': 56.86, 'z': 53.6}]}}}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'elevations': FieldInfo(annotation=list[ElevationModel], required=True, json_schema_extra={'example': [{'lon': 1.48, 'lat': 43.54, 'z': 168.75, 'acc': 2.5}, {'lon': 56.86, 'lat': 88.54, 'z': 53.6, 'acc': 4.5}]})}

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

This replaces Model.__fields__ from Pydantic V1.

class alti_api.versions.v1_0.models.alti.ResponseMeasuresGetElevationProfileRequest(*, elevations: list[ElevationModel], height_differences: HeightDifferencesModel)

Bases : BaseModel

Response with elevation profile and various information: longitude, latitude, accuracy, details on the measures

elevations: list[ElevationModel]
height_differences: HeightDifferencesModel
model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'example': {'elevations': [{'acc': 2.5, 'lat': 43.54, 'lon': 1.48, 'measures': [{'acc': 2.5, 'source_measure': 'STEREO', 'source_name': 'RGE Alti FXX', 'title': 'MNT1', 'z': 168.75}, {'acc': 7, 'source_measure': 'STEREO', 'source_name': 'RGE Alti CALVADOS', 'title': 'MNT2', 'z': 149.12}], 'z': 168.75}, {'acc': 4.5, 'lat': 88.54, 'lon': 56.86, 'measures': [{'acc': 2.5, 'source_measure': 'LIDAR', 'source_name': 'RGE Alti FXX', 'title': 'MNT1', 'z': 53.6}], 'z': 53.6}]}}}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'elevations': FieldInfo(annotation=list[ElevationModel], required=True, json_schema_extra={'example': [{'lon': 1.48, 'lat': 43.54, 'z': 168.75, 'acc': 2.5, 'measures': [{'z': 168.75, 'source_name': 'RGE Alti FXX', 'source_measure': 'STEREO', 'acc': 2.5, 'title': 'MNT1'}, {'z': 149.12, 'source_name': 'RGE Alti CALVADOS', 'source_measure': 'STEREO', 'acc': 7, 'title': 'MNT2'}]}, {'lon': 56.86, 'lat': 88.54, 'z': 53.6, 'acc': 4.5, 'measures': [{'z': 53.6, 'source_name': 'RGE Alti FXX', 'source_measure': 'LIDAR', 'acc': 2.5, 'title': 'MNT1'}]}]}), 'height_differences': FieldInfo(annotation=HeightDifferencesModel, required=True, json_schema_extra={'example': {'positive': 0, 'negative': 27.48}})}

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

This replaces Model.__fields__ from Pydantic V1.

class alti_api.versions.v1_0.models.alti.ResponseMeasuresGetElevationsRequest(*, elevations: list[ElevationModel])

Bases : BaseModel

Response with only elevation values and details on the measures

elevations: list[ElevationModel]
model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'example': {'elevations': [{'acc': 2.5, 'lat': 43.54, 'lon': 1.48, 'measures': [{'acc': 2.5, 'source_measure': 'STEREO', 'source_name': 'RGE Alti FXX', 'title': 'MNT1', 'z': 168.75}, {'acc': 7, 'source_measure': 'STEREO', 'source_name': 'RGE Alti CALVADOS', 'title': 'MNT2', 'z': 149.12}], 'z': 168.75}, {'acc': 4.5, 'lat': 88.54, 'lon': 56.86, 'measures': [{'acc': 2.5, 'source_measure': 'LIDAR', 'source_name': 'RGE Alti FXX', 'title': 'MNT1', 'z': 53.6}], 'z': 53.6}]}}}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'elevations': FieldInfo(annotation=list[ElevationModel], required=True, json_schema_extra={'example': [{'lon': 1.48, 'lat': 43.54, 'z': 168.75, 'acc': 2.5, 'measures': [{'z': 168.75, 'source_name': 'RGE Alti FXX', 'source_measure': 'STEREO', 'acc': 2.5, 'title': 'MNT1'}, {'z': 149.12, 'source_name': 'RGE Alti CALVADOS', 'source_measure': 'STEREO', 'acc': 7, 'title': 'MNT2'}]}, {'lon': 56.86, 'lat': 88.54, 'z': 53.6, 'acc': 4.5, 'measures': [{'z': 53.6, 'source_name': 'RGE Alti FXX', 'source_measure': 'LIDAR', 'acc': 2.5, 'title': 'MNT1'}]}]})}

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

This replaces Model.__fields__ from Pydantic V1.

class alti_api.versions.v1_0.models.alti.ResponseZonlyGetElevationsRequest(*, elevations: list[float])

Bases : BaseModel

Response with only elevation values

elevations: list[float]
model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'example': {'elevations': [149.123, 56.1]}}}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'elevations': FieldInfo(annotation=list[float], required=True, json_schema_extra={'example': [149.123, 56.1]})}

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

This replaces Model.__fields__ from Pydantic V1.