# [postgis-users] Simple Line Density

pcreso at pcreso.com pcreso at pcreso.com
Mon Dec 24 16:22:23 PST 2012

```Jeff,

Did you see my reply using vessel tracklines as vectors & a grid in Postgis to do exactly what you describe?

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.

Cheers,

Brent Wood

--- On Tue, 12/25/12, Jeff Adams - NOAA Affiliate <jeff.adams at noaa.gov> wrote:

Subject: Re: [postgis-users] Simple Line Density
To: "PostGIS Users Discussion" <postgis-users at lists.osgeo.org>
Date: Tuesday, December 25, 2012, 8:21 AM

Hi John,

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...

On Mon, Dec 24, 2012 at 9:39 AM, John Callahan <john.callahan at udel.edu> wrote:

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.

- John

-----Inline Attachment Follows-----

_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121224/d5d6e2d1/attachment.html>
```