Constraint expressions (selections in DAP2)

11 views
Skip to first unread message

Gaute Hope

unread,
Sep 17, 2020, 2:41:18 AM9/17/20
to OPeNDAP Tech
Hi,

after reading Beto's writeup I started looking into constraint expressions other than projections (or array slices), specifically just a greater than selection on coordinate variable. I cannot get this to work for either hyrax or thredds. Is this implemented? It seems from the text about gradle that it should. I tried the following curls:

Hyrax: 
curl -v -G --data-urlencode "SST.SST" --data-urlencode "SST.COADSX>300" http://localhost:8003/opendap/coads_climatology.nc4.dods

Return: 500: Unimplemented operator.

Thredds: 500: "opendap.dap.DInt32 cannot be cast to opendap.servers.ServerMethods"
Using `300.0`: "Invalid Operator Exception: Binary operations not supported for the type:class thredds.server.opendap.NcSDArray"

Tried using "COADSX>300" or "COADSX>300.0" with and without "SST" first. Is this supposed to work? And is it in use by any of the clients? It does cause some issues with streaming since you have to perform the query first to know the size of the response. Fine as long as the constraint is on coordinate variables, but on big datasets it is problematic.

Regards, Gaute

Nathan Potter

unread,
Sep 17, 2020, 7:04:19 PM9/17/20
to Gaute Hope, James Gallagher, Nathan Potter, OPeNDAP Inc.


> On Sep 16, 2020, at 11:41 PM, Gaute Hope <e...@gaute.vetsj.com> wrote:
>
> Hi,
>
> after reading Beto's writeup I started looking into constraint expressions other than projections (or array slices), specifically just a greater than selection on coordinate variable. I cannot get this to work for either hyrax or thredds. Is this implemented?

Hi Gaute,

I believe that the DAP specifications only define relational operators for the Sequence data type, as the result of subsampling an Array or a Grid is was never defined.

JAmes has been working an implementation of the "subsetting by value syntax" used by ERDDAP in the libdap CE parser - which I believe will; return an error if the domain coordinates are not monotonic.

James will have more to say about the CE syntax. I think the implementation is nearly complete but it has been languishing a bit due overloaded schedules.


Nathan

> It seems from the text about gradle that it should. I tried the following curls:
>
> Hyrax:
> curl -v -G --data-urlencode "SST.SST" --data-urlencode "SST.COADSX>300" http://localhost:8003/opendap/coads_climatology.nc4.dods
>
> Return: 500: Unimplemented operator.
>
> Thredds: 500: "opendap.dap.DInt32 cannot be cast to opendap.servers.ServerMethods"
> Using `300.0`: "Invalid Operator Exception: Binary operations not supported for the type:class thredds.server.opendap.NcSDArray"
>
> Tried using "COADSX>300" or "COADSX>300.0" with and without "SST" first. Is this supposed to work? And is it in use by any of the clients? It does cause some issues with streaming since you have to perform the query first to know the size of the response. Fine as long as the constraint is on coordinate variables, but on big datasets it is problematic.
>
> Regards, Gaute
>
>
> --
> You received this message because you are subscribed to the Google Groups "OPeNDAP Tech" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opendap-tech...@opendap.org.
> To view this discussion on the web visit https://groups.google.com/a/opendap.org/d/msgid/opendap-tech/CABKe4Mv7yGTv8g8jQNBMY0RCDepPRWuy8LxhVUvsy6M%3DGrQBog%40mail.gmail.com.

= = =
Nathan Potter ndp at opendap.org
OPeNDAP, Inc. +1.541.231.3317

Reply all
Reply to author
Forward
0 new messages