-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to 'compact' GeoJSON result into single feature #100
Comments
General consensus is yes, this feature is useful. Users want to retain ability to choose which return format is returned |
Consider 'compact' instead of 'compress' as the name of the variable because compress is generally associated with compression algorithms like zip or bz. Also, need to add documentation section describing how we handle the 'properties' object for features returned from hydrocron. The GeoJSON RFC specifies that 'properties' can be any valid JSON object (https://datatracker.ietf.org/doc/html/rfc7946#section-3.2). So, it is up to us to describe to end users how that object is structured. |
@frankinspace - Do you think we should return a compact response for cases where the |
Good idea, yes agreed. I was thinking we would wait to make compact the default when we update to v2 of the API because it's technically a breaking change to the API (changing the format/schema of the returned object would break clients). But, since the |
Currently when a time series is requested as GeoJSON output, the result is structured as a
FeatureCollection
where each feature in the collection is the same feature at different time steps. Each feature also includes it's own distinct geometry.I propose that we have an option that would allow the user to instead get back only a single
Feature
where theproperties
of that feature contain all the fields requested by the user but as a list instead of a single value.This would save a lot on the size of the returned GeoJSON object for long time series results which would help with both egress cost and individual request latency.
Example:
Would instead become:
In practice we would have to use the geometry from one of the entries in the database but I don't think it is too important which one is chosen.
@torimcd @cassienickles interested in your thoughts on this.
The text was updated successfully, but these errors were encountered: