Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set Indexing Kind in geometry to whatever it is set on the server. #544

Closed
wants to merge 1 commit into from

Conversation

rshura
Copy link

@rshura rshura commented Mar 24, 2020

When the server is started with the non-default indexing option (through env var), the geojson.geometry indexing is still the default QuadTree. This means that the clipped polygons will not be indexed like stored polygons.

This PR fixed this issue.

@tidwall
Copy link
Owner

tidwall commented Mar 25, 2020

Rather than changing the globally shared geometry.DefaultIndexOptions of the geometry package, I recommend creating a field in the server type and passing it to the Clip() function, or other functions that call geometry.New*(). This will ensure that we never override other dependencies that may use the geometry package and expect that the DefaultIndexOptions doesn't change.

I added a PR #545, which is effectively the same as this one.

@rshura
Copy link
Author

rshura commented Mar 25, 2020

This sounds good to me! Let me close this one, in favor of #545.

@rshura rshura closed this Mar 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants