Skip to content

Instantly share code, notes, and snippets.

Created October 19, 2014 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/04ec2b5cf5a5d582806e to your computer and use it in GitHub Desktop.
Save anonymous/04ec2b5cf5a5d582806e to your computer and use it in GitHub Desktop.
require 'rgeo'
gauss_kruger_3_factory = RGeo::Cartesian.factory(:proj4 => '+proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs')
karlsruhe = gauss_kruger_3_factory.point(3456010.263000, 5430639.147000)
wgs84_factory = RGeo::Geographic.spherical_factory()
karlsruhe_latlon = RGeo::Feature.cast(karlsruhe, :type => RGeo::Feature::Point,
:factory => wgs84_factory, :project => true)
puts karlsruhe_latlon.x
puts karlsruhe_latlon.y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment