Sunday, July 8, 2012

Drive all night...

From a work side of things and those of you wondering what my work has been consisting of...

Chema found out how to upload raster's to postGIS. He taught me then we've been working to get this system down. This post is more so we remember what we have to do to upload more in the future. It may seem like a foreign language but dozens of big time satellite imagery companies and countries are storing their massive databases within the very same system.



The goal is to get this file which is the Northern tip of Isabela taken from the Landsat Satellite and part of a larger file that contains all of the Archipelago.



Step 1: Open Command Line and type d: to navigate to the D drive (or whatever drive your file is located in)

Step 2: Type (>cd_BORRADOR) to change the directory to the folder (borrador) containing our Galapagos.tif

Step 3: Type the following command including spaces to use the raster2 tool within postGIS to create an sql file of our original file. SQL is short for standard query language and are encoded to be read by large scale databases such as PostgreSQL the backbone of postGIS.


Step 4: Hit enter, and it creates your .sql file

Step 5: Type the following command based on....(-U=Your user, -d=your database within postGIS, and -f= execute or add the following file). Prompted for a password enter the password for your registered user access.

Step 6: From here you can open pgADminIII and wallah, your raster has been added to your database. If you want to visualize it in Quantum you'll have to make sure you have the postGIS raster plug-in downloaded and enabled and you can do what you want with it from there.

 
On top of that I've been making a bunch of maps for Henri's other paper on invasive snail distribution throughout Santa Cruz.

We can drive all night, so hold on tight...

1 comment: