Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing KML tests.

  • Loading branch information...
commit e1501e51b7d1e71ccb384d8fa91fc4ad0e1c3a1d 1 parent 1c91089
@tjdett tjdett authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/geo_ruby/kml.rb
  2. +2 −2 spec/geo_ruby/georss_spec.rb
View
2  lib/geo_ruby/kml.rb
@@ -61,7 +61,7 @@ def accumulate_start(e)
def accumulate_end(e); @buffer << "</#{e[0]}>"; end
def parse_coordinates(buffer)
- if(buffer =~ /<coordinates>(.+)<\/coordinates>/)
+ if(buffer =~ /<coordinates>(.+)<\/coordinates>/m)
$1.gsub(/\n/, " ").strip.split(/\s+/).each do |coord|
x,y,z = coord.split(',')
if(x.nil? || y.nil?)
View
4 spec/geo_ruby/georss_spec.rb
@@ -154,7 +154,7 @@
it "test_kml_read" do
g = Geometry.from_kml("<Point><coordinates>45,12,25</coordinates></Point>")
g.should be_a Point
- g.should == Point.from_x_y_z(45,12,25)
+ g.should == Point.from_x_y_z('45','12','25')
g = Geometry.from_kml("<LineString>
<extrude>1</extrude>
@@ -165,7 +165,7 @@
</LineString>")
g.should be_a LineString
g.length.should eql(2)
- g.should == LineString.from_points([Point.from_x_y_z(-122.364383,37.824664,0),Point.from_x_y_z(-122.364152,37.824322,0)],4326,true)
+ g.should == LineString.from_points([Point.from_x_y_z('-122.364383','37.824664','0'),Point.from_x_y_z('-122.364152','37.824322','0')],4326,true)
g = Geometry.from_kml("<Polygon>
<extrude>1</extrude>
Please sign in to comment.
Something went wrong with that request. Please try again.