Thanks for the response Stephen.I will have upwards of 150,000 lines features that I will want to feed into the density. These are stored in a single table (actually will be in a CTE), and many of the lines will overlap one another. It is hard to say whether these solutions are viable as I am having a hard time visualizing the SQL. You would think that I am not the first person who has wanted to do this in PostGIS, but I haven't found example one. <br>
<br><div class="gmail_quote">On Sat, Dec 22, 2012 at 6:02 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 12/22/2012 3:07 PM, Jeff Adams - NOAA Affiliate wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I was wondering if anybody knew of a way to create a very simple line<br>
density raster. I am not interested in interpolation or clustering,<br>
simply how many line features pass through each pixel in the raster. I<br>
know how to do this with points, but am having difficulty figuring out<br>
how to do it with lines. Any help would be greatly appreciated...<br>
</blockquote>
<br></div></div>
Separate from the SQL, you probably need to have a strategy for doing this. so with a point I assume you just increment the point in the raster for each point. So with a line we want to increment the all the raster points along the line. Some options:<br>

<br>
1. render the line into an empty raster then add that raster to your master raster. Where add will increment by one every set  raster point in the rendered line.<br>
<br>
2. segmentize the line into segments that are the size of a pixel in your master raster and then add the midpoints of those segments to your master raster.<br>
<br>
Would one of these work for you?<br>
<br>
-Steve<br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jeffrey D. Adams<br>Contractor<br>OAI, Inc.<br>In support of:<br>National Marine Fisheries Service<br>Office of Protected Resources<br>1315 East West Hwy, Building SSMC3<br>
Silver Spring, MD 20910-3282<br>phone: (301) 427-8434<br>fax: (301) 713-0376