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

Add geometry collection support for contains #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaaboaye
Copy link

Enables contains check for Geo.GeometryCollection

Example:

a = %Geo.GeometryCollection{
  geometries: [
    %Geo.Polygon{
      coordinates: [
        [
          {16.5234375, 55.97379820507658},
          {10.8984375, 52.696361078274485},
          {16.5234375, 49.15296965617042},
          {25.3125, 50.51342652633956},
          {25.3125, 54.36775852406841},
          {16.5234375, 55.97379820507658}
        ]
      ],
      properties: %{},
      srid: nil
    }
  ],
  properties: %{},
  srid: nil
}

b = %Geo.Point{coordinates: {19.1343786, 51.9537505}, properties: %{}, srid: nil}

Topo.contains? a, b
true

@pkinney
Copy link
Owner

pkinney commented Sep 12, 2019

@kaaboaye This is a great addition, thank you. It makes sense to add this in as it completes the coverage of the types available in the Geo package.

Before we merge it in, I think it should probably be added to all of the other operations at the same time and probably needs a bit of testing and documentation around it as well if you are up for it.

@kaaboaye
Copy link
Author

kaaboaye commented Sep 12, 2019 via email

@pkinney pkinney mentioned this pull request May 6, 2020
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.

2 participants