diff --git a/plugins/tiddlywiki/geospatial/tests/operators/geodifference.tid b/plugins/tiddlywiki/geospatial/tests/operators/geodifference.tid new file mode 100644 index 000000000..5f525cebc --- /dev/null +++ b/plugins/tiddlywiki/geospatial/tests/operators/geodifference.tid @@ -0,0 +1,54 @@ +title: $:/plugins/tiddlywiki/geospatial/tests/operators/geodifference +description: geodifference operator +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Description + +geodifference operator ++ +title: Output + +\whitespace trim +<$text text={{{ =[{LayerOne}] =[{LayerTwo}] +[geodifference[]] }}}/> ++ +title: LayerOne +type: application/json + +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [[100.0,0.0],[102.0,0.0],[102.0,2.0],[100.0,2.0],[100.0,0.0]] + ] + } + } + ] +} ++ ++ +title: LayerTwo +type: application/json + +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [[101.0,1.0],[103.0,1.0],[103.0,3.0],[101.0,3.0],[101.0,1.0]] + ] + } + } + ] +} ++ +title: ExpectedResult + +
{"type":"FeatureCollection","features":[]}
\ No newline at end of file diff --git a/plugins/tiddlywiki/geospatial/tests/operators/geointersect.tid b/plugins/tiddlywiki/geospatial/tests/operators/geointersect.tid new file mode 100644 index 000000000..3a205df97 --- /dev/null +++ b/plugins/tiddlywiki/geospatial/tests/operators/geointersect.tid @@ -0,0 +1,54 @@ +title: $:/plugins/tiddlywiki/geospatial/tests/operators/geointersect +description: geointersect operator +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Description + +geointersect operator ++ +title: Output + +\whitespace trim +<$text text={{{ =[{LayerOne}] =[{LayerTwo}] +[geointersect[]] }}}/> ++ +title: LayerOne +type: application/json + +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [[100.0,0.0],[102.0,0.0],[102.0,2.0],[100.0,2.0],[100.0,0.0]] + ] + } + } + ] +} ++ ++ +title: LayerTwo +type: application/json + +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [[101.0,1.0],[103.0,1.0],[103.0,3.0],[101.0,3.0],[101.0,1.0]] + ] + } + } + ] +} ++ +title: ExpectedResult + +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[101,1],[102,1],[102,2],[101,2],[101,1]]]}}]}
\ No newline at end of file diff --git a/plugins/tiddlywiki/geospatial/tests/operators/geounion.tid b/plugins/tiddlywiki/geospatial/tests/operators/geounion.tid new file mode 100644 index 000000000..faa63cccd --- /dev/null +++ b/plugins/tiddlywiki/geospatial/tests/operators/geounion.tid @@ -0,0 +1,54 @@ +title: $:/plugins/tiddlywiki/geospatial/tests/operators/geounion +description: geounion operator +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Description + +geounion operator ++ +title: Output + +\whitespace trim +<$text text={{{ =[{LayerOne}] =[{LayerTwo}] +[geounion[]] }}}/> ++ +title: LayerOne +type: application/json + +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [[100.0,0.0],[102.0,0.0],[102.0,2.0],[100.0,2.0],[100.0,0.0]] + ] + } + } + ] +} ++ ++ +title: LayerTwo +type: application/json + +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [[101.0,1.0],[103.0,1.0],[103.0,3.0],[101.0,3.0],[101.0,1.0]] + ] + } + } + ] +} ++ +title: ExpectedResult + +{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[100,0],[102,0],[102,1],[103,1],[103,3],[101,3],[101,2],[100,2],[100,0]]]}}]}
\ No newline at end of file