Skip to content

Instantly share code, notes, and snippets.

@ingenieroariel
Created February 14, 2011 00:04
Show Gist options
  • Save ingenieroariel/825323 to your computer and use it in GitHub Desktop.
Save ingenieroariel/825323 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Optionally, uncomment this to install dependencies.
#sudo apt-get install -y openjdk-6-jdk unzip gdal-bin curl xmlindent
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
# Download GeoServer
wget -c http://gridlock.opengeo.org/geoserver/trunk/geoserver-trunk-latest-bin.zip
unzip geoserver-trunk-latest-bin.zip
# Start GeoServer
cd geoserver*
./bin/startup.sh &
cd ..
sleep 60 # Just something :)
# Get the data and upload it to GeoServer
wget -c https://s3.amazonaws.com/geonodeariel/lembang_mmi_hazmap.geotif
curl --basic --user admin:geoserver -XPUT -H "Content-Type:image/geotiff" --data-binary @lembang_mmi_hazmap.geotif http://localhost:8080/geoserver/rest/workspaces/cite/coveragestores/lembang_mmi_hazmap/file.geotiff
wget -O lembang_mmi_hazmap.xml "http://localhost:8080/geoserver/ows?version=1.0.0&service=wcs&request=describecoverage&coverage=cite:lembang_mmi_hazmap"
echo "Testing accuracy of BBOX in GeoServer's WCS" >> output.log
echo "Using the following version of GeoServer" >> output.log
cat geoserver-2.2-SNAPSHOT/VERSION.txt >> output.log
echo "Origin obtained using gdalinfo in the original file:" >> output.log
gdalinfo lembang_mmi_hazmap.geotif | grep Origin >> output.log
echo "Origin obtained using WCS DescribeCoverage in the original file:" >> output.log
xmlindent lembang_mmi_hazmap.xml | grep -A 11 '<gml:RectifiedGrid' | grep '<gml:pos' >> output.log
cat output.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment