[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] How do I programmatically add a layer from a PostGIS datastore?
|
Any help on this? It seems like a pretty simple thing to do...
Also, the PostGIS datastore (via the catalog) does not seem to work with
the enterprise db version of postgres. EnterpriseDB has a separate jdbc
connector, which seems to be required when connecting to the database
from elsewhere. In the case of uDig, I can connect to the database as
is, but do not see any layers. I could replace the postgres jdbc driver
with the edb jar if I could find it... The only reference I can find is
in the pom for gt2-postgis.jar. Any ideas?
Mark Mathis wrote:
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)
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel