<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Smathermather's Weblog</title>
	<atom:link href="http://smathermather.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://smathermather.wordpress.com</link>
	<description>Remote Sensing, GIS, Ecology, and Oddball Techniques</description>
	<lastBuildDate>Sat, 12 Dec 2009 03:05:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='smathermather.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/03c18d98e50a77a4ff0ff6c43576ef7c?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Smathermather's Weblog</title>
		<link>http://smathermather.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://smathermather.wordpress.com/osd.xml" title="Smathermather&#8217;s Weblog" />
		<item>
		<title>LiDAR data in BASH using libLAS</title>
		<link>http://smathermather.wordpress.com/2009/12/12/lidar-data-in-bash-using-liblas/</link>
		<comments>http://smathermather.wordpress.com/2009/12/12/lidar-data-in-bash-using-liblas/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 03:05:56 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=216</guid>
		<description><![CDATA[At home, I work on a Mac, so when I want to do work here, my scripting language changes.  In this case, I prefer BASH as my control script.  I downloaded libLAS and did the standard Unix ./configure, make, sudo make install dance in the decompressed libLAS directory
./configure
make
sudo make install
Now I have some tools to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=216&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>At home, I work on a Mac, so when I want to do work here, my scripting language changes.  In this case, I prefer BASH as my control script.  I downloaded libLAS and did the standard Unix ./configure, make, sudo make install dance in the decompressed libLAS directory</p>
<pre>./configure
make
sudo make install</pre>
<p>Now I have some tools to manipulate LiDAR las files at home.  To convert all my las files to text:</p>
<pre>#!/bin/bash
for f in $( ls *.las); do
 las2txt --parse xyzinrcpM --header pound $f $f.txt
done</pre>
<p>There are more elegant ways to implement this, but it gets the job done&#8230; .  Now I have a few hundred text files with all the relevant LiDAR info in them for manipulation.  Since working with the whole enchilada in PostGIS failed, I think I&#8217;ll approach it by loading one section at a time, analyzing, and removing those data from the table.  More to come&#8230; .</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=216&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/12/12/lidar-data-in-bash-using-liblas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
		<item>
		<title>COPY command psql&#8211; loading large LiDAR Point Dataset</title>
		<link>http://smathermather.wordpress.com/2009/11/24/copy-command-psql-loading-large-lidar-point-dataset/</link>
		<comments>http://smathermather.wordpress.com/2009/11/24/copy-command-psql-loading-large-lidar-point-dataset/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 19:13:28 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[LiDAR]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=193</guid>
		<description><![CDATA[Ok, so the INSERT statements were too numerous for inputing the LiDAR point dataset (about a billion points&#8230; .)  They kept crashing the postgres daemon.  So, I used copy from a CSV file:
COPY base.cuy_lidar_all FROM 'c:/path/cuy_lidar_ground_veg.insert' WITH CSV
Keep your fingers crossed&#8230; .
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=193&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ok, so the INSERT statements were too numerous for inputing the LiDAR point dataset (about a billion points&#8230; .)  They kept crashing the postgres daemon.  So, I used copy from a CSV file:</p>
<pre>COPY base.cuy_lidar_all FROM 'c:/path/cuy_lidar_ground_veg.insert' WITH CSV</pre>
<p>Keep your fingers crossed&#8230; .</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=193&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/11/24/copy-command-psql-loading-large-lidar-point-dataset/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
		<item>
		<title>Limitations to Trigger Based Unique Constraint</title>
		<link>http://smathermather.wordpress.com/2009/11/23/limitations-to-trigger-based-unique-constraint/</link>
		<comments>http://smathermather.wordpress.com/2009/11/23/limitations-to-trigger-based-unique-constraint/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 18:16:01 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[LiDAR]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=190</guid>
		<description><![CDATA[A unique constraint implemented as a trigger checking hashed geometry seems like a good idea, that is until I applied it to a multi-10GB dataset.  Not surprisingly, it starts off fast on inserts, and slows down a lot as time goes on.  So, I thought I&#8217;d approach duplicates another way, by deleting them once they [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=190&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A unique constraint implemented as a trigger checking hashed geometry seems like a good idea, that is until I applied it to a multi-10GB dataset.  Not surprisingly, it starts off fast on inserts, and slows down a lot as time goes on.  So, I thought I&#8217;d approach duplicates another way, by deleting them once they exist.  So for my table:</p>
<pre>base.cuy_contours_2
</pre>
<p>I have hashed my geometry, and added an index:</p>
<pre>UPDATE base.cuy_contours_2 SET hash = MD5(ST_AsBinary(the_geom));
CREATE INDEX cuy_contours_2_hash_idx ON base.cuy_contours_2(hash);</pre>
<p>I will follow by deleting the duplicate geometries by checking the hashed geometry:</p>
<pre>DELETE
 FROM base.cuy_contours_2
 WHERE gid NOT IN
 (SELECT        MAX(dup.gid)
 FROM        base.cuy_contours_2 as dup
 GROUP BY    dup.hash
 );
</pre>
<p>But, after a very long time, I get an error:</p>
<pre>ERROR:  could not read block 356366 of relation 1663/17185/12118368: Permission
denied
</pre>
<p>So, it&#8217;s a  down week, and most of my maps are cached, so we&#8217;ll take the postgres service down, and run it in single user mode:</p>
<pre>postgres --single -D c:\postgre_data CM</pre>
<p>And rerun the command on one line, per single user mode, with no semicolon:</p>
<pre>
<pre>DELETE FROM base.cuy_contours_2 WHERE gid NOT IN (SELECT MAX(dup.gid) FROM base.cuy_contours_2 as dup GROUP BY dup.hash );
</pre>
</pre>
<p>and hope for the best&#8230; .</p>
<p>Oh and thanks to :</p>
<p><a href="http://www.postgresonline.com/journal/index.php?/archives/22-Deleting-Duplicate-Records-in-a-Table.html">http://www.postgresonline.com/journal/index.php?/archives/22-Deleting-Duplicate-Records-in-a-Table.html</a></p>
<p>For help with this one.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=190&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/11/23/limitations-to-trigger-based-unique-constraint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
		<item>
		<title>Rendering a vegetation surface model using PovRay (cont.)</title>
		<link>http://smathermather.wordpress.com/2009/11/12/rendering-a-vegetation-surface-model-using-povray-cont/</link>
		<comments>http://smathermather.wordpress.com/2009/11/12/rendering-a-vegetation-surface-model-using-povray-cont/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 03:03:46 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[LiDAR]]></category>
		<category><![CDATA[POV-Ray]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=180</guid>
		<description><![CDATA[Below is my metacode for iterating through a grid of images to render the vegetation surface model from povray.  The real code will be implemented in BASH and AWK, although this would be a perfect use of Python, if I knew how to use it&#8230; .
PostGIS Tables:
cuy_veg_points:        Load veg points into database and make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=180&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Below is my metacode for iterating through a grid of images to render the vegetation surface model from povray.  The real code will be implemented in BASH and AWK, although this would be a perfect use of Python, if I knew how to use it&#8230; .</p>
<h4>PostGIS Tables:</h4>
<p>cuy_veg_points:        Load veg points into database and make 2D geometry<br />
cuy_terrain_points:        Load terrain points into database and make 2D geometry<br />
cuy_veg_height:        Use nearest neighbor to calculate tree height into veg point database<br />
e.g. <a href="http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic">http://www.bostongis.com/?content_name=postgis_nearest_neighbor_generic</a></p>
<p>cuy_tile_centroids:        Generate tile centroids and load into table&#8211; contains coordinates and record area name</p>
<h4>Process:</h4>
<pre>Read cuy_tile_centroids
For each centroid record,
     query view extent for cuy_veg_height
     output temporary tree_coords.inc
     write worldfile for image output from povray
     write povray file with camera position at centroid
     render povray file</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=180&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/11/12/rendering-a-vegetation-surface-model-using-povray-cont/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
		<item>
		<title>Rendering a vegetation surface model using PovRay</title>
		<link>http://smathermather.wordpress.com/2009/11/11/rendering-a-vegetation-surface-model-using-povray/</link>
		<comments>http://smathermather.wordpress.com/2009/11/11/rendering-a-vegetation-surface-model-using-povray/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 03:56:25 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[LiDAR]]></category>
		<category><![CDATA[POV-Ray]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=167</guid>
		<description><![CDATA[Early on, I was working on the problem of rendering a virtual forest based on real LiDAR data in order to do things like a detailed, vegetation included, viewshed.  There are other things we can do with this data, including discovering the boundary of the canopy (and thus find canopy gaps) and rendering a vegetation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=167&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Early on, I was working on the problem of rendering a virtual forest based on real LiDAR data in order to do things like a detailed, vegetation included, viewshed.  There are other things we can do with this data, including discovering the boundary of the canopy (and thus find canopy gaps) and rendering a vegetation surface model.</p>
<p>Let&#8217;s start with a single tree.  If we have a tree, height x, and we have a tree model, height 1, then we can place a tree in our scene height 1x.  If we want to use Povray to render a surface model, we can use a linear pattern applied to our tree to render what parts of the tree are closer and which are further.</p>
<pre><img title="test4" src="../files/2009/11/test42.png" alt="test4" width="301" height="289" />
</pre>
<pre>#include "transforms.inc"

#declare Camera_Location = &lt;0,80,0&gt;;
#declare Camera_Lookat   = &lt;0,0,0&gt;;
#include "tree1.inc"

camera {orthographic
 location  Camera_Location
 look_at Camera_Lookat
 right 100
 up 100}

// Unioned box is used to normalize the scaling of the pigment
union {
 object { TREE
 scale 80
 }
 box {-1000,1000}
 pigment {
 gradient x color_map {
 [0 color rgb 1]
 [1 color rgb 0]
 }
 scale &lt;vlength(Camera_Location-Camera_Lookat),1,1&gt;
 Reorient_Trans(x, Camera_Lookat-Camera_Location)
 translate Camera_Location
 }
 finish {ambient 1}
}
</pre>
<p>My tree is the default tree from POV-Tree:  <a href="http://web.archive.org/web/20071101052625/propro.ru/go/Wshop/povtree/download.html">http://web.archive.org/web/20071101052625/propro.ru/go/Wshop/povtree/download.html</a>.</p>
<p>Here&#8217;s my ini file:</p>
<pre>All_Console=Off
All_File="false"
Antialias=Off
Bits_Per_Color=16
Bounding=On
Bounding_Threshold=10
Continue_Trace=Off
Create_Histogram=Off
Debug_Console=On
Debug_File="false"
Display=On
Draw_Vistas=On
End_Column=600
End_Row=600
Fatal_Console=On
Fatal_File="false"
Height=600
Jitter=Off
Light_Buffer=On
Output_Alpha=Off
Output_File_Type=n
Output_To_File=On
Quality=0
Remove_Bounds=On
Render_Console=On
Render_File="false"
Split_Unions=On
Start_Column=1
Start_Row=1
Statistic_Console=On
Statistic_File="false"
Verbose=On
Vista_Buffer=On
Warning_Console=On
Warning_File="false"
Width=600
</pre>
<p>You&#8217;ll notice I&#8217;m outputing as a 16-bit per channel PNG, so I can capture the full dynamic range of values without loosing too much of the precision in the distance values.  Now, just a little algebra, and we have distance from camera calculated, but I&#8217;ll leave that to a future post.</p>
<p>Here&#8217;s where I&#8217;m going&#8211; imagine a PostGIS database full of LiDAR vegetation points and ground points.  A nearest neighbor search and a little arithmetic tells us the local height of the vegetation point.  Now we iterate through a grid extracting sections of this dataset, using a simple query and a little AWK scripting to output the include file, the povray file, and render the image of tree height.  The tree height interpolator is then a simple 3D tree shaped stamp that we scale, rotate, and stamp all across our landscape, thus creating a PovRay generated digital surface model of vegetation.</p>
<p>Edit:</p>
<p>Oh, and I must credit the source for my height mapping:</p>
<p><a href="http://news.povray.org/povray.advanced-users/thread/%3Cweb.49c79d64a563150ecb94416e0@news.povray.org%3E/">http://news.povray.org/povray.advanced-users/thread/%3Cweb.49c79d64a563150ecb94416e0@news.povray.org%3E/</a></p>
<p><img src="///Applications/3D/povtree_height/test4.png" alt="" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=167&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/11/11/rendering-a-vegetation-surface-model-using-povray/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>

		<media:content url="../files/2009/11/test42.png" medium="image">
			<media:title type="html">test4</media:title>
		</media:content>

		<media:content url="///Applications/3D/povtree_height/test4.png" medium="image" />
	</item>
		<item>
		<title>Loading LiDAR data in PostGIS</title>
		<link>http://smathermather.wordpress.com/2009/10/23/loading-lidar-data-in-postgis/</link>
		<comments>http://smathermather.wordpress.com/2009/10/23/loading-lidar-data-in-postgis/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 20:23:28 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[LiDAR]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=159</guid>
		<description><![CDATA[For a variety of reasons, I want to load my whole LiDAR vegetation dataset into PostGIS.  I have it in raw, unclassified LAS files, and broken into classified, space delimited text files as well.  The unclassified LAS is nice, if I ever want to hone the data, but for now, we&#8217;ll assume the classified data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=159&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For a variety of reasons, I want to load my whole LiDAR vegetation dataset into PostGIS.  I have it in raw, unclassified LAS files, and broken into classified, space delimited text files as well.  The unclassified LAS is nice, if I ever want to hone the data, but for now, we&#8217;ll assume the classified data are correctly classified by someone smarter than I am (a likely scenario).</p>
<p>First I wanted to concatenate the text files (here in Windows Command):</p>
<pre>copy *.xyz cuy_lidar_veg.txt</pre>
<p>Now, I really wanted them in CSV form to make my insert statements easy, so I cheated and used <a href="http://www.cs.unc.edu/~isenburg/lastools/">lastools</a> to do the job, assuming it would be more efficient than a stream based script, like awk or sed:</p>
<pre>txt2las -i cuy_lidar_veg.txt -o cuy_lidar_veg.las -parse xyz
las2txt -i cuy_lidar_veg.las -o cuy_lidar_veg.csv -sep comma-parse xyz</pre>
<p>converting from this:</p>
<pre>2114483.860 612559.340 794.720
2114470.510 612558.420 794.420
2114449.970 612565.010 793.900
2114451.540 612569.640 793.800
2114481.010 612571.740 794.390
2114473.230 612572.950 794.130 ...</pre>
<p>to this:</p>
<pre>2114483.86,612559.34,794.72
2114470.51,612558.42,794.42
2114449.97,612565.01,793.9
2114451.54,612569.64,793.8
2114481.01,612571.74,794.39
2114473.23,612572.95,794.13 ...</pre>
<p>I need a table to accept the data so in psql:</p>
<pre>CREATE TABLE base.cuy_veg_lidar(
 x numeric,
 y numeric,
 z numeric
);</pre>
<p>Now to use awk to format a series of insert statements and pass them through psql right into the database:</p>
<pre>less cuy_lidar_veg.csv | awk '{ print "INSERT INTO base.cuy_veg_lidar (x,y,z) VALUES (" $0 ");" };' | psql -U postgres -d CM</pre>
<p>This creates a series of command which look like this:</p>
<pre>INSERT INTO base.cuy_veg_lidar (x,y,z) VALUES (2114120.67,612570.62,791.11);</pre>
<p>Oh, and this last step I ran in CYGWIN command prompt so I could easily access my favorite unix utilities&#8230; .  I&#8217;m still a nube in the Windows world.  I need my crutches&#8230; .</p>
<p>Why so much work when I could just use Postgres&#8217; COPY command?  Permissions, permissions, permissions&#8230; .  I like my database to have very little file access ability&#8230; .</p>
<p>Next we add a geometry column for 3 dimensional points:</p>
<pre>SELECT AddGeometryColumn('base','cuy_veg_lidar','the_geom',9102722,'POINT', 3);
</pre>
<p>And populate that with our XYZ information:</p>
<pre>update base.cuy_veg_lidar set the_geom = ST_SetSRID(ST_MakePoint(x,y,z),102722);
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=159&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/10/23/loading-lidar-data-in-postgis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
		<item>
		<title>Unique constraint on geometry continued</title>
		<link>http://smathermather.wordpress.com/2009/10/22/unique-constraint-on-geometry-continued/</link>
		<comments>http://smathermather.wordpress.com/2009/10/22/unique-constraint-on-geometry-continued/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 18:14:22 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Triggers]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=149</guid>
		<description><![CDATA[An actual example of using the hashed geometry to uniquely constrain geometry (nothing really new here, just an example of using what we learned in the last post with a new problem):
I&#8217;ve got a contours dataset from the county where I work that is in 20 different shapefiles ranging in size from 500MB to 2GB.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=149&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>An actual example of using the hashed geometry to uniquely constrain geometry (nothing really new here, just an example of using what we learned in the last post with a new problem):</p>
<p>I&#8217;ve got a contours dataset from the county where I work that is in 20 different shapefiles ranging in size from 500MB to 2GB.  I want to put them into a PostGIS database in a single table, so that I can use PostGIS to slice and dice them into reasonable chunks for use by our engineers in AutoDesk products, by ArcGIS users in several divisions, and to improve spatial indexing when dump them into one table in our spatial database as well (ala Regina Obe/Boston GIS&#8217;s <a href="http://www.bostongis.com/blog/index.php?/archives/35-Map-Dicing-and-other-stuff.html">Map Dicing</a>).  This is a really detailed LiDAR-based contour dataset which used breaklines to make a really detailed and accurate product&#8211; which sadly is unusable in its current form because it takes too long to load any given section.</p>
<p>But, today, no slicing and dicing just yet.  I loaded all the data and discovered duplicate geometries.  It seems that some of these blocks that the data come in have overlaps.  I don&#8217;t have a screen shot of it, but when I viewed the data in uDig, you can see the duplicate geometries because the transparency of the contour lines in the duplicated areas is less transparent, i.e. the lines are darker against a white background.  I could search for and remove duplicates, but that seems heavy handed.  I&#8217;m going to recreate the table with a unique constraint applied to the hashed geometry (and hope for no <a href="http://en.wikipedia.org/wiki/Collision_%28computer_science%29">hash collisions</a>).</p>
<p>First we create the table:</p>
<pre>CREATE TABLE base.cuy_contours_2
(
 gid serial NOT NULL,
 elevation smallint,
 shape_leng real,
 the_geom geometry,
 hash character(32),
 CONSTRAINT cuy_contours_2_pkey PRIMARY KEY (gid),
 CONSTRAINT geom_uniq UNIQUE (hash),
 CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 4),
 CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR the_geom IS NULL),
 CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 9102722)
)
WITH (OIDS=FALSE);
ALTER TABLE base.cuy_contours_2 OWNER TO postgres;

CREATE INDEX cuy_contours_2_the_geom_idx
 ON base.cuy_contours_2
 USING gist
 (the_geom);</pre>
<p>Now we create our trigger that creates a hashed version of the geometry, &#8220;the_geom&#8221;, in a column called &#8220;hash&#8221;.</p>
<pre>DROP TRIGGER hasher on base.cuy_contours_2;
CREATE OR REPLACE FUNCTION hash_geom() RETURNS TRIGGER AS $hasher$
BEGIN
 IF(TG_OP='INSERT') THEN

 UPDATE base.cuy_contours_2 SET hash = MD5(ST_AsBinary(the_geom));

 END IF;
 RETURN NEW;
END;
$hasher$ LANGUAGE plpgsql;

CREATE TRIGGER hasher AFTER INSERT ON base.cuy_contours_2 FOR EACH STATEMENT EXECUTE PROCEDURE hash_geom();</pre>
<p>And finally we add a unique constraint:</p>
<pre>ALTER TABLE base.cuy_contours_2 ADD CONSTRAINT geom_uniq UNIQUE (hash);
</pre>
<p>Now, sadly, I have to use windows where I work, so the following is Windows Command language to load all my shapefiles into the PostGIS database.  That said, I think the command, in this rare case, is more elegant than similar code in, say, BASH scripting:</p>
<pre>for %f in (*.shp) do shp2pgsql -s 102722 -a -S -N skip %f base.cuy_contours_2 | psql -h bobs_server -d CM -U postgres
</pre>
<p>using the shp2pgsql -a flag for append, -S to enforce simple geometries, -N skip to ensure that we keep all records with non-null geometries to compensate for potential errors in the input dataset).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=149&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/10/22/unique-constraint-on-geometry-continued/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
		<item>
		<title>PostGIS Gripe—Limits to Postgre’s B-tree indexing—Followup</title>
		<link>http://smathermather.wordpress.com/2009/08/18/postgis-gripe%e2%80%94limits-to-postgre%e2%80%99s-b-tree-indexing%e2%80%94followup/</link>
		<comments>http://smathermather.wordpress.com/2009/08/18/postgis-gripe%e2%80%94limits-to-postgre%e2%80%99s-b-tree-indexing%e2%80%94followup/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 17:59:35 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Triggers]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=143</guid>
		<description><![CDATA[In an earlier post, I griped about the limits to Postgres B-tree indexing, in that for large PostGIS geometries, I couldn&#8217;t create a unique constraint for PostGIS geometry.  Abe Gillespie (blame me not him for any mistakes  in what follows), suggested that I hash the geometry and create an index on that.  In a follow-up [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=143&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In an earlier post, I griped about the limits to Postgres B-tree indexing, in that for large PostGIS geometries, I couldn&#8217;t create a unique constraint for PostGIS geometry.  Abe Gillespie (blame me not him for any mistakes  in what follows), suggested that I hash the geometry and create an index on that.  In a follow-up e-mail, he suggested a series of tests in a trigger statement, first test on the bbox, then on the hashed geometry, then finally on the geometry itself upon insert, to determine if the geometry is unique or not.</p>
<p><img class="alignnone size-full wp-image-144" title="geometry_decision_tree" src="http://smathermather.files.wordpress.com/2009/08/geometry_decision_tree.png?w=510&#038;h=382" alt="geometry_decision_tree" width="510" height="382" /></p>
<p>Well, I&#8217;ve completed the first suggestion, but not yet the second.  Here&#8217;s my trigger statement:</p>
<pre>DROP TRIGGER dissolver on public.reservation_boundaries_public_private_cm;
CREATE OR REPLACE FUNCTION dissolve_bounds() RETURNS TRIGGER AS $dissolver$
BEGIN
   IF(TG_OP='INSERT') THEN

     UPDATE reservation_boundaries_public_private_cm SET hash = MD5(ST_AsBinary(the_geom));

   END IF;
 RETURN NEW;
END;
$dissolver$ LANGUAGE plpgsql;

CREATE TRIGGER dissolver <span style="text-decoration:line-through;">BEFORE</span> AFTER INSERT ON public.reservation_boundaries_public_private_cm FOR EACH STATEMENT EXECUTE PROCEDURE dissolve_bounds();</pre>
<p>So, each time I insert a new geometry, the field &#8220;hash&#8221; is updated with an MD5 hashed version of the geometry.  Now we want to test against this so we add a constraint:</p>
<pre>ALTER TABLE public.reservation_boundaries_public_private_cm ADD CONSTRAINT geom_uniq UNIQUE (hash);</pre>
<p>And it works a charm.  The only problem is that if I were to get a hash collision, I would reject a record and not mean to.  I&#8217;m not sure the statistical chances of this, but implementing the above flow chart would prevent such a possibility.  If my reading is right, the chances of a hash collision is nearly 1 in 2^128, so maybe I won&#8217;t worry this year&#8230; .</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=143&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/08/18/postgis-gripe%e2%80%94limits-to-postgre%e2%80%99s-b-tree-indexing%e2%80%94followup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>

		<media:content url="http://smathermather.files.wordpress.com/2009/08/geometry_decision_tree.png" medium="image">
			<media:title type="html">geometry_decision_tree</media:title>
		</media:content>
	</item>
		<item>
		<title>PostGIS Triggers</title>
		<link>http://smathermather.wordpress.com/2009/08/12/postgis-triggers/</link>
		<comments>http://smathermather.wordpress.com/2009/08/12/postgis-triggers/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 12:54:37 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Triggers]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/?p=134</guid>
		<description><![CDATA[Yup, I&#8217;m going for hits with the above title.  So, I&#8217;ve been playing with triggers in PostGIS (PostgreSQL) trying to streamline a process that I go through quarterly.  We have a geographic boundary layer for our public entity:

The green area is the area with public access.  The purple without.  I want to maintain a version [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=134&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yup, I&#8217;m going for hits with the above title.  So, I&#8217;ve been playing with triggers in PostGIS (PostgreSQL) trying to streamline a process that I go through quarterly.  We have a geographic boundary layer for our public entity:</p>
<p><img class="alignnone size-full wp-image-135" title="boundary_1" src="http://smathermather.files.wordpress.com/2009/08/boundary_1.png?w=509&#038;h=350" alt="boundary_1" width="509" height="350" /></p>
<p>The green area is the area with public access.  The purple without.  I want to maintain a version of the boundary with this very simple distinction, and another version of it in which the boundary is dissolved.  Triggers seem ideal here.  When I update the first, I get a version of the second (see below)<img class="alignnone size-full wp-image-137" title="boundary_2" src="http://smathermather.files.wordpress.com/2009/08/boundary_2.png?w=509&#038;h=351" alt="boundary_2" width="509" height="351" /></p>
<p>The command to do this is as follows:</p>
<pre>CREATE TABLE public.reservation_boundaries_public_private_cm_dissolved
 AS
 SELECT res, ST_Union(the_geom) AS the_geom
  FROM public.reservation_boundaries_public_private_cm
   GROUP BY res;</pre>
<p>So far, so good (sorry about the awful table names).  Now it needs to run each time there is an insert on the original table.  Here is what I came up with:</p>
<pre>DROP TRIGGER dissolver ON public.reservation_boundaries_public_private_cm;

CREATE OR REPLACE FUNCTION dissolve_bounds() RETURNS TRIGGER AS $dissolver$

BEGIN
 IF(TG_OP='INSERT') THEN

 DROP TABLE IF EXISTS public.reservation_boundaries_public_private_cm_dissolved;

 CREATE TABLE public.reservation_boundaries_public_private_cm_dissolved
 AS
 SELECT res, ST_Union(the_geom)
   AS the_geom
   FROM public.reservation_boundaries_public_private_cm
   GROUP BY res;

 END IF;
 RETURN NEW;
END;

$dissolver$ LANGUAGE plpgsql;

CREATE TRIGGER dissolver
  AFTER INSERT ON public.reservation_boundaries_public_private_cm
  FOR EACH STATEMENT EXECUTE PROCEDURE dissolve_bounds();</pre>
<p>My only complaint here is speed&#8211; it takes about 45 seconds (instead of close to 0.3 seconds) now to insert all my records.  I hoped that I could speed it up with the addition of</p>
<pre>FOR EACH STATEMENT EXECUTE PROCEDURE</pre>
<p>instead of</p>
<pre>FOR EACH RECORD EXECUTE PROCEDURE</pre>
<p>but the difference in speed is undetectable.  Any suggestions on how to speed this puppy up?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=134&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/08/12/postgis-triggers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>

		<media:content url="http://smathermather.files.wordpress.com/2009/08/boundary_1.png" medium="image">
			<media:title type="html">boundary_1</media:title>
		</media:content>

		<media:content url="http://smathermather.files.wordpress.com/2009/08/boundary_2.png" medium="image">
			<media:title type="html">boundary_2</media:title>
		</media:content>
	</item>
		<item>
		<title>No Image&#8211; a very simple solution for calculating viewshed</title>
		<link>http://smathermather.wordpress.com/2009/03/20/no-image-a-very-simple-solution-for-calculating-viewshed/</link>
		<comments>http://smathermather.wordpress.com/2009/03/20/no-image-a-very-simple-solution-for-calculating-viewshed/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 01:44:05 +0000</pubDate>
		<dc:creator>smathermather</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[POV-Ray]]></category>

		<guid isPermaLink="false">http://smathermather.wordpress.com/2009/03/20/no-image-a-very-simple-solution-for-calculating-viewshed/</guid>
		<description><![CDATA[Not much to say here.  I had a bit of inspiration, remembering a Christoph Hormann tutorial http://www.imagico.de/pov/icons.html on making transparent icons in povray and realized that what he was describing was the final piece in the povray for viewsheds milleau:  no_image option for an object forces it to interact with the scene in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=133&subd=smathermather&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Not much to say here.  I had a bit of inspiration, remembering a Christoph Hormann tutorial http://www.imagico.de/pov/icons.html on making transparent icons in povray and realized that what he was describing was the final piece in the povray for viewsheds milleau:  no_image option for an object forces it to interact with the scene in every way, but to be seen by the camera.  I&#8217;ll post the revised code coming up, but it&#8217;s pretty simple.  Add the following option inside the code to the tree object:<br />
no_image .</p>
<p>http://www.povray.org/documentation/view/3.6.1/328/</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smathermather.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smathermather.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smathermather.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smathermather.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smathermather.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smathermather.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smathermather.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smathermather.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smathermather.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smathermather.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smathermather.wordpress.com&blog=4275586&post=133&subd=smathermather&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://smathermather.wordpress.com/2009/03/20/no-image-a-very-simple-solution-for-calculating-viewshed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/872c3984fe0bf0b61f82d3ddfcd23346?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">smathermather</media:title>
		</media:content>
	</item>
	</channel>
</rss>