Simple question: How to transform a projected coordinate to lat/lon

66 views
Skip to first unread message

elkarel

unread,
May 28, 2020, 5:16:52 AM5/28/20
to RGeo-Users

Hello, 

I'm very new to RGeo and to Ruby in general. However I've read this blog post about transformations and I came up with the following code:

factory_25831 = RGeo::Cartesian.factory(:srid => 25831)

point_25831
= factory_25831.point(505500.421875, 4699669.4375)

factory_4326
= RGeo::Geographic.spherical_factory(:srid => 4326)

point_4326
= RGeo::Feature.cast(point_25831, :factory => factory_4326, :project => true)

which gives me:

=> #<RGeo::Geographic::SphericalPointImpl:0xe35f6c "POINT (60.421875 90.0)">

But I should have obtained something like long: 3.0668887° / lat: 42.4493345°.

What am I doing wrong?
Thanks in advance.


Reply all
Reply to author
Forward
0 new messages