Skip to content

Commit

Permalink
fix shp`s Point namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Apr 6, 2011
1 parent 50ee9e7 commit fbcd95c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/geo_ruby/shp4r/shp.rb
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion 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

Expand Down

0 comments on commit fbcd95c

Please sign in to comment.