I am trying to get neighborhood data in my application, and I am having problems with the data that I use, which I got from here .
This file contains a shapefile in which there are neighborhoods in San Francisco. I am using the Ruby on Rails framework, and now I am using GeoRuby to parse the shapefile.
The code is as follows:
def self.run_import shpfile = '/path/to/realtor_neighborhoods/realtor_neighborhoods' ShpFile.open(shpfile) do |shp| shp.each do |shape|
The code is able to parse the file, but I cannot understand the coordinates as interpreted. All points matter in millions when I expect coordinates between -180 and 180, for actual latitude and longitude. Take a look at an example example:
<GeoRuby::SimpleFeatures::Point:0x00000104566a08 @srid=4326, @with_z=false, \ @with_m=false, @x=6015402.9999795845, @y=2114960.4999904726, @z=0.0, @m=0.0>,
What is the format of these coordinate values? How can I convert them to values ββthat matter to me? (i.e. latitude / longitude based on the spatial system SRID 4326 <=> WGS84)
Thank you in advance!
ruby ruby-on-rails gis postgis shapefile
Larry
source share