geospatial_analysis
geospatial_analysis
¶
This module contains end user functions for spatially identifying the relevant TS row and distance calculations
calculate_distance_to_fault(longitude: float, latitude: float) -> float
¶
Calculates the distance from a latitude and longitude point to the nearest fault
Parameters:
Name | Type | Description | Default |
---|---|---|---|
longitude
|
float
|
longitude of the point of interest |
required |
latitude
|
float
|
latitude of the point of interest |
required |
Returns:
Name | Type | Description |
---|---|---|
d |
float
|
distance to fault, rounded to nearest kilometre |
Source code in nzssdt_2023/end_user_functions/geospatial_analysis.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
identify_location_id(longitude: float, latitude: float) -> str
¶
Identifies the TS location assigned to a latitute and longitude
Parameters:
Name | Type | Description | Default |
---|---|---|---|
longitude
|
float
|
longitude of the point of interest |
required |
latitude
|
float
|
latitude of the point of interest |
required |
Returns:
Name | Type | Description |
---|---|---|
location_id |
str
|
name of the relevant TS location |
Source code in nzssdt_2023/end_user_functions/geospatial_analysis.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|