-
Notifications
You must be signed in to change notification settings - Fork 18
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
Be consistent on Tag and Geometry retrieval for OSMContribution #508
Comments
This is not really feasible, as the geometry does not only depend on the entity, but also on the timestamp (of the contribution). If the method were to be moved to the OSMEntity class, usage would be even less readable:
This would be possible, but it would just duplicate an existing method. I don't really see a big benefit of doing so. Would you then also add methods to the |
this is just a design question so I added the low-priority as it does not affect functionality. If I understand correctly the problem is the lazy creation of geometries, correct? Otherwise the return from
This is only the second-best solution so I didn' t think about it too long. Tags and geometry seem different from the "meta-info" attributes but you are right. The current state is just as strange as to get meta-info from the entity but tag- and geom-info from the contribution. |
Ah yes, introducing an intermediate object would indeed be an elegant solution. Then
|
Problem Description
To extract
OSHDBTags
from anOSMContribution
one needs to extract theOSMEntity
first likecontribution.getEntityBefore().getTags()
.The extraction of the
Geometry
from anOSMContribution
is located directly with theOSMContribution
e.g.contribution.getGeometryUnclippedBefore()
.This seems incoherent and makes client code less readable.
Expected Solution
Move
Geometry
-retrieving methods fromOSMContribution
toOSMEntity
.Alternative Solutions
Move
OSHDBTags
retrieving methods toOSMContribution
.The text was updated successfully, but these errors were encountered: