[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] How do I programmatically add a layer from a PostGIS datastore?
|
All,
I am currently trying to develop a uDig custom application. I have a
set of existing plugins that create or modify data in a PostGIS database
(behind the scenes using straight jdbc operations). I can see the
results of my computations by manually refreshing the catalog (assuming
I have already connected to the postgres datastore) and using other
built in user interface functionality to add/remove layers and redraw
the map.
What I would like to do is, given the appropriate connection parameters
(host, database, table, and optional filter), programmatically add a new
layer to the map. I have done this (more or less) successfully by
creating a (local) temporary layer and copying the features from the
database to the new layer. Unfortunately, this does not meet my
requirements since any changes to the database are not updated in the
local layer (at least not without regenerating the local layer). I have
also been able to programmtically add the database to the local catalog
as an available data source.
So, my question is this, "How do I programmatically 'reset' the database
connection in the catalog view (to pick up any new tables) and call 'add
to current map' for a specified table (layer)?".
Thanks,
MM
I am currently working with uDig 1.1.1 SDK and eclipse PDE 3.5 (Galileo)