1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 02:20:28 +00:00
TiddlyWiki5/plugins/tiddlywiki/geospatial/tests/operators/geolookup.tid
btheado bb9c64b38e
Fix olc-decode and geopoint latitude and longitude order in the geospatial plugin (#8437)
* Reverse latitude and longitude in olc-decode tests to match proper geojson output format

* Reverse latitude and longitude in olc-decode to match proper geojson output format

* Reverse latitude and longitude in geopoint expected results to match proper geojson format

* Reverse latitude and longitude in geolookup expected results to match proper geojson format

* Corrected the Oxford to New York distances

* Oxford is actually 12 miles closer to New York than Winchester

Used calculator at https://www.nhc.noaa.gov/gccalc.shtml to check

Reversed latitude and longitude to correct the geojson

* Reversed the latitude and longitude turf.point arguments in the geopoint function

* Swapped latitude and longitude in geopoint function calls
2024-07-28 13:44:09 +01:00

64 lines
1.1 KiB
Plaintext

title: $:/plugins/tiddlywiki/geospatial/tests/operators/geolookup
description: geolookup operator
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Description
geolookup operator
+
title: Output
\whitespace trim
<$text text={{{ [geopoint[100.5],[0.5]geolookup{TestData}jsonget[0],[animal]] }}}/>
+
title: TestData
type: application/json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0.5,102.0]
},
"properties": {
"animal": "amoeba"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[0.0,102.0],[1.0,103.0],[0.0,104.0],[1.0,105.0]
]
},
"properties": {
"animal": "snake",
"length": 100.0
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[[0.0,100.0],[0.0,101.0],[1.0,101.0],[1.0,100.0],[0.0,100.0]]
]
},
"properties": {
"animal": "boxfish",
"prop1": {
"this": "that"
}
}
}
]
}
+
title: ExpectedResult
<p>boxfish</p>