Hello. I’m using pgRouting for traffic congestion analysis. After gathering enough data I’d like to display estimated traffic congestion via Google Maps API using pgRouting edges geometries as reference. How can I aggregate pgRouting edges to segments representing larger road sections, eg. between two major intersections?
On Mon, Mar 25, 2013 at 9:09 PM, Jakub Krawczyk <krj29b@gmail.com> wrote:
Hello. I’m using pgRouting for traffic congestion analysis. After gathering enough data I’d like to display estimated traffic congestion via Google Maps API using pgRouting edges geometries as reference. How can I aggregate pgRouting edges to segments representing larger road sections, eg. between two major intersections?
You could use ST_Union to aggregate geometries, but you need to be able to define where a major intersection is.
For example you could loop through your result and when there is a change of a road name, you would start a new aggregation.
Daniel
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users
–
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de