From fbcd95cef06cf271a3334c840ebbb0e07ce06fd0 Mon Sep 17 00:00:00 2001 From: Marcos Piccinini Date: Wed, 6 Apr 2011 17:26:47 -0300 Subject: [PATCH] fix shp`s Point namespace --- lib/geo_ruby/shp4r/shp.rb | 10 +++++----- spec/geo_ruby/shp4r/shp_spec.rb | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/geo_ruby/shp4r/shp.rb b/lib/geo_ruby/shp4r/shp.rb index 95f1066..805d471 100644 --- a/lib/geo_ruby/shp4r/shp.rb +++ b/lib/geo_ruby/shp4r/shp.rb @@ -238,7 +238,7 @@ def get_record(i) @shp.seek(16,IO::SEEK_CUR)#extent ms = Array.new(num_points) {@shp.read(8).unpack("E")[0]} points = Array.new(num_points) do |i| - Point.from_x_y_z_m(xys[i][0],xys[i][1],zs[i],ms[i]) + GeoRuby::SimpleFeatures::Point.from_x_y_z_m(xys[i][0],xys[i][1],zs[i],ms[i]) end linear_rings = Array.new(num_parts) do |i| GeoRuby::SimpleFeatures::LinearRing.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::default_srid,true,true) @@ -256,7 +256,7 @@ def get_record(i) ms = Array.new(num_points) {@shp.read(8).unpack("E")[0]} points = Array.new(num_points) do |i| - Point.from_x_y_z_m(xys[i][0],xys[i][1],zs[i],ms[i]) + GeoRuby::SimpleFeatures::Point.from_x_y_z_m(xys[i][0],xys[i][1],zs[i],ms[i]) end geometry = GeoRuby::SimpleFeatures::MultiPoint.from_points(points,GeoRuby::SimpleFeatures::default_srid,true,true) @@ -274,7 +274,7 @@ def get_record(i) @shp.seek(16,IO::SEEK_CUR) ms = Array.new(num_points) {@shp.read(8).unpack("E")[0]} points = Array.new(num_points) do |i| - Point.from_x_y_m(xys[i][0],xys[i][1],ms[i]) + GeoRuby::SimpleFeatures::Point.from_x_y_m(xys[i][0],xys[i][1],ms[i]) end line_strings = Array.new(num_parts) do |i| GeoRuby::SimpleFeatures::LineString.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::default_srid,false,true) @@ -293,7 +293,7 @@ def get_record(i) @shp.seek(16,IO::SEEK_CUR) ms = Array.new(num_points) {@shp.read(8).unpack("E")[0]} points = Array.new(num_points) do |i| - Point.from_x_y_m(xys[i][0],xys[i][1],ms[i]) + GeoRuby::SimpleFeatures::Point.from_x_y_m(xys[i][0],xys[i][1],ms[i]) end linear_rings = Array.new(num_parts) do |i| GeoRuby::SimpleFeatures::LinearRing.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::default_srid,false,true) @@ -309,7 +309,7 @@ def get_record(i) ms = Array.new(num_points) {@shp.read(8).unpack("E")[0]} points = Array.new(num_points) do |i| - Point.from_x_y_m(xys[i][0],xys[i][1],ms[i]) + GeoRuby::SimpleFeatures::Point.from_x_y_m(xys[i][0],xys[i][1],ms[i]) end geometry = GeoRuby::SimpleFeatures::MultiPoint.from_points(points,GeoRuby::SimpleFeatures::default_srid,false,true) diff --git a/spec/geo_ruby/shp4r/shp_spec.rb b/spec/geo_ruby/shp4r/shp_spec.rb index e0edd35..c6648e9 100644 --- a/spec/geo_ruby/shp4r/shp_spec.rb +++ b/spec/geo_ruby/shp4r/shp_spec.rb @@ -1,7 +1,6 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') include GeoRuby::Shp4r -include GeoRuby::SimpleFeatures describe Shp4r do