[pgrouting-dev] Re: [postgis-users] Diagram of Voronoï to Squelettisation of polygon

Salut Jérôme,

Thank you for sharing your blog article!
I tried to recall my French from high school and thanks to nice screenshots and code samples I think I could mostly understand.

Well, I thought your functions might be an interesting contribution to pgRouting project (http://www.pgrouting.org).
We’re trying to collect various routing and network analysis related functionality. Some voronoi and skeleton addition would for sure suite well. That way users could build some routable network out of river polygons for example. It might also help to build a routable graph for maritime navigation. Probably there are a lot more use cases.

Let me know if you’re interested.

Daniel

2010/12/9 j.rolland <jrmrolland@aol.com>

hi,

I have just set up on my blog at the following address
http://ageoguy.blogspot.com/2010/12/squ… ation.html
http://ageoguy.blogspot.com/2010/12/squ… ation.html a tutorial (in french)
which presents an algorithm of surface squelettisation of waterway
(POLYGON).
I provide an example like all the necessary functions and requests which
will enable you to obtain the skeleton of the waterway as you can see it in
the capture below :

http://old.nabble.com/file/p30413623/skeleton5.jpg

regards,
Jérôme

View this message in context: http://old.nabble.com/Diagram-of-Vorono%C3%AF-to-Squelettisation-of-polygon-tp30413623p30413623.html
Sent from the PostGIS - User mailing list archive at Nabble.com.


postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

Hi Jérôme,

As you said the idea would be to add a function that calculates a skeleton from a polygon.

Currently pgRouting contains a couple of functions (http://www.pgrouting.org/docs/1.x/index.html), but all of them require network data with at least information about “start” and “end” ID of a linestring. If the information about “start” and “end” ID doesn’t exist yet, you can run a function called “assign_vertex_id”. But what you need is network data.

Your skeleton function now would allow users to add one more step before and retrieve a network from polygon data. So one could first run the skeleton function, then the “assign_vertex_id” function and finally have all the routing functions available even if the original data was of polygon shape.

pgRouting has it’s source code on GitHub (https://github.com/pgRouting/). The “assign_vertex_id” function is here: https://github.com/pgRouting/pgrouting/blob/master/core/sql/routing_topology.sql. Though I’m not sure it wouldn’t be a good idea to reorganize this a bit.

Well, I think we might better discuss details on the pgRouting list: http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

Best regards,
Daniel

2010/12/11 j.rolland <jrmrolland@aol.com>

Hi Daniel,

Of course that I am interested, say me how I can contribute my share.
As I indicate it in my blog, I can develop a function which turns over the
skeleton from a polygon. Give me your specifications and I would study them.

cordially,
Jérôme

Daniel Kastl-3 wrote:

Salut Jérôme,

Thank you for sharing your blog article!
I tried to recall my French from high school and thanks to nice
screenshots
and code samples I think I could mostly understand.

Well, I thought your functions might be an interesting contribution to
pgRouting project (http://www.pgrouting.org).
We’re trying to collect various routing and network analysis related
functionality. Some voronoi and skeleton addition would for sure suite
well.
That way users could build some routable network out of river polygons for
example. It might also help to build a routable graph for maritime
navigation. Probably there are a lot more use cases.

Let me know if you’re interested.

Daniel

2010/12/9 j.rolland <jrmrolland@aol.com>

hi,

I have just set up on my blog at the following address
http://ageoguy.blogspot.com/2010/12/squ… ation.html
http://ageoguy.blogspot.com/2010/12/squ… ation.html a tutorial (in
french)
which presents an algorithm of surface squelettisation of waterway
(POLYGON).
I provide an example like all the necessary functions and requests which
will enable you to obtain the skeleton of the waterway as you can see it
in
the capture below :

http://old.nabble.com/file/p30413623/skeleton5.jpg

regards,
Jérôme

View this message in context:
http://old.nabble.com/Diagram-of-Vorono%C3%AF-to-Squelettisation-of-polygon-tp30413623p30413623.html
Sent from the PostGIS - User mailing list archive at Nabble.com.


postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

View this message in context: http://old.nabble.com/Diagram-of-Vorono%C3%AF-to-Squelettisation-of-polygon-tp30413623p30428747.html

Sent from the PostGIS - User mailing list archive at Nabble.com.


postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

It might be simpler than this. Assign_vertex_id only need to be called once for any given data set as this creates the data that a network is created from. Our wrapper routines then use the start and end to create a bounding box and then expand the bounding box to collect the sub-set of the total graph data that is needed to build a graph for a given solution.

So for the voronoi diagram, you could write a new wrapper function where you pass in two corners of a bounding box, that would then collect the graph data and build the graph for the Voronoi solver which would then return polygons of the solution.

-Steve

On 12/13/2010 10:18 PM, Daniel Kastl wrote:

Hi Jérôme,

As you said the idea would be to add a function that calculates a
skeleton from a polygon.

Currently pgRouting contains a couple of functions
(http://www.pgrouting.org/docs/1.x/index.html), but all of them require
network data with at least information about "start" and "end" ID of a
linestring. If the information about "start" and "end" ID doesn't exist
yet, you can run a function called "assign_vertex_id". But what you need
is network data.

Your skeleton function now would allow users to add one more step before
and retrieve a network from polygon data. So one could first run the
skeleton function, then the "assign_vertex_id" function and finally have
all the routing functions available even if the original data was of
polygon shape.

pgRouting has it's source code on GitHub
(https://github.com/pgRouting/). The "assign_vertex_id" function is
here:
https://github.com/pgRouting/pgrouting/blob/master/core/sql/routing_topology.sql.
Though I'm not sure it wouldn't be a good idea to reorganize this a bit.
Well, I think we might better discuss details on the pgRouting list:
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

Best regards,
Daniel

2010/12/11 j.rolland <jrmrolland@aol.com <mailto:jrmrolland@aol.com>>

    Hi Daniel,

    Of course that I am interested, say me how I can contribute my share.
    As I indicate it in my blog, I can develop a function which turns
    over the
    skeleton from a polygon. Give me your specifications and I would
    study them.

    cordially,
    Jérôme

    Daniel Kastl-3 wrote:
     >
     > Salut Jérôme,
     >
     > Thank you for sharing your blog article!
     > I tried to recall my French from high school and thanks to nice
     > screenshots
     > and code samples I think I could mostly understand.
     >
     > Well, I thought your functions might be an interesting
    contribution to
     > pgRouting project (http://www.pgrouting.org).
     > We're trying to collect various routing and network analysis related
     > functionality. Some voronoi and skeleton addition would for sure
    suite
     > well.
     > That way users could build some routable network out of river
    polygons for
     > example. It might also help to build a routable graph for maritime
     > navigation. Probably there are a lot more use cases.
     >
     > Let me know if you're interested.
     >
     > Daniel
     >
     > 2010/12/9 j.rolland <jrmrolland@aol.com <mailto:jrmrolland@aol.com>>
     >
     >>
     >> hi,
     >>
     >> I have just set up on my blog at the following address
     >> http://ageoguy.blogspot.com/2010/12/squ… ation.html
     >> http://ageoguy.blogspot.com/2010/12/squ… ation.html a tutorial (in
     >> french)
     >> which presents an algorithm of surface squelettisation of waterway
     >> (POLYGON).
     >> I provide an example like all the necessary functions and
    requests which
     >> will enable you to obtain the skeleton of the waterway as you
    can see it
     >> in
     >> the capture below :
     >>
     >> http://old.nabble.com/file/p30413623/skeleton5.jpg
     >>
     >> regards,
     >> Jérôme
     >> --
     >> View this message in context:
     >>
    http://old.nabble.com/Diagram-of-Voronoï-to-Squelettisation-of-polygon-tp30413623p30413623.html