Skip to content

Commit

Permalink
Corrected a namespace problem
Browse files Browse the repository at this point in the history
  • Loading branch information
gvellut committed Apr 1, 2007
1 parent f9c9618 commit c85c366
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions lib/geo_ruby/shp4r/shp.rb
Expand Up @@ -177,12 +177,12 @@ 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_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
line_strings = Array.new(num_parts) do |i|
GeoRuby::SimpleFeatures::LineString.from_points(points[(parts[i])...(parts[i+1])],DEFAULT_SRID,true,true)
GeoRuby::SimpleFeatures::LineString.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::DEFAULT_SRID,true,true)
end
geometry = GeoRuby::SimpleFeatures::MultiLineString.from_line_strings(line_strings,DEFAULT_SRID,true,true)
geometry = GeoRuby::SimpleFeatures::MultiLineString.from_line_strings(line_strings,GeoRuby::SimpleFeatures::DEFAULT_SRID,true,true)


when ShpType::POLYGONZ
Expand All @@ -201,9 +201,9 @@ def get_record(i)
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])],DEFAULT_SRID,true,true)
GeoRuby::SimpleFeatures::LinearRing.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::DEFAULT_SRID,true,true)
end
geometry = GeoRuby::SimpleFeatures::MultiPolygon.from_polygons([GeoRuby::SimpleFeatures::Polygon.from_linear_rings(linear_rings)],DEFAULT_SRID,true,true)
geometry = GeoRuby::SimpleFeatures::MultiPolygon.from_polygons([GeoRuby::SimpleFeatures::Polygon.from_linear_rings(linear_rings)],GeoRuby::SimpleFeatures::DEFAULT_SRID,true,true)


when ShpType::MULTIPOINTZ
Expand All @@ -219,7 +219,7 @@ def get_record(i)
Point.from_x_y_z_m(xys[i][0],xys[i][1],zs[i],ms[i])
end

geometry = GeoRuby::SimpleFeatures::MultiPoint.from_points(points,DEFAULT_SRID,true,true)
geometry = GeoRuby::SimpleFeatures::MultiPoint.from_points(points,GeoRuby::SimpleFeatures::DEFAULT_SRID,true,true)

when ShpType::POINTM
x, y, m = @shp.read(24).unpack("E3")
Expand All @@ -237,9 +237,9 @@ def get_record(i)
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])],DEFAULT_SRID,false,true)
GeoRuby::SimpleFeatures::LineString.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::DEFAULT_SRID,false,true)
end
geometry = GeoRuby::SimpleFeatures::MultiLineString.from_line_strings(line_strings,DEFAULT_SRID,false,true)
geometry = GeoRuby::SimpleFeatures::MultiLineString.from_line_strings(line_strings,GeoRuby::SimpleFeatures::DEFAULT_SRID,false,true)


when ShpType::POLYGONM
Expand All @@ -256,9 +256,9 @@ def get_record(i)
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])],DEFAULT_SRID,false,true)
GeoRuby::SimpleFeatures::LinearRing.from_points(points[(parts[i])...(parts[i+1])],GeoRuby::SimpleFeatures::DEFAULT_SRID,false,true)
end
geometry = GeoRuby::SimpleFeatures::MultiPolygon.from_polygons([GeoRuby::SimpleFeatures::Polygon.from_linear_rings(linear_rings)],DEFAULT_SRID,false,true)
geometry = GeoRuby::SimpleFeatures::MultiPolygon.from_polygons([GeoRuby::SimpleFeatures::Polygon.from_linear_rings(linear_rings)],GeoRuby::SimpleFeatures::DEFAULT_SRID,false,true)


when ShpType::MULTIPOINTM
Expand All @@ -272,7 +272,7 @@ def get_record(i)
Point.from_x_y_m(xys[i][0],xys[i][1],ms[i])
end

geometry = GeoRuby::SimpleFeatures::MultiPoint.from_points(points,DEFAULT_SRID,false,true)
geometry = GeoRuby::SimpleFeatures::MultiPoint.from_points(points,GeoRuby::SimpleFeatures::DEFAULT_SRID,false,true)
else
geometry = nil
end
Expand Down
2 changes: 1 addition & 1 deletion rakefile.rb
Expand Up @@ -24,7 +24,7 @@
s.platform = Gem::Platform::RUBY

s.name = 'GeoRuby'
s.version = "1.2.2"
s.version = "1.2.3"
s.summary = "Ruby data holder for OGC Simple Features"
s.description = <<EOF
GeoRuby is intended as a holder for data returned from PostGIS and MySQL Spatial queries. The data model roughly follows the OGC "Simple Features for SQL" specification (see www.opengis.org/docs/99-049.pdf), although without any kind of advanced functionalities (such as geometric operators or reprojections)
Expand Down

0 comments on commit c85c366

Please sign in to comment.