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

osmpbf: add filter functions #30

Merged
merged 5 commits into from
Apr 21, 2022
Merged

osmpbf: add filter functions #30

merged 5 commits into from
Apr 21, 2022

Conversation

paulmach
Copy link
Owner

@paulmach paulmach commented Feb 8, 2022

This is the completion of #27

Adds filter functions

type Scanner struct {
	// If the Filter function is false, the element well be skipped
	// at the decoding level. The functions should be fast, they block the
	// decoder, there are `procs` number of concurrent decoders.
	// Elements can be stored if the function returns true. Memory is
	// reused if the filter returns false.
	FilterNode     func(*osm.Node) bool
	FilterWay      func(*osm.Way) bool
	FilterRelation func(*osm.Relation) bool

	// contains filtered or unexported fields
}

@oflebbe

@paulmach paulmach merged commit 022ffc6 into master Apr 21, 2022
@paulmach paulmach deleted the filter branch April 21, 2022 19:23
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

Successfully merging this pull request may close these issues.

2 participants