Skip to content

Instantly share code, notes, and snippets.

@kashif
Created July 5, 2009 14:20
Show Gist options
  • Save kashif/140987 to your computer and use it in GitHub Desktop.
Save kashif/140987 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'sqlite3'
db = SQLite3::Database.new( "test-2.3.sqlite" )
db.enable_load_extension( 1 )
db.load_extension( "libspatialite.so" )
db.enable_load_extension( 0 )
# a practical example of how to use MbrCache
db.execute( "SELECT CreateMbrCache('Towns', 'Geometry')");
db.execute( "SELECT * FROM geometry_columns" ) do |row|
p row
end
db.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment