[postgis-users] Re: UDig and PostGIS
Johan Wehtje
genwolf at gmail.com
Sat Dec 3 01:08:35 PST 2005
I have copied this message back to the groups where some might be keen to
follow the resolution.
Following your suggestion I created a new Database called Maps, created a
User / Login Role called Maps, and loaded some Spatial Geomtry into the
public schema without any other schemas.
And wonder of wonders !!! it works , the map renders.
I then remembered that I had earlier swapped my JDBC drivers, so I tried it
again swaping the JDBC driver back to one that shipped with UDig - this does
not work, and produces the same error message as before and the null pointer
exception in the UDig log. However if I use the JDBC driver that shipped
with my installtion of Postgres and rename it to reflect the name in the
manifest.mf file it all seems to work smoothly.
I still have to try this with a seperate schema mapped to a username, and
will let you know, but it should be emphasised that many people are using
schemas to logically seperate data rather than to create user spaces. In my
case I have an environmental Database and have schemas for spatial datasets,
sensor station log data sets, externally contributed data sets and etc.
The workaround works and it might be an idea to have either the readme, help
or FAQ updated to point out the implications of using schemas, and the
recommeded way to ensure schemas work with UDig.
Thanks all who helped resolve this.
Cheers
Johan Wehtje
On 12/3/05, Carl Anderson <carl.anderson at vadose.org> wrote:
>
> Johan,
>
> All geotools based software have the limitation you describe, and a few
> more. The "fix" will require some changes to Geotools as as a couple to
> UDIG.
>
> In the interim make sure that
> you login to the database with the same name as the schema containing
> the geometry table
> you have not changed postgresql.conf's parameter
> search_path = '$user,public'
> there is a geometry_columns table in the schema
> there are no other tables in any other schema (database wide) that
> match your geometry table's names.
>
> C.
>
> Johan Wehtje wrote:
>
> > Paul,
> > I followed your suggestions - and my pg logs show that what is
> > happening is that the client is querying for relations that are not
> > schema qualified therefore there are a whole lot of errors saying that
> > "relation <geom table name> does not exist". I have tried to create
> > Postgis Tables in the public schema but for wahtever reason Udig is
> > not seeing them.
> >
> > I do think that the problem lies with the older Postgis driver not
> > understanding schema's as the logged client requests that generate
> > errors are not schema qualified.
> >
> > I tried a trivial JDBC connection using Coldfusion connected to a JDBC
> > data source. Queries like this:
> >
> > <cfquery name="geomtest" datasource="jdbc.env_db">
> > SELECT gid, tag, AsText(the_geom) as geostring from shapes.bompah3
> > </cfquery>
> >
> > Generate the expected output.
> >
> > I also tried area, centroid, intersection and a number of other
> > queries and all returned the expected results, all issued over a JDBC
> > connection between Postgres and Cold Fsuion.
> >
> > I tried the same thing setting up a data source in OpenOffice 2.0 and
> > running Postgis Functions like area as queries against Postgis Tables
> > over a JDBC connection, and all queries returned the expected results.
> >
> > In addition QGis on both windows and Linux (which uses an embedded
> > Posgresql C library) has no problems with any of the
> > Postgresql/Postgis servers.
> >
> > Could you give me the connection parameters to test instance and I
> > will give that a try, though being on a satellite connection I
> > sometimes have trouble with applications that have timeouts set below
> > the latency to be expected on such a connection.
> >
> > Cheers
> > Johan Wehtje
> >
> >
> >
> > On 12/3/05, *Paul Ramsey* <pramsey at refractions.net
> > <mailto:pramsey at refractions.net>> wrote:
> >
> > Johan,
> > I have been following your emails on the udig list as well, and
> > the fact that other users can connect to postgis fine indicates to
> me
> > that the problem is likely not something as broad as a jdbc driver
> > problem, or else everyone would be having troubles.
> > There is something particular about your setup which is the key,
> > but it's hard to know what. One thing you could do is turn on
> > statement logging in postgresql.conf and watch the log while udig
> > connects, see how far it gets, so you can see what return value it
> is
> > choking on. You could also try to write some trivial JDBC
> > applications that connect and pull back geometries and see if things
> > die there. It is too bad you cannot connect to our test instance,
> > since that takes your particular server configuration right out of
> > the testing equation.
> > Paul
> >
> > On 2-Dec-05, at 8:44 PM, Johan Wehtje wrote:
> >
> > > I have for some weeks now been trying to track down why i have not
> > > been able to get Postgis working with Udig and have managed to
> > > determine that the problem appears to lie with the Postgis JDBC
> > > driver which I think is the same as the Jump Plugin.
> > >
> > > I have not yet built the Latest version from CVS as as I have to
> > > first install a JDK. I don't know how much work has been done
> since
> > > the release of the Postgresql 7.4 compatible release, but with
> both
> > > Udig and Jump dpending on this driver to use Postgis it would be
> > > nice to see it updated to support 8.x Postgresql and 1.0.x Postgis
> > > and a ready built Jar made available.
> > >
> > > Cheers
> > > Johan Wehtje
> > > _______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > <mailto:postgis-users at postgis.refractions.net>
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > <mailto:postgis-users at postgis.refractions.net>
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > <http://postgis.refractions.net/mailman/listinfo/postgis-users>
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >postgis-users mailing list
> >postgis-users at postgis.refractions.net
> >http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20051203/e1555d6c/attachment.html>
More information about the postgis-users
mailing list