<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Jeff,<br><br>Did you see my reply using vessel tracklines as vectors & a grid in Postgis to do exactly what you describe?<br><br>Given we were looking at benthic impact, we buffered the tracklines to create polygons representing the swept area of the deployed fishing gear. These were clipped by the cells, & we could generate statistics suca as the cumulative swept area of all tracks with each cell, number of times each cell was crossed, & given the tracklines have a timestamp associated with them, we could also look at the temporal pattern of tracks crossing cells, for things like seasonal impacts & variation between seasons. <br><br>Cheers,<br><br>  Brent Wood<br><br>--- On <b>Tue, 12/25/12, Jeff Adams - NOAA Affiliate <i><jeff.adams@noaa.gov></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left:
 5px; padding-left: 5px;"><br>From: Jeff Adams - NOAA Affiliate <jeff.adams@noaa.gov><br>Subject: Re: [postgis-users] Simple Line Density<br>To: "PostGIS Users Discussion" <postgis-users@lists.osgeo.org><br>Date: Tuesday, December 25, 2012, 8:21 AM<br><br><div id="yiv1207633886">Hi John,<br><br>ArcGIS offers a similar type of analysis (summing length of lines in each raster cell) for line density. This is definitely a useful measure. Wouldn't mind if I could do both. I am looking at the density of marine vessel transits with goal of trying to see where vessel routes are concentrated. For this particular analysis, I am not really interested in the amount of any particular transit in a cell, just that it was there. I suppose the sum of line lengths can serve as a proxy, but in a perfect world, I would be able to create a raster whose values represent the number of transits. Thanks for the response and happy holidays...<br>
<br><div class="yiv1207633886gmail_quote">On Mon, Dec 24, 2012 at 9:39 AM, John Callahan <span dir="ltr"><<a rel="nofollow" ymailto="mailto:john.callahan@udel.edu" target="_blank" href="/mc/compose?to=john.callahan@udel.edu">john.callahan@udel.edu</a>></span> wrote:<br><blockquote class="yiv1207633886gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I had the same problem.  I ended up using the Quantum GIS function, Sum Line Lengths.  Input can be your postgis line features.  It adds up the lengths of the portion of each line that crosses a particular grid cell.  You need to create a polygon fishnet matching your raster extent and resolution first, then convert to raster.  This might actually be a better measure of density then counting lines.  <div>

<br clear="all"><div><div>- John</div><span class="yiv1207633886HOEnZb"><font color="#888888"><div><br></div></font></span></div></div></blockquote></div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@lists.osgeo.org" href="/mc/compose?to=postgis-users@lists.osgeo.org">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-bin/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>