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. |
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()
¶
get_geojson_feature_collection()
¶
Retrieve a GeoJSON FeatureCollection object.
Returns:
| Type | Description |
|---|---|
GeoJsonFeatureCollection
|
A collection of GeoJSON features. |