blob: 2295947ab74052bd8a8b1157a7ff1ede0af9166a [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse test if exists;
2create dataverse test;
3use dataverse test;
4
5create type MyRecord as open {
6 id: int32,
7 point: point,
8 kwds: string
9}
10
11create external dataset MyData(MyRecord)
12using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
13(("path"="nc1://data/spatial/spatialData.json"),("format"="adm"));
14
15write output to nc1:"rttest/spatial_circle-intersect-circle.adm";
16
17for $o in dataset('MyData')
salsubaiee81b3b492013-03-15 02:01:13 +000018where spatial-intersect(create-circle(create-point(0.0,0.0), 5.0), $o.circle)
vinayakb38b7ca42012-03-05 05:44:15 +000019order by $o.id
20return {"id":$o.id}
21