Skip to content

Commit 6be017b

Browse files
authored
36 update docs after snapshot and geojson changes (#37)
* Added centroid fields and new fields in geojson. * Added geojson to snapshot migration guide.
1 parent b8797f9 commit 6be017b

1 file changed

Lines changed: 87 additions & 18 deletions

File tree

pasturekey.md

Lines changed: 87 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ When using these endpoints for a device, specify the device ID
4141

4242
Date | Change | endpoints
4343
---- | ------ | --------
44+
2026-02-13 | Added centroid attribute to features properties | /geom, /snapshot
45+
2026-02-13 | Improved response times of the /snapshot endpoint, especially for large properties | /snapshot
4446
2026-02-11 | Bug fix: /snapshot now correctly returns nearest, prior date when data not available for given date | /snapshot
4547
2026-02-09 | Added the change_rate attribute to response of several endpoints | /snapshot, /gettsdmgreenstats, /gettsdmdeadstats, /getfcstats
4648
2026-02-06 | Added tsdmgreen, tsdmdead, and fc stats to response of /snapshot endpoint | /snapshot
@@ -164,7 +166,8 @@ curl -s -X POST \
164166
"properties": {
165167
"paddock_id": "4c4f1966-7436-4ac1-88c2-8cc8f46969c3",
166168
"paddock_name": "charlies lane",
167-
"area_ha": 37.11
169+
"area_ha": 37.11,
170+
"centroid": "149.81772,-26.76692"
168171
},
169172
"geometry": {
170173
"type": "Polygon",
@@ -214,6 +217,7 @@ curl -s -X GET \
214217
"paddock_id": "4c4f1966-7436-4ac1-88c2-8cc8f46969c3",
215218
"paddock_name": "charlies lane",
216219
"area_ha": 326,
220+
"centroid": "149.81772,-26.76692",
217221
"stats": [
218222
{
219223
"measure": "tsdm",
@@ -851,7 +855,7 @@ curl -s -X POST \
851855

852856
#### /geojson
853857

854-
> ⚠️ Deprecated and replaced with /snapshot.
858+
> ⚠️ Deprecated and replaced with /snapshot. See migration guide below.
855859
856860
Get a map (geojson) of the farm, attributed with key statistics
857861
for the requested date.
@@ -878,26 +882,46 @@ curl -s -X GET \
878882
```json
879883
{
880884
"type": "FeatureCollection",
881-
"name": "e354f641-fce2-4299-a7d4-561dc31597d2_20250210",
885+
"name": "name": "340dec85-ac4b-422d-beec-a7304b596fb3_2025-09-30",
882886
"features": [
883887
{
884888
"type": "Feature",
885889
"properties": {
886-
"centroid": "149.81772,-26.76692",
887-
"property_name": "e354f641-fce2-4299-a7d4-561dc31597d2",
888-
"paddock_name": "charlies lane",
889-
"property_id": "e354f641-fce2-4299-a7d4-561dc31597d2",
890-
"paddock_id": "4c4f1966-7436-4ac1-88c2-8cc8f46969c3",
891-
"paddock_area_ha": 37.11,
892-
"capture_date": "20250210",
890+
"paddock_id": "82dc9b7f-3ba5-42eb-b517-842798975385",
891+
"paddock_name": "unknown",
892+
"centroid": "148.963421,-32.978768",
893+
"property_id": "340dec85-ac4b-422d-beec-a7304b596fb3",
894+
"property_name": "340dec85-ac4b-422d-beec-a7304b596fb3",
895+
"integration_id": "TBD",
896+
"paddock_area_ha": 10.3534,
897+
"capture_date": "20250930",
893898
"percent_captured": 100,
894-
"estimated_median_tsdm": 1242,
895-
"estimated_median_tsdm_error": 114,
896-
"estimated_foo": 46090,
897-
"estimated_tsdm_change_rate": -10,
898-
"trend": "Decreasing",
899-
"raw_median_tsdm": 1225,
900-
"raw_foo": 45459
899+
"estimated_median_tsdm": 1200,
900+
"estimated_median_tsdm_error": 156,
901+
"estimated_foo": 12424,
902+
"estimated_tsdm_change_rate": 22,
903+
"trend": "Increasing",
904+
"raw_median_tsdm": 729,
905+
"raw_foo": 7547,
906+
"estimated_median_tsdmgreen": 1073,
907+
"estimated_foo_green": 11109,
908+
"estimated_tsdmgreen_change_rate": 25,
909+
"trend_tsdmgreen": "Increasing",
910+
"estimated_median_tsdmdead": 127,
911+
"estimated_foo_dead": 1314,
912+
"estimated_tsdmdead_change_rate": -2,
913+
"trend_tsdmdead": "Steady",
914+
"capture_date_fc": "20250930",
915+
"percent_captured_fc": 100,
916+
"fcgreen_median": 76,
917+
"fcgreen_change_rate": 0,
918+
"fcgreen_trend": "Steady",
919+
"fcdead_median": 9,
920+
"fcdead_change_rate": 0,
921+
"fcdead_trend": "Steady",
922+
"fcbare_median": 15,
923+
"fcbare_change_rate": 0,
924+
"fcbare_trend": "Steady"
901925
},
902926
"geometry": {
903927
"type": "MultiPolygon",
@@ -939,8 +963,53 @@ Notes:
939963
- Legend is a colour table; it can be used to style returned geojson if
940964
you wish by linking it with the estimated_median_tsdm field
941965
(the legend attribute is a geojson foreign member:
942-
https://www.rfc-editor.org/rfc/rfc7946#section-6.1)
966+
https://www.rfc-editor.org/rfc/rfc7946#section-6.1)
967+
943968

969+
**Migration guide from /geojson to /snapshot**
970+
971+
The /snapshot endpoint is a more flexible and extensible replacement for the
972+
/geojson endpoint. The structure of the stats objects returned by /snapshot
973+
are consistent with those returned from the statistics endpoints
974+
such as /gettsdmstats.
975+
976+
977+
/geojson attribute | /snapshot attribute
978+
------------------|-----------------
979+
property_id | property_id
980+
paddock_id | 'properties' paddock_id
981+
paddock_name | 'properties' paddock_name
982+
centroid | 'properties' centroid
983+
paddock_area_ha | 'properties' paddock_area_ha
984+
capture_date | 'tsdm' stats: dates[0]
985+
percent_captured | 'tsdm' stats: captured[0]
986+
estimated_median_tsdm | 'tsdm' stats: median[0]
987+
estimated_median_tsdm_error | 'tsdm' stats: median_error[0]
988+
estimated_foo | 'tsdm' stats: foo[0]
989+
estimated_tsdm_change_rate | 'tsdm' stats: change_rate[0]
990+
trend | 'tsdm' stats: trend
991+
raw_median_tsdm | 'tsdm' stats: captured_median[0]
992+
raw_foo | 'tsdm' stats: captured_foo[0]
993+
estimated_median_tsdmgreen | 'tsdmgreen' stats: median[0]
994+
estimated_foo_green | 'tsdmgreen' stats: foo[0]
995+
estimated_tsdmgreen_change_rate | 'tsdmgreen' stats: change_rate[0]
996+
trend_tsdmgreen | 'tsdmgreen' stats: trend
997+
estimated_median_tsdmdead | 'tsdmdead' stats: median[0]
998+
estimated_foo_dead | 'tsdmdead' stats: foo[0]
999+
estimated_tsdmdead_change_rate | 'tsdmdead' stats: change_rate[0]
1000+
trend_tsdmdead | 'tsdmdead' stats: trend
1001+
capture_date_fc | 'fcgreen' stats: dates[0]
1002+
percent_captured_fc | 'fcgreen' stats: captured[0]
1003+
fcgreen_median | 'fcgreen' stats: median[0]
1004+
fcgreen_change_rate | 'fcgreen' stats: change_rate[0]
1005+
fcgreen_trend | 'fcgreen' stats: trend
1006+
fcdead_median | 'fcdead' stats: median[0]
1007+
fcdead_change_rate | 'fcdead' stats: change_rate[0]
1008+
fcdead_trend | 'fcdead' stats: trend
1009+
fcbare_median | 'fcbare' stats: median[0]
1010+
fcbare_change_rate | 'fcbare' stats: change_rate[0]
1011+
fcbare_trend | 'fcbare' stats: trend
1012+
integration_id | Deprecated
9441013

9451014
## Device workflow example
9461015

0 commit comments

Comments
 (0)