Home > Uncategorized > GDAL with MrSID, BOM Geofabric Dataset

GDAL with MrSID, BOM Geofabric Dataset

January 26, 2011 Leave a comment Go to comments

GDAL 1.8 with MrSID

Since moving to Debian I no longer had the MrSID reader for GDAL. It’s non free software so I could do without it, but some data I have was only provided in MrSID format, and I need to get it out of the format. I used the binaries from http://developer.lizardtech.com/ (http://www.lizardtech.com/developer/members/download.php?dl=Unified_DSDK_8.0_linux.x86-64.gcc41.tgz), along with http://download.osgeo.org/gdal/gdal-1.8.0.tar.gz. I used this ./configure line (which fixes the “skipping incompatible /lib/Release/libltidsdk.a when searching for -lltidsdk” error). Binaries are put in apps.

./configure --with-spatialite --with-poppler --with-libkml --with-mrsid=/home/pathto/Unified_DSDK_8.0_linux.x86-64.gcc41/Raster_DSDK --with-jp2mrsid --libdir=/home/pathto/Unified_DSDK_8.0_linux.x86-64.gcc41/Raster_DSDK/lib

BOM Geofabric Dataset

A while back the Bureau of Meteorology made available the Australian Hydrological Geospatial Fabric dataset licensed for use under Creative Commons 3.0 license. It is available at ftp://ftp.bom.gov.au/anon/home/geofabric/. I was unable to read the files in the supplied formats, so upon my request the BOM made available the files in ESRI Shapefile format, if you would like the files in SHP file format you should make a request to AHGF@bom.gov.au. (or give me a public FTP server I can upload the dataset to).

Once I had the SHP files, I used ogr2osm to convert them to OSM files, which I could then load into JOSM.

#!/bin/sh

for f in SH_*_SHP/SH_*/*.shp
do
    echo "$f"

    # clip the source shp files
    # EPSG:4326 is WGS84 LL
    # we convert to EPSG:4326 as this allows us to specify the clip bbox in WGS84
    dir=`dirname "$f"`
    mkdir -p "01-trim/$dir"
    ogr2ogr -t_srs EPSG:4326 -clipdst minlon minlat maxlon maxlat  "01-trim/$f" "$f"

    # run ogr2osm with output file specified
    base=`basename "$f"`
    mkdir -p "02-osm/$dir/"
    ogr2osm.py -o "02-osm/$dir/$base.osm" "01-trim/$f"
done

Apart from the learning experience this exercise seems to have been futile, as the data is far inferior to the existing data in OpenStreetMap.

Advertisements
Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.

I don't read comments anymore due to an increase in spam comments. If you want to get in touch please send me an email (see tianjara.net for details).

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: