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

GeometryBuilder: add method to work with preresolved members #501

Merged
merged 12 commits into from
Apr 20, 2023

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented Apr 6, 2023

Adds a method to generate geometries of OSMEntity objects when their members are already known ("pre-resolved" for a dedicated timestamp). Also adds (or makes public) methods to explicitly create LineString / Polygon geometries for OSMWays, and MultiPolygon / GeometryCollection geometries for OSMRelations.

These methods are bundled in a new OSHDBGeometryBuilderInternal class, which now also contains the concrete geometry building algorithms. For clarity and backwards compatibility, the main OSHDBGeometryBuilder class contains only the "default" getGeometry method (which works on entity plus timestamp) alongside the non-entity related geometry building methods .

Checklist

the auxiliary data contains referenced child (and potentially child-child) entities of the entity to build the geometry of. in this case, these pre-resolved entities are used instead of the entity's own members data.
@tyrasd tyrasd added the enhancement New feature or request label Apr 6, 2023
@tyrasd tyrasd requested a review from rtroilo April 6, 2023 14:47
@tyrasd tyrasd self-assigned this Apr 6, 2023
@tyrasd tyrasd changed the title 🚧 GeometryBuilder: add method to work with preresolved members GeometryBuilder: add method to work with preresolved members Apr 6, 2023
@tyrasd tyrasd force-pushed the geometrybuilder-preresolved-childs branch from 7493f83 to bc67f33 Compare April 19, 2023 15:39
* instead of static methods, the builder is instantiated with a TagInterpreter
* change auxiliary data to lists
* make a few more methods public
Copy link
Member

@rtroilo rtroilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@tyrasd tyrasd merged commit 3cf305a into master Apr 20, 2023
@tyrasd tyrasd deleted the geometrybuilder-preresolved-childs branch April 20, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants