clarisma / geodesk

Fast and storage-efficient spatial database engine for OpenStreetMap data

Home Page:https://docs.geodesk.com/java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should `Feature` derive from `Bounds`?

clarisma opened this issue · comments

It would make sense, but the tricky part are the default methods of Bounds:

  • contains: feature.contains(otherFeature) is ambiguous -- it isn't clear that this check only applies to the bboxes of the features
  • intersects: feature.intersects(otherFeature) is also ambiguous, it returns true if only the bboxes intersect, but user might expect a geometry intersection test

Maybe keep Bounds simple and implement these as static methods in Box?