How to alternately select m rows every n rows in oracle sql
For m=10 and n=100 add the following where clause WHERE mod(rownum, 100)
How to alternately select m rows every n rows in oracle sql Read More »
For m=10 and n=100 add the following where clause WHERE mod(rownum, 100)
How to alternately select m rows every n rows in oracle sql Read More »
In this installment of How To Stick Anything In CouchDB, I’ll take some bicycle path data released by the municipality of Copenhagen and stick them in CouchDB. As always I’m working in Terminal under Mac OS X. Bicycle paths in Copenhagen, served live by CouchDB: Your browser does not support IFRAME The data is in
Sticking bicycle paths in CouchDB Read More »
http://guide.couchdb.org/
Free online O’Reilly book on CouchDB Read More »
Today I installed the utility shp2geocouch on Mac OS X 1.6. First I needed to update RubyGems… sudo gem update –system Then I could install shp2geocouch sudo gem install shp2geocouch Next I downloaded OSM data for Copenhagen, Denmark wget http://download.cloudmade.com/europe/northern_europe/denmark/copenhagen/copenhagen.shapefiles.zip unzip copenhagen.shapefiles.zip cd copenhagen.shapefiles Finally I used shp2geocouch to upload one of the shape files
Using shp2geocouch to push OSM data into geocouch Read More »
The spatial databases covered are PostGIS, MySQL spatial and MongoDB, Apache Cassandra. UPDATE: I’ll change this post or create a page to give the actual linux commands to run on the remote server. PostGIS on EC2 I have found a nice tutorial that describes setting up Postgres on EC2 on an Ubuntu instance with all
Installing spatial databases on EC2 Read More »
General instructions are here: http://wiki.openstreetmap.org/wiki/Osm2pgsql#Mac_OS_X Note: I’m running Snow Leopard (10.6.6 ) 1. Install homebrew Check that you don’t have it already: $ which brew If you don’t have <a href="http://mxcl.github.com/homebrew/">homebrew</a> install it from here: https://github.com/mxcl/homebrew/wiki/installation E.g. like this: $ ruby -e “$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)” 2. Install proj $ brew install proj $ which proj
Building osm2pgsql on Mac OS X using homebrew Read More »
You can use separate SQLite database on different machines as a single virtual database by using the attach command in SQLite. I read about the technique here: http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html For this example let’s use the simplest possible database. A contact database containing nothing but email addresses. 1. Create SQL script for a simple contacts database File
Using SQLite databases on different machines as a single virtual database Read More »
1. Download data and software The instructions are fairly generic, so should work for both Windows, Linux and Mac OS X. I wrote them for Windows, but I’ve since then switched to Mac OS X. PostgreSQL+PostGIS I assume that you do not already have Postgres/PostGIS installed on your system. Download PostgreSQL+PostGIS for all platforms here: http://www.postgresql.org/download/
How to import OpenStreetMap data into PostgreSQL Read More »
See below for commands using the Fusion Tables API. Example table is the oldschool message wall public table. Note that examples are shown first without the required url-encoding. Authenticating: Getting the auth token To authenticate you may use the following test account myjdoe. account: myjdoe@gmail.com password: JoesSecret curl -H “Content-type: application/x-www-form-urlencoded” -d “accountType=GOOGLE &Email=myjdoe@gmail.com&Passwd=JoesSecret&service=fusiontables&source=skipperkongen.dk” https://www.google.com/accounts/ClientLogin
Google fusion tables cheat sheet Read More »