Skip to content

Find area of intersection of two polygons using Cypher query #386

@TomMRiddleJr

Description

@TomMRiddleJr

I have this use case where: -

  • I have a list of destination polygons and a source polygon (destination and source are just used to denote polygons).
  • What I want to do is find area of intersection of the source polygon with each of the destination polygons
  • Then select the one with the maximum area of intersection.

Polygon here is list of Points, of course.

For instance, in the image shown below: -

  • I have destination polygons D1 to D4
  • Source polygon -> S
  • Return D4 since it has max area of intersection with S

IMG-0033

I could not find an example to calculate area of intersection, let alone iterating and finding the maximum. Could you please help me with this problem statement? @craigtaverner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions