Batch Exporting to PostGIS from Oracle

The process in the previous post loaded one layer at a time.  This batches the process.

Some preparation of a text file with a list of all Oracle table names to be extracted and loaded into PostGIS is required.

rem This reads a list of table names from txt file and passes them to ogr2ogr which then exports from Oracle into PostGIS
for /F %%f in (C:\path\to\your\textfile\OracleTables.txt) do ogr2ogr -a_srs EPSG:27700 -overwrite -f "PostgreSQL" -nln yourschema.%%f PG:"host=localhost user=youruser password=yourpassword dbname=yourdatabase" OCI:"oracleuser/oraclepassword@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oraclehost)(PORT = 1521)))(CONNECT_DATA = (SID =oraclesid))):oracleschema.%%f"
rem
pause

Technology!

All this stuff is supposed to make task quicker and easier so that we can do more in less time.  However, as I am sure a lot of techie minded people find out, I end up spending more time doing less while I try to work out how things work.

I capture video from a miniDV camcorder onto the desktop as it has the largest hard drive available.  However, Ubuntu does not have a suitable non-linear video editor so I need to access the raw .DV files from the macbook so that I can use iMovieHD to put something together.

In an ideal world I will be able to capture my video to the desktop and access the video files across the network and copy the files I need for each video project onto the macbook.  I can then copy the final product back to the desktop and create a DVD.

However, this is a fallen world and I have a laptop running Windows ME, an Apple macbook running Leopard 10.5.5 and a desktop running Ubuntu 8.04.  This means three different file systems to work with – FAT32 on Windows, HFS+ on the macbook and journalled ext3 on the desktop. And there are problems accessing machines across my network.
Continue reading Technology!