koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
101 stars 32 forks source link

Parameter returnDistinctValues doesn't work #244

Open mcasamayorpolo opened 1 year ago

mcasamayorpolo commented 1 year ago

There is an issue with the parameter returnDistinctValues:true. If I make a query with the following parameters:

The result of the query is the following:

image

As you can see the parameter returnDistinctValues doesn't work. How can I fix this issue?

Thank you in advance for your help. :)

rgwozdz commented 1 year ago

As far as I know, FeatureServer doesn't currently support this parameter. You'd have to design a solution to pass the parameter on to the Winnow dependency, then PR Winnow change to convert the parameter to the appropriate SQL query against the geojson. Winnow uses AlaSQL, which does appear to support DISTINCT: https://github.com/AlaSQL/alasql/wiki/Distinct.