koopjs / koop-output-geojson

A simple Koop output plugin that filters data from providers and returns in GeoJSON or TopoJSON format
MIT License
2 stars 0 forks source link

query returns all features #1

Closed mapsgeek closed 5 years ago

mapsgeek commented 5 years ago

i have provider file-geojson and the output geojson registered, the server works great with the default feature Services works great for all endpoints including queries in the following form query?where=SOVEREIGNT='Egypt' that works great with the endpoint file-geojson/rest/services/country/FeatureServer/0/

for output-geojson query doesn't work at all, it returns all features i tried the following forms http://localhost:3000/file-geojson/country/geojson?where='SOVEREIGNT'=Egypt this as in the readme for the repo

i tried the same as the first query also but with the output-geojson endpoint all returns all features. can you please provide a valid querying form that actually works ?

mapsgeek commented 5 years ago

to make things simpler i created this testing server with a simple geojson file called " count " as for the readme contains 3 points with field count.

here's the endpoint for the featureServer query, works just fine http://koopserver.herokuapp.com/file-geojson/rest/services/count/FeatureServer/0/query?where=count=1

here's the endpoint for the output geojson query, returns all the 3 features http://koopserver.herokuapp.com/file-geojson/count/geojson?where=count=1 http://koopserver.herokuapp.com/file-geojson/count/geojson?where='count'>2

neither works

haoliangyu commented 5 years ago

Thanks for reporting this issue. I have identified a bug in the request query parameters handling and fixed it at v1.0.1. Please update and check if the new version works for you.

mapsgeek commented 5 years ago

Yup works as expected, thank you