Skip to content

Reference

kmService.KmResponse dataclass

Represents a response containing kilometer measures.

Attributes:

Name Type Description
input_point Point

The input point associated with the response.

km_measures List[KmLintMeasure]

A list of kilometer measures.

display property

Computes the kilometer value string, if multiple response returns one string separated by a ', '.

has_km_measure property

Check if the response contains at least one kilometer measure.

multiple_km_measure property

Check if the response contains multiple kilometer measures.

as_json_serializable()

Converts KmResponse instance to a JSON serializable dictionary.

geojson_dict(add_raai=True, add_geocode=True)

Generate GeoJSON dict representation of the response.

Returns:

Type Description
dict

GeoJSON dict representing the kilometer measures.

geojson_string(add_raai=True, add_geocode=True)

Generate GeoJSON string representation of the response.

Returns:

Type Description
str

GeoJSON string representing the kilometer measures.

get_geojson_feature_collection(add_raai=True, add_geocode=True)

Retrieve a GeoJSON FeatureCollection object.

Returns:

Type Description
GeoJsonFeatureCollection

A collection of GeoJSON features.

imx_kilometer_ribbons()

Generate XML string representation of kilometer ribbons, supports multiple results on newline.

Returns:

Type Description
str

XML string describing the kilometer ribbons.

imx_ribbon_locations()

Generate XML string for ribbon locations, supports multiple results on newline.

Returns:

Type Description
str

XML string describing ribbon locations.

kmService.KmLintMeasure dataclass

Represents a kilometer lint measure.

Attributes:

Name Type Description
input_point Point

The input point.

hm float

The hm value.

distance float

The distance.

km_lint KmLintResponse

The kilometer lint response.

geocode GeoCodeResponse

The geocode response.

raai LineString

The raai value.

display property

Computes the kilometer value string.

as_json_serializable()

Converts KmLintMeasure instance to a JSON serializable dictionary.

geojson_string()

Gets the GeoJSON string representation.

Returns:

Type Description
str

The GeoJSON string.

get_geojson_feature_collection()

Retrieve a GeoJSON FeatureCollection object.

Returns:

Type Description
GeoJsonFeatureCollection

A collection of GeoJSON features.

kmService.GeoCodeResponse dataclass

Represents geographical code response.

Attributes:

Name Type Description
number int

The geographical number.

sub_code str

The geographical sub-code.

name str

The geographical name.

kmService.KmLintResponse dataclass

Represents kilometer lint response.

Attributes:

Name Type Description
name str

The kilometer lint name.

description str

The description of the kilometer lint.