First of all, apologies if this is really simple, but I just can't seem to figure it out. I am using RGeo to convert between UTM and lat/long, like this;
srs_database = RGeo::CoordSys::SRSDatabase::ActiveRecordTable.new # create the coordinate factory for the relevant UTM zone utm_factory = RGeo::Cartesian.factory(:srid => srid, :srs_database => srs_database) utm_location = utm_factory.point(easting, northing) # create the standard WGS84 lat/long coordinate factory wgs84_proj4 = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' wgs84_factory = RGeo::Geographic.spherical_factory(proj4: wgs84_proj4, :srid => 4326) # perform the UTM -> lat/long cast RGeo::Feature.cast(utm_location, :factory => wgs84_factory, :project => true)
As you can see I am using RGeo::CoordSys::SRSDatabase::ActiveRecordTable
.
I have just upgraded to RGeo 0.5.2
and I note that this class has been deprecated.
Fair enough, but I am now not sure what the alternative methodology is... I have scouted around and can't seem to find the right documentation.
Also, my original method always seemed a bit complex to me - is there a simpler way to accomplish UTM -> lat/long conversion with RGeo?
Thanks in advance!
Ben