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

Conditional rendering on vector layer intersection #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alpha-beta-soup
Copy link

This PR adds support for the specification of a vector layer in the "Extents" section of the dialogue. If this option is selected, only tiles that intersect this layer's features (not just the feature extents) are rendered. All other possible tiles are ignored. I use a QgsSpatialIndex to check the intersection between tile.toRectangle() geometry and features in the specified layer, so it is very fast (tested against a 400MB global coastline Esri Shapefile, and again as a PostGIS layer).

An example of the benefit: I used a layer containing only the Australian mainland as my vector intersection source layer. From zooms 0 to 4, only 9 tiles are produced to cover the region of interest, compared to 301 tiles without this additional option.

Let me know if something is not up to scratch.

@alpha-beta-soup
Copy link
Author

cf #56

@alpha-beta-soup
Copy link
Author

Is there anything that you would like to me to do to get this up to a point where it can be merged?

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

Successfully merging this pull request may close these issues.

3 participants