vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame^] | 1 | drop dataverse test if exists; |
| 2 | create dataverse test; |
| 3 | use dataverse test; |
| 4 | |
| 5 | create type MyRecord as open { |
| 6 | id: int32, |
| 7 | point: point, |
| 8 | kwds: string |
| 9 | } |
| 10 | |
| 11 | create external dataset MyData(MyRecord) |
| 12 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 13 | (("path"="nc1://data/spatial/spatialData.json"),("format"="adm")); |
| 14 | |
| 15 | write output to nc1:"rttest/spatial_line-intersect-polygon.adm"; |
| 16 | |
| 17 | for $o in dataset('MyData') |
| 18 | where spatial-intersect($o.line1, $o.poly1) |
| 19 | order by $o.id |
| 20 | return {"id":$o.id} |
| 21 | |