gdal_calc.py– Raster Calculator using Numby Functions

gdal_calc is a python script that makes it easy to do band math and logical operations with gdal/numby. This ranges from basic arithemtic operations to logical functions. And while gdal_calc.py has been around since 2008, it is but is a recent and revelatory discovery for me. I had just today resigned myself to properly learning python so as to use the gdal bindings. But, my … Continue reading gdal_calc.py– Raster Calculator using Numby Functions

Debian Configuration– Tomcat on Boot, revision

I revised my startup script for Tomcat to use a non-privileged user for security reasons. I used the following page as my resource: http://linux-sxs.org/internet_serving/c140.html #!/bin/sh # /etc/init.d/tomcat6: start Tomcat6 server. test -f /opt/apache-tomcat-6.0.32/bin/startup.sh || exit 0 PATH=$PATH:/opt/apache-tomcat-6.0.32/bin/ case “$1” in start) export JAVA_HOME=/opt/jre1.6.0_26/ logger -t Tomcat6 “Starting Tomcat 6…” exec su – tomcat -c /opt/apache-tomcat-6.0.32/bin/startup.sh | logger -t Tomcat6 ;; stop) export JAVA_HOME=/opt/jre1.6.0_26/ logger -t … Continue reading Debian Configuration– Tomcat on Boot, revision

Optimizing Pov-Ray include files– smaller trees with the same effect

One limitation I’ve run into in rendering large scenes of trees in PovRay, whether for fun for work is memory usage.  I’ve found that about a half million trees is about as many as I can place on a 32-bit system before running out of memory.  Sometime this year I’ll switch to 64-bits, but in the mean time, I hacked together a solution for reducing … Continue reading Optimizing Pov-Ray include files– smaller trees with the same effect

LiDAR processing and analysis in PostGIS (I hope…).

Alright, so let’s begin again with some LiDAR processing in PostGIS.  I really liked this discussion of multipoint conversions of LiDAR and other point datasets, but we won’t address making things more efficient here (yet).  Besides, these aren’t just points– we do want to retain their attribution… . Now, any regular database user will recognize my nubeness reading this post.  If you are that person, … Continue reading LiDAR processing and analysis in PostGIS (I hope…).

GDAL Contours (cont.)

Well, I made some mistakes in the last post, not the least of which is I used the wrong flag for creating an attribute field with elevation.  What follows is a little more sophisticated.  It takes us from a series of DEM tiles from which I want 2-foot and 5-foot contours (using gdal_contour), and then dumps those shapefiles into PostgreSQL using shp2pgsql. First we prep … Continue reading GDAL Contours (cont.)

GDAL Contours

Just another quick vignette.  From the Ohio Statewide Imagery Program (OSIP) there is a 1-meter DEM for all of Ohio.  To get contours from this dataset, one approach is to use GDAL tools, i.e. gdal_contours.  As I’m working on a Mac today, I used Kyng Chaos pre-compiled Frameworks: http://www.kyngchaos.com/software:frameworks Then I needed to update my path variable in the BASH shell: export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH Now we … Continue reading GDAL Contours