January 2009
20 posts
Getting rid of all small (less than 400px across)...
My photo gallery has been moved around so much between so many different apps its become a bit of a mess. In particular there are many duplicate images (but with different filenames) and also many thumbnails of images have become incorporated as images into my gallery. Fspot lets you import images and exclude duplicates. I wrote a little bash script to find all images less that 400px across and...
Clipping rasters with gdal
New in gdal 1.6 is the ability to clip out bits from a raster using an OGR datasource such as a shpfile or GML doc.Here I am createing a compressed and tiled image. Make sure that the CRS are the same for both the input and clip datasets.
gdalwarp -co COMPRESS=DEFLATE -co TILED=YES -of GTiff \ -r lanczos -cutline SAProvincesNew4kmBuffer2.shp \ Spot5_RSA_2008_10m/Spot5_RSA_2008_10m.vrt \...
Importing SA 1:50000 CDSM data into PostGIS
Cool bash script for the day:
This one does a batch import of all Chief Directorate of Surveys and Mapping data for South Africa 1:50 000 topo data in shapefile format. It will create a seamless database ready for use in QGIS / GeoServer etc.
dropdb cdsm50k
createdb cdsm50k
createlang plpgsql cdsm50k
psql cdsm50k < /usr/share/postgresql-8.3-postgis/lwpostgis.sql
psql cdsm50k <...
Using vmap data with gdal/ogr
First I grabbed the vmap0 world dataset from:
wget -c http://geoengine.nga.mil/ftpdir/archive/vpf_data/v0sas.tar.gz wget -c http://geoengine.nima.mil/ftpdir/archive/vpf_data/v0soa.tar.gz wget -c http://geoengine.nima.mil/ftpdir/archive/vpf_data/v0eur.tar.gz wget -c http://geoengine.nima.mil/ftpdir/archive/vpf_data/v0noa.tar.gz
The -c option will let you continue the download if interrupted -...