Point
The stac_generator uses the csv and txt extensions to describe point data. In addition to the minimum required fields, the STAC generator requires a few additional parameters to properly parse the asset.
Given the flexibility of the csv format, we require point dataset to be structured in a particular way. Each row of the csv file describes a point, with columns being the attributes. At the minimum, there must be two columns describing the coordinates of the points, with the common options being lat/lon, y/x, northings/eastings, etc. The required config fields include:
X: the column in the csv asset to describe the longitude.Y: the column in the csv asset to describe the latitude.epsg: the crs of theX,Ycolumns.
There can also be optional columns:
T: the column in the csv asset that describes the date of collection of a point record.date_format: how the date string is interpreted - by default, dates are assumed to beISO8640compliant.Z: the column in the csv asset that describes the altitude.column_info: describe the relevant names and descriptions of relavant attributes.
Generic Point Data
In this tutorial, we will describe the asset soil_data.csv contained in the zip folder.
| Longitude | Latitude | mid_depth | Ca_Soln |
|---|---|---|---|
| 150.547 | -24.3399 | 0.05 | 85.25 |
| 150.547 | -24.3399 | 0.2 | 361.1 |
| 150.547 | -24.3399 | 0.4 | 295.8 |
| 150.551 | -24.3403 | 0.05 | 230.2 |
| 150.551 | -24.3403 | 0.2 | 222.85 |
| 150.551 | -24.3403 | 0.4 | 157.5 |
| 150.555 | -24.3409 | 0.05 | 42.58 |
| 150.555 | -24.3409 | 0.2 | 34.97 |
| 150.555 | -24.3409 | 0.4 | 47.815 |
| 150.551 | -24.3395 | 0.05 | 222.35 |
| 150.551 | -24.3395 | 0.2 | 214.85 |
| 150.551 | -24.3395 | 0.4 | 158.15 |
| 150.549 | -24.3383 | 0.05 | 78.4 |
| 150.549 | -24.3383 | 0.2 | 196.05 |
| 150.549 | -24.3383 | 0.4 | 249.25 |
| 150.552 | -24.3388 | 0.05 | 191.15 |
| 150.552 | -24.3388 | 0.2 | 203.4 |
| 150.552 | -24.3388 | 0.4 | 156.75 |
| 150.554 | -24.339 | 0.05 | 53.05 |
| 150.554 | -24.339 | 0.2 | 36.675 |
| 150.554 | -24.339 | 0.4 | 62.1 |
| 150.553 | -24.3376 | 0.05 | 88.55 |
| 150.553 | -24.3376 | 0.2 | 69.65 |
| 150.553 | -24.3376 | 0.4 | 29.245 |
| 150.556 | -24.338 | 0.05 | 43.945 |
| 150.556 | -24.338 | 0.2 | 29.185 |
| 150.556 | -24.338 | 0.4 | 33.32 |
| 150.552 | -24.3367 | 0.05 | 58.85 |
| 150.552 | -24.3367 | 0.2 | 57.85 |
| 150.552 | -24.3367 | 0.4 | 30.12 |
| 150.554 | -24.3364 | 0.05 | 171.7 |
| 150.554 | -24.3364 | 0.2 | 60.05 |
| 150.554 | -24.3364 | 0.4 | 45.795 |
| 150.556 | -24.336 | 0.05 | 83.55 |
| 150.556 | -24.336 | 0.2 | 37.535 |
| 150.556 | -24.336 | 0.4 | 43.605 |
Config
The config - point_simple_config.json is described below:
| point_simple_config.json | |
|---|---|
Field Explanations
X: the x coordinate of the data isLongitude.Y: the y coordinate of the data isLatitude.epsg: we assume the data is recorded in WGS84 or epsg 4326.column_info: similar to the same field in vector assets. This is a list of column objects with fieldsnameanddescription. In this example, we describe the attributeca_soln.
Command and Output
Save the config file as point_simple_config.json and run the follow serialisation command:
Timeseries Point Data
In this tutorial, we describe the asset adelaide_airport.csv which contains weather station collected by a BOM station in the area:
| latitude | longitude | elevation | station | YYYY-MM-DD | daily_rain | max_temp | min_temp | radiation | mslp |
|---|---|---|---|---|---|---|---|---|---|
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-01 | 0 | 32.2 | 17 | 31.8 | 1007.4 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-02 | 0 | 26.9 | 16.8 | 31.7 | 1007.5 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-03 | 0 | 24.1 | 16.5 | 29 | 1012.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-04 | 0 | 22.9 | 14.9 | 25.3 | 1014.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-05 | 0 | 24.8 | 14 | 31.6 | 1016.8 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-06 | 0 | 28.8 | 15.9 | 31.7 | 1014.1 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-07 | 0 | 35.1 | 18.3 | 31.5 | 1008.8 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-08 | 0 | 36.1 | 20.2 | 31.4 | 1008.2 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-09 | 0 | 31.1 | 17.5 | 31.1 | 1013.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-10 | 0 | 29.5 | 15.9 | 31.2 | 1014.8 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-11 | 0 | 27.1 | 15.9 | 31 | 1011.3 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-12 | 0 | 33.1 | 15.8 | 31.1 | 1013.8 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-13 | 0 | 34.7 | 17.1 | 31 | 1015.2 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-14 | 0 | 40.4 | 25.7 | 26.1 | 1009.3 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-15 | 0 | 25.3 | 16.3 | 25 | 1019.7 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-16 | 0 | 34.3 | 17.4 | 29.9 | 1016.8 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-17 | 0 | 38.1 | 22.1 | 14 | 1009.5 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-18 | 2.6 | 21.6 | 18.5 | 13.6 | 1015.4 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-19 | 0 | 22.8 | 14.8 | 29.2 | 1020.4 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-20 | 0 | 25.1 | 13.5 | 26.5 | 1017.7 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-21 | 0 | 27.7 | 15.4 | 30.4 | 1015.3 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-22 | 0 | 30.1 | 15.7 | 30.1 | 1016.3 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-23 | 0 | 29.9 | 16.1 | 22.8 | 1013.1 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-24 | 0 | 29.5 | 17 | 30 | 1011.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-25 | 0.2 | 24.4 | 14.4 | 30 | 1011.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-26 | 0 | 27.8 | 14.7 | 29.3 | 1018 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-27 | 0 | 37.8 | 13.4 | 29.4 | 1012.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-28 | 0 | 27.6 | 24.1 | 8.2 | 1008.2 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-29 | 14.2 | 23.5 | 19.2 | 10.5 | 1012.2 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-30 | 0 | 25.2 | 16 | 29 | 1014.9 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-01-31 | 0 | 23.5 | 13.8 | 29.4 | 1011.3 |
| -34.9524 | 138.52 | 2 | 23034 | 2023-02-01 | 0 | 22.1 | 12.7 | 14.5 | 1010.4 |
Config
We prepare the point_time_series_config.json as follows:
Field Explanation
T: describe the name of the time column - i.e.YYYY-MM-DD.
In summary, the values for X, Y, Z, T are obtained from the raw csv - i.e. longitude, latitude, elevation and YYYY-MM-DD respectively.
epsg value cannot be derived from the csv and must be known by the user - i.e. reading dataset metadata on BOM/SILO website.
Command and Output
Save the config as point_time_series_config.json. Run the following command to serialise the metadata: