Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Re: Commit Access and pgRouting module

The approach is sane - however I would like to try and get us to work with the existing net.refractions.udig.graph api. This is an issue of uDig as a platform rather than the correctness of your approach.

You will find that there is already a route map graphic there (I think it draws waypoints and the resulting route). Can this be modified to suite your needs? The data structures used may be the geotools graph data structures; but perhaps you can produce that from the result of a pgRouting call?

Additional comments inline.

On Thu, Mar 5, 2009 at 9:43 AM, Emily Gouge <egouge@xxxxxxxxxxxxxxx> wrote:
Hey Jody,

We are currently using a mapgraphic layer to display the results of the routing etc.  So as a "workflow" I was thinking we could do something like:

1) Make a PGRouting Mapgraphic

See above; lets sort out a single mapgraphic for this stuff. 

2) When the user adds a PGRouting Mapgraphic to there map it asks for the connection information and verifies the correct information exists in the the tables.

That is interesting; I am not sure we have any hooks you can use to ask the user anything when adding a map graphic.

I am real nervous about using the style blackboard to save connection information (since that is what you would end up doing here). This would force you to use style configurators to define resource access; and muddle the handling of connections between the visualization api and the resource management api.

Please review my earlier email about how to do this; asking PostGISServiceImpl to adapt to a new api. Remember if needed you can document the existence of those routing tables as child GeoReosurce etc...

Please treat mapgraphic (or your own renderer) as just a visualization option; if not we will be in a world of pain.

3) The routing tools can then work against the currently selected mapgraphic.  The user can add points and once they've added more than two points the route is automatically generated.

I had a two step workflow (add the points and then generate the route); I imagine the code is quick enough that you could generate the route as each point is added. 


What I'm not really sure of is if this is possible to do with Mapgraphics or even the intended us of Mapgraphics.

See above; it is not the intended use.

Indeed we have pushed Mapgraphic above  and beyond its intended use a couple times now; and we should roll in what we have learned - either into a MapGraphic2 that has some init and dispose lifecycle; or into a best practice of using Renderer for these cases.

The way it is currently setup the routing tool creates the mapgraphic layer & database connection automatically when used.  This works fine for our use case but doesn't work well if we want the user to be able to dynamically specify connection parameters.

Correct me if I am wrong; the connection parameters are completely dependent on a PostGIS instance (which should already be represented in your catalog?). You remember in the style tutorial how we add a new resolveadaptorfactory in order to teach CSVGeoResource how to produce a default color? This is the same facility we can use to allow PostGISServiceImpl to represent pgRouting functionality.

If you like we can talk this over during Friday's IRC meeting; if needed we could even break out skype.

Jody

Back to the top