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

Some updates #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jeffw-wherethebitsroam
Copy link

Hi,

This is a collection of a few small updates for ruby_kml:

  • include test kmls in the repository
  • strip leading and trailing space from coordinates
  • allow polygons to have multiple inner boundaries
  • alias KMLFile.objects as features so it can be treated in the same way as containers
  • specify dependency on builder in the gemfile

Hope they seem ok!

Jeff

This is for when the coordinates are read in from an external source and
contain leading or trailing space, which would otherwise result in an
empty coordinate.
- we need the test kmls in the repository to run tests
This update still allows the old way of setting a single inner bounday
via equals:

polygon.inner_boundary_is = LinearRing.new(...)

Is adds support to assign as array:

polygon.inner_boundary_is = [
  LinearRing.new(...),
  LinearRing.new(...)
]

Or add to the existing array:

polygon.inner_boundary_is << LinearRing.new(...)
polygon.inner_boundary_is << LinearRing.new(...)

I have added a test for this
This allows you to loop over the features in the KMLFile in the same way
you loop over features in containers
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.

1 participant