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

Specify zones with hemisphere instead of letter, fix spec and coords in 32V #4

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

Conversation

zydeco
Copy link

@zydeco zydeco commented Oct 7, 2014

  • Fix spec test data using Clarke 1866 ellipsoid, it wasn't passing since the radius was changed in 165c72d
  • Fix converting LatLon coordinates in 32V zone to UTM (was returning negative easting)
  • Add ability to specify zones with + or - instead of a letter, for northern (+) and southern (-) hemisphere

@tallakt
Copy link
Owner

tallakt commented Oct 8, 2014

Are you sure this is correct?

@zydeco
Copy link
Author

zydeco commented Oct 8, 2014

Yes, I checked the coordinates with several other sources:

it was previously returning wrong easting when converting LatLon coordinates in the 32V zone, due to using 15 degrees as the origin.

I made a test program to check the WGS-84 coordinates with Jcoord: https://gist.github.com/zydeco/59958820bb8c3a5e14ba

And another to test them all with coordinate-converter:
https://gist.github.com/zydeco/6d8b19b31d7385b294e7

@eliaszica
Copy link

Hi guys, this gem is amazing, thank you! Sorry if this is inappropriate, but please check this out:

[1] pry(main)> coordinate = GeoUtm::LatLon.new -22.34222, -41.76333
=> #<GeoUtm::LatLon:0x007fffbf775990 @lat=-22.34222, @lon=-41.76333>
[2] pry(main)> el = GeoUtm::Ellipsoid::lookup('International')
=> #<GeoUtm::Ellipsoid:0x007fffbb9146d8 @Eccentricity=0.00672267, @name="International", @radius=6378388>
[3] pry(main)> coordinate.to_utm(el)
NoMethodError: undefined method []' for #<GeoUtm::Ellipsoid:0x007fffbb9146d8> from /home/unix/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/geoutm-1.0.2/lib/geoutm/utm.rb:28:in latlon_to_utm'
[4] pry(main)> options = {:ellipsoid => el}
=> {:ellipsoid=>#<GeoUtm::Ellipsoid:0x007fffbb9146d8 @Eccentricity=0.00672267, @name="International", @radius=6378388>}
[5] pry(main)> coordinate.to_utm(options)
=> #<GeoUtm::UTM:0x007fffbda6f440
@e=215365.39252364816,
@ellipsoid=#<GeoUtm::Ellipsoid:0x007fffbb9146d8 @Eccentricity=0.00672267, @name="International", @radius=6378388>,
@n=7526650.674066592,
@zone="24K">

@tallakt
Copy link
Owner

tallakt commented Dec 7, 2016

Eliaszica: could you create a new issue for this. Thanks anyway

@marnen
Copy link

marnen commented Aug 27, 2021

@tallakt There is no way to create a new issue on this repo (except by making a pull request). Can you change this in the repo settings, or at least put something in the README about how to report issues?

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.

None yet

4 participants