blob: b32b6a3489f37d3d6bec159495bb9f6d6ec5c17b [file] [log] [blame]
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type MyRecord as open {
id: int32,
point: point,
kwds: string
}
create external dataset MyData(MyRecord)
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/spatial/spatialData.json"),("format"="adm"));
write output to nc1:"rttest/spatial_rectangle-intersect-rectangle.adm";
for $o in dataset('MyData')
where spatial-intersect($o.rec, create-rectangle(create-point(4.5,9.0), create-point(-1.0,5.0)))
order by $o.id
return {"id":$o.id}