Skip to content

Instantly share code, notes, and snippets.

@aurelian
Created May 27, 2009 12:54
Show Gist options
  • Select an option

  • Save aurelian/118627 to your computer and use it in GitHub Desktop.

Select an option

Save aurelian/118627 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'geo_ruby'
GeoRuby::Shp4r::ShpFile.open(ARGV[0]) do | shp |
puts "** #{shp.shp_type}"
shp.each do | record |
puts "** #{record.data.inspect}"
shp.fields.each do | field |
puts "** #{record.data[field.name].inspect}"
end
puts "** #{record.geometry.as_georss}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment