NOAA-OWP / wres

Code and scripts for the Water Resources Evaluation Service
Other
2 stars 1 forks source link

As a user, when obtaining features from WRDS where a spatial mask is applied, I want it to obtain coordinate information from WRDS and apply the spatial mask before reading inputs #119

Open epag opened 3 weeks ago

epag commented 3 weeks ago

Author Name: Hank (Hank) Original Redmine Issue: 118346, https://vlab.noaa.gov/redmine/issues/118346 Original Date: 2023-07-14


See #50561. Generally, the data is first read in and then the declared @spatial_mask@ is applied to subset what was read in. This assumes the coordinate information is supplied with the data.

However, when the WRDS @feature_service@ is employed, then coordinates can be obtained from WRDS along with the features, so that the @spatial_mask@ can be applied before reading inputs. This would save time by preventing unnecessary reading of input data that will not actually be used in the evaluation.

NOTE: Features are obtained from WRDS using the WRDS @identifiers=true@ option. Coordinates will not be obtained when that option is applied. For this to work, features from WRDS will need to be obtained without that option set and coordinates parsed from the returned JSON. I think.

Not a particularly high priority. Putting it in the backlog,

Hank

epag commented 3 weeks ago

Original Redmine Comment Author Name: James (James) Original Date: 2023-07-14T12:18:54Z


Thanks, useful to note that snowflake parameter, @identifiers=true@, wasn't aware of that. In other words, the request to wrds will need to be adjusted too, depending on whether a @spatial_mask@ is defined. That said, @identifiers=false@ alludes to some potential confusion, because we want the coordinates AND the names/identifiers. Honestly, it would probably have been better for WRDS to return a single thing for a single request, ditch the snowflake parameters. Oh well.

epag commented 3 weeks ago

Original Redmine Comment Author Name: Hank (Hank) Original Date: 2023-07-14T12:48:42Z


The snowflake parameters was asked for by someone (Alex?) who wanted to be able to obtain only the crosswalk, not all the extra feature metadata.

Yeah, "identifiers" just not a good option name, as you imply, since "identifiers=false" does +not+ mean identifiers are left out. Rather, it means you get all of the metadata. To be clear, best practice is to just remove @identifiers@ altogether from the URL if you want all of the location metadata. Folks don't use "identifiers=false".

Thanks,

Hank

epag commented 3 weeks ago

Original Redmine Comment Author Name: James (James) Original Date: 2023-07-14T12:51:30Z


Thanks. In that case, I don't think we should use it either, under any circumstances. There is no advantage (trivial bytes saved over the wire) and, in fact, you won't get any coordinate metadata in your statistics blobs, which is undesirable.

epag commented 3 weeks ago

Original Redmine Comment Author Name: Hank (Hank) Original Date: 2023-07-14T12:55:04Z


One ticket enough to cover both removing "identifiers=true" and changing how @spatial_mask@ is handled?

FYI... The only advantage is response time and size of the returned JSON. Very small advantages weighed against big disadvantages.

Hank

epag commented 3 weeks ago

Original Redmine Comment Author Name: James (James) Original Date: 2023-07-14T13:10:25Z


I think eliminating it can be part of the solution to this ticket, no real need for a separate one.