Skip to content
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

Filtering the vector tile endpoints based on priority and zoom levels. #124

Open
hasan9206 opened this issue Jan 23, 2016 · 2 comments
Open

Comments

@hasan9206
Copy link

I have noticed that while the other geometries are simplified at different zoom levels, this is not the case with points, the http://localhost:3001/services/postgis/pois/geom/vector-tiles/10/719/410.pbf (point layer) is 212kb, and as we go to higher zoom levels it is sliced. I have over 27k points in the layer and when the endpoints are created for lower zoom levels, (9 or 10) they take a long time to load and process.

According to VectorTiles.md , I can filter the results by adding the where query string in the URL, :

http://localhost:3001/services/postgis/pois/geom/vector-tiles/10/719/410.pbf?where=priority%3C3 

But using the where query string in the URL will filter all the results, while I only want to filter the results based on zoom levels.

Is there a way to get different different query strings for different zoom levels, so I can filter my results on the fly?

@DanielShinken
Copy link

Hi!, did you manage to solve this issue?, I'm using something like this

http://localhost:3000/services/postgis/mapas_dip2013/geom/vector-tiles/{z}/{x}/{y}.pbf?fields=id,ganador,seccion this does work, returning those fields, but if I want to filter like this

http://localhost:3000/services/postgis/mapas_dip2013/geom/vector-tiles/{z}/{x}/{y}.pbf?where=ano%3d2013 as the docs said is not filtering my tiles, did you manage to solve this? How did you work around on this? greetings!

@hasan9206
Copy link
Author

@DanielShinken I wasn't able to get the Vector Tiles to filter data based on zoom levels, which was what I wanted to do ( PGRestAPI was returning all the data at all the zoom levels, which was a bit of overkill ). I couldn't find a workaround to this as PGRestAPI uses the same query on all zoom levels ( one query per table ) I switched over to TileStache and was able to get my queries to work (granted TileStache has a much steeper learning curve and requires alot more work to set up and get running).

As for the query filter you are referring to, I was able to get it to work sometimes but not always, I'm not sure what I was doing wrong or different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants