Skip to content

MB-66210: LineString and MultiLineString changes#19

Merged
Likith101 merged 1 commit into
masterfrom
linestrings
May 7, 2025
Merged

MB-66210: LineString and MultiLineString changes#19
Likith101 merged 1 commit into
masterfrom
linestrings

Conversation

@Likith101

Copy link
Copy Markdown
Member
  • Changed polylines intersects polygons function to first make a shape index of the polygons and then perform a series of contains point queries to identify if any of the vertices fall inside the polygon. If this doesn't yield a result, it means that there is an edge crossing with no vertex overlap, so we perform all edge intersect queries
  • Removed unnecessary loop within edge crossing logic
  • Changed polyline intersects envelope by checking each vertex's bounds and then doing an edge crossing check
  • Removed unecessary loop within this edge crossing logic as well
  • Fixed polyline intersects circle logic. Previously would only check a single edge of the polyline before exiting the function
  • Added contains logic for points and multipoints as they are very similar to intersects.
  • Added appropriate test cases covering edge cases

Note
LineString contains LineString is theoretically possible, but there is no native support for this and trying to come up with an implementation myself proved futile. Perhaps we can consider this as a TODO for the future.

Comment thread geojson/geojson_shapes_impl.go

@CascadingRadium CascadingRadium left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, can add the linestring contains linestring/multilinestring as optional

@Likith101 Likith101 merged commit 96ba0b9 into master May 7, 2025
9 checks passed
@Likith101 Likith101 deleted the linestrings branch May 8, 2025 14:31
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

Successfully merging this pull request may close these issues.

3 participants