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

Implement polygon filter #5

Open
zsoltk opened this issue Dec 4, 2015 · 0 comments
Open

Implement polygon filter #5

zsoltk opened this issue Dec 4, 2015 · 0 comments

Comments

@zsoltk
Copy link
Owner

zsoltk commented Dec 4, 2015

Documentation: Overpass_QL#By_polygon

Implementation guidelines:

  • create class OverpassPolygonFilter extends AbstractOverpassSubQuery
  • add method public OverpassPolygonFilter polygon() to OverpassFilterQuery (by the same logic as OverpassFilterQuery is embedded in OverpassQuery.filterQuery()
  • add method public OverpassPolygonFilter addPoint(double lat, double lon) to OverpassPolygonFilter (should return the query object itself by the logic applied everywhere else in the Query classes)

When done, it should be possible to use the polygon filter like:

new OverpassQuery()
    .filterQuery()
        .node()
        .polygon()
            .addPoint(lat1, lon1)
            .addPoint(lat2, lon2)
            .addPoint(lat3, lon3)
            // ...
        .end()
    .end()
    .output(100)
    .build()
;
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

1 participant