Sha256: a879445b6cd48392465311f6d79e9bdf35a4c2245b42e8fd9ebd4398f6d37e64
Contents?: true
Size: 604 Bytes
Versions: 3
Compression:
Stored size: 604 Bytes
Contents
class Proj4::Projection @@wgs84 = nil def self.wgs84 @@wgs84 ||= Proj4::Projection.new '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' end @@goggle = nil def self.google @@google ||= Proj4::Projection.new '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs' end def self.for_srid(srid) case srid when 4326 wgs84 when 900913 google else begin Proj4::Projection.new 'init=epsg:'+srid.to_s rescue raise "Unsupported srid: #{srid}" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
georuby-ext-0.0.5 | lib/georuby-ext/proj4.rb |
georuby-ext-0.0.4 | lib/georuby-ext/proj4.rb |
georuby-ext-0.0.3 | lib/georuby-ext/proj4.rb |