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

IllegalArgumentException caused by historic data for ways #423

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

danielfeismann
Copy link
Member

resolves #422

@danielfeismann danielfeismann added the bug Something isn't working label Apr 30, 2024
@danielfeismann danielfeismann self-assigned this Apr 30, 2024
@danielfeismann danielfeismann added this to the Version 1.0 milestone Apr 30, 2024
@danielfeismann danielfeismann marked this pull request as ready for review May 8, 2024 14:48
Copy link
Member

@staudtMarius staudtMarius left a comment

Choose a reason for hiding this comment

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

Just one question from my side.

Comment on lines 126 to 130
entities.filter {
case entity: E if entity.metaInformation.isDefined =>
entity.metaInformation.exists(_.version.contains(maxVersion))
case _ => true
}
Copy link
Member

@staudtMarius staudtMarius May 10, 2024

Choose a reason for hiding this comment

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

Does this work if we have two versions of the same entity one with metaInformation and one without?
I think in this case, both versions are returned, which could cause problems. Maybe you could add a test for this case.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! I changed this into a logger warning and filter out these entities.

Copy link
Member

@staudtMarius staudtMarius May 14, 2024

Choose a reason for hiding this comment

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

What happens if we have an entity that occures only once but have no metaInformation? Will it be filtered out too? I think this could cause a porblem when generating grids?

Maybe you could count the occurences of all enitity ids and only use this filter for those entites that have multiple occurences.

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I checked there is always a version at the entity. So imho this is very unlikely. But sure we can split the entities and filter only those with multiple occurences. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, there are of course options to exclude the metainformation. Maybe we should think about to make them mandatory. Will discuss this tomorrow within the sprint :)

Copy link
Member

Choose a reason for hiding this comment

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

@danielfeismann Do you have an update on this part?

Copy link
Member

Choose a reason for hiding this comment

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

Honestly, OSM data that includes multiple versions of the same entity is just broken to me. I'd be fine with just assuming that the OSM data we're handling is coherent. Do we really need the meta information then?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree with you, @sebastian-peter. Tried it again by using overpass, worked well at that location. So I'm fine with closing this one.

…ic-data

# Conflicts:
#	src/main/scala/edu/ie3/osmogrid/lv/LvGridGeneratorSupport.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalArgumentException caused by historic data for ways
3 participants