[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] PostGIS access
|
Carl Anderson wrote:
While trying to impove schema (SQL definition) support in uDig I am
having problems
with the geotools postgis driver.
Originally the getTables() call in
org.geotools.data.postgis.PostgisDataStore did not return schema or
catalog names so tables that are not in the default postgres search
patch cause access errors as they cannot be reached.
from the postgres7.4 log
Apr 3 22:05:09 vadose postgres[7178]: [6-1] ERROR: relation
"landlot_geo" does not exist
Apr 3 22:05:09 vadose postgres[7178]: [6-2] STATEMENT: SELECT
AsText(force_2d(Envelope(Extent("shape")))) FROM "landlot_geo" WHERE TRUE
(in this case landlot geo is fully qualified as tax.landlot_geo)
I altered getTables() in geotools to prepend (conditionally) the schema
and catalog entries if they are non null and that error was corrected.
Now I find that I get a service exception during catalog picking in uDig
(every table throws this exception in turn)
org.geotools.data.SchemaNotFoundException: Feature type could not be
found for zoning.zoning_current_vw
at
org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory.getPkColumnInfo(DefaultFIDMapperFactory.java:248)
To understand where to start could someone tell me how a database
working with uDIG is setup.
In the net.refractions.udig.catalog.postgis plugin there is:
- a wizard page (I think it lets you choose a schema)?
- a "handle" for the database (an IService implementation) so several
maps can share the same DataStore.
- a "handle" for each table (an IGeoResouce implementation)
The IService implementation contains its own subclass of the PostGIS
DataStore. As with many Geotools based project subclassing is the only
way to access somethings (like the ConnectionPool). It makes use of the
connection pool when setting up the various "info" obects (IServiceInfo
and IGeoResouceInfo).
I am afraid I am writing this email offline and cannot link you to the
catalog documentation in the wiki. It is one of the pages in the
Programmers Guide.
I wonder if your work in Geotools "broke" this subclass of
PostgisDatastore? Geotools is a bit lite of junit test cases
for PostGIS. If you do have your own PostGIS you can change a
property file in the test directory. I am pretty sure that the
test cases are focused on client code making use of PostGIS DataStore
and are not focused on subclassing.
I can and will establish a publically accessible postgres instance
(mirroring my test setup) for anyone else to check.
One problem with the existing testcases is that they modify the database.
They are smart and remove there test tables, populate them, and then run
a test. But still if two people anywhere in the world were running
against the same test server they would probably encounter a problem.
Jody