Combe, Colin a =E9crit :
> geotools aims to conform to standards as they are defined by the geoapi
> project, and the GeometryFactory interface in geoapi doesn't contain a
> method to createArcByCenterPoint(). I'm forwarding your email to the
> geoapi list because I thought you might get some feedback on why that
> interface doesn't contain such a method. To me, it sounds like quite a
> reasonable way to want to create a curve...
The current GeometryFactory interface in GeoAPI stay somewhat close to th=
e specification. So I guess=20
that createArcByCenterPoint(...) was not defined in ISO 19107. Or maybe i=
t is defined in ISO 19107,=20
but we missed it since the specification is not yet fully translated into=
GeoAPI interfaces.
Anyway, we got request from users (including but not limited to Degree) f=
or more convenience methods=20
in GeometryFactory. We have never been able to find volunter time for doi=
ng this job up to date. But=20
the JIRA task is still open:
http://jira.codehaus.org/browse/GEO-6
Maybe you could add a comment to the above-cited page suggering a createA=
rcByCenterPoint(...) method?
Martin.

Hi Folks,
Newbie to GeoTools.
I ran the ConnectionTester program:
http://docs.codehaus.org/display/GEOTOOLS/ConnectionTester
It got an exception in ConnectionTester.showData() because FeatureCollection
is creating a SQL statement to select on a column named 'OID'. OIDs have
been deprecated as of PostgreSQL 8.1:
http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.htm
l#GUC-DEFAULT-WITH-OIDS
The Postgres documentation suggests using SERIAL columns instead when
uniqueness is needed:
http://www.postgresql.org/docs/8.1/interactive/release-8-1.html:
"default_with_oids is now false by default (Neil)
"With this option set to false, user-created tables no longer have an OID
column unless WITH OIDS is specified in CREATE TABLE. Though OIDs have
existed in all releases of PostgreSQL, their use is limited because they are
only four bytes long and the counter is shared across all installed
databases. The preferred way of uniquely identifying rows is via sequences
and the SERIAL type, which have been supported since PostgreSQL 6.4."
Is there a fix for GeoTools for this? Are OIDs necessary for GeoTools for
some reason? Do I have to recreate all my tables with OIDs? (Do I pull my
hair out or what?)
Regards,
Peter Fay
http://www.intelliskills.com

Problem resolved - mostly.
This table was created by a script and it had no primary key - since there
was no PK, it looks like DataStore assumes there will be an OID column
(which there likely won't after PostgreSQL 8.1) and tries to access it. I
created a PK and all worked fine.
A little better error checking for version 8.1 with no PK might help new
users like me...
-Peter
-----Original Message-----
From: geotools-gt2-users-admin@...
[mailto:geotools-gt2-users-admin@...] On Behalf Of Peter
Fay
Sent: Tuesday, May 16, 2006 2:21 PM
To: geotools-gt2-users@...
Subject: [Geotools-gt2-users] FeatureCollection expecting deprecated 'OID'
column in DataStore for PostgreSQL -
Hi Folks,
Newbie to GeoTools.
I ran the ConnectionTester program:
http://docs.codehaus.org/display/GEOTOOLS/ConnectionTester
It got an exception in ConnectionTester.showData() because FeatureCollection
is creating a SQL statement to select on a column named 'OID'. OIDs have
been deprecated as of PostgreSQL 8.1:
http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.htm
l#GUC-DEFAULT-WITH-OIDS
The Postgres documentation suggests using SERIAL columns instead when
uniqueness is needed:
http://www.postgresql.org/docs/8.1/interactive/release-8-1.html:
"default_with_oids is now false by default (Neil)
"With this option set to false, user-created tables no longer have an OID
column unless WITH OIDS is specified in CREATE TABLE. Though OIDs have
existed in all releases of PostgreSQL, their use is limited because they are
only four bytes long and the counter is shared across all installed
databases. The preferred way of uniquely identifying rows is via sequences
and the SERIAL type, which have been supported since PostgreSQL 6.4."
Is there a fix for GeoTools for this? Are OIDs necessary for GeoTools for
some reason? Do I have to recreate all my tables with OIDs? (Do I pull my
hair out or what?)
Regards,
Peter Fay
http://www.intelliskills.com
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

I believe if you declare a primary key on your data then GeoTools will
not default to oid's. It only uses those as the last possible default.
If you've declared serials like they recommend, then just change
those to be the primary key. We probably need a better error, but if
there's a primary key then it should be picked up.
Chris
Peter Fay wrote:
> Hi Folks,
>
> Newbie to GeoTools.
>
> I ran the ConnectionTester program:
> http://docs.codehaus.org/display/GEOTOOLS/ConnectionTester
>
> It got an exception in ConnectionTester.showData() because FeatureCollection
> is creating a SQL statement to select on a column named 'OID'. OIDs have
> been deprecated as of PostgreSQL 8.1:
>
> http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.htm
> l#GUC-DEFAULT-WITH-OIDS
>
>
> The Postgres documentation suggests using SERIAL columns instead when
> uniqueness is needed:
> http://www.postgresql.org/docs/8.1/interactive/release-8-1.html:
>
>
> "default_with_oids is now false by default (Neil)
>
> "With this option set to false, user-created tables no longer have an OID
> column unless WITH OIDS is specified in CREATE TABLE. Though OIDs have
> existed in all releases of PostgreSQL, their use is limited because they are
> only four bytes long and the counter is shared across all installed
> databases. The preferred way of uniquely identifying rows is via sequences
> and the SERIAL type, which have been supported since PostgreSQL 6.4."
>
>
> Is there a fix for GeoTools for this? Are OIDs necessary for GeoTools for
> some reason? Do I have to recreate all my tables with OIDs? (Do I pull my
> hair out or what?)
>
> Regards,
> Peter Fay
> http://www.intelliskills.com
>
>
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@...
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Thanks for the response.
By the way, I can't get ConnectionTester to recognize schemas other than
"public". I set the connection.properties file entries to include
Schema=MySchema
(which seems to be undocumented). It then finds the types (tables) in the
schema, then calls ds.getFeatureSource()
Which eventually gets down the stack to
PostgisDataStore(JDBC1DataStore).buildFIDMapper() which has the line:
FIDMapper mapper = factory.getMapper(null, null, typeName, conn);
This passes catalog and schema as NULL, meaning that everything below
PostgisDataStore uses the default schema, not the schema that was
configured.
Am I misunderstanding what's going on here?
Regards,
Peter
Here's the stack:
PostgisFIDMapperFactory(DefaultFIDMapperFactory).getPkColumnInfo(String,
String, String, Connection) line: 292
PostgisFIDMapperFactory(DefaultFIDMapperFactory).getMapper(String, String,
String, Connection) line: 95
PostgisDataStore(JDBC1DataStore).buildFIDMapper(String, FIDMapperFactory)
line: 1037
FeatureTypeHandler.getFIDMapper(String) line: 234
PostgisDataStore.getFeatureSource(String) line: 1430
ConnectionTester.main(String[]) line: 68
-----Original Message-----
From: geotools-gt2-users-admin@...
[mailto:geotools-gt2-users-admin@...] On Behalf Of Chris
Holmes
Sent: Tuesday, May 16, 2006 4:02 PM
To: pfay.geotools@...
Cc: geotools-gt2-users@...
Subject: Re: [Geotools-gt2-users] FeatureCollection expecting deprecated
'OID' column in DataStore for PostgreSQL -
I believe if you declare a primary key on your data then GeoTools will
not default to oid's. It only uses those as the last possible default.
If you've declared serials like they recommend, then just change
those to be the primary key. We probably need a better error, but if
there's a primary key then it should be picked up.
Chris
Peter Fay wrote:
> Hi Folks,
>
> Newbie to GeoTools.
>
> I ran the ConnectionTester program:
> http://docs.codehaus.org/display/GEOTOOLS/ConnectionTester
>
> It got an exception in ConnectionTester.showData() because
FeatureCollection
> is creating a SQL statement to select on a column named 'OID'. OIDs have
> been deprecated as of PostgreSQL 8.1:
>
>
http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.htm
> l#GUC-DEFAULT-WITH-OIDS
>
>
> The Postgres documentation suggests using SERIAL columns instead when
> uniqueness is needed:
> http://www.postgresql.org/docs/8.1/interactive/release-8-1.html:
>
>
> "default_with_oids is now false by default (Neil)
>
> "With this option set to false, user-created tables no longer have an OID
> column unless WITH OIDS is specified in CREATE TABLE. Though OIDs have
> existed in all releases of PostgreSQL, their use is limited because they
are
> only four bytes long and the counter is shared across all installed
> databases. The preferred way of uniquely identifying rows is via sequences
> and the SERIAL type, which have been supported since PostgreSQL 6.4."
>
>
> Is there a fix for GeoTools for this? Are OIDs necessary for GeoTools for
> some reason? Do I have to recreate all my tables with OIDs? (Do I pull my
> hair out or what?)
>
> Regards,
> Peter Fay
> http://www.intelliskills.com
>
>
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@...
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

I'll try this question once more, as I received no response:
Has anyone been able to use geotools2 with PostgreSQL (postgis) with a
database schema other than "public"? (I would assume this problem is also
present for Oracle and other databases with named schemas).
Does anyone know who is responsible for this part of geotools source code?
Regards,
Peter
_____
From: geotools-gt2-users-admin@...
[mailto:geotools-gt2-users-admin@...] On Behalf Of Peter
Fay
Sent: Tuesday, May 16, 2006 5:00 PM
To: 'Chris Holmes'
Cc: geotools-gt2-users@...
Subject: [Geotools-gt2-users] PostGIS with non-default (non-public) schemas
not working?
Thanks for the response.
By the way, I can't get ConnectionTester to recognize schemas other than
"public". I set the connection.properties file entries to include
Schema=MySchema
(which seems to be undocumented). It then finds the types (tables) in the
schema, then calls ds.getFeatureSource()
Which eventually gets down the stack to
PostgisDataStore(JDBC1DataStore).buildFIDMapper() which has the line:
FIDMapper mapper = factory.getMapper(null, null, typeName, conn);
This passes catalog and schema as NULL, meaning that everything below
PostgisDataStore uses the default schema, not the schema that was
configured.
Am I misunderstanding what's going on here?
Regards,
Peter
Here's the stack:
PostgisFIDMapperFactory(DefaultFIDMapperFactory).getPkColumnInfo(String,
String, String, Connection) line: 292
PostgisFIDMapperFactory(DefaultFIDMapperFactory).getMapper(String, String,
String, Connection) line: 95
PostgisDataStore(JDBC1DataStore).buildFIDMapper(String, FIDMapperFactory)
line: 1037
FeatureTypeHandler.getFIDMapper(String) line: 234
PostgisDataStore.getFeatureSource(String) line: 1430
ConnectionTester.main(String[]) line: 68
-----Original Message-----
From: geotools-gt2-users-admin@...
[mailto:geotools-gt2-users-admin@...] On Behalf Of Chris
Holmes
Sent: Tuesday, May 16, 2006 4:02 PM
To: pfay.geotools@...
Cc: geotools-gt2-users@...
Subject: Re: [Geotools-gt2-users] FeatureCollection expecting deprecated
'OID' column in DataStore for PostgreSQL -
I believe if you declare a primary key on your data then GeoTools will
not default to oid's. It only uses those as the last possible default.
If you've declared serials like they recommend, then just change
those to be the primary key. We probably need a better error, but if
there's a primary key then it should be picked up.
Chris
Peter Fay wrote:
> Hi Folks,
>
> Newbie to GeoTools.
>
> I ran the ConnectionTester program:
> http://docs.codehaus.org/display/GEOTOOLS/ConnectionTester
>
> It got an exception in ConnectionTester.showData() because
FeatureCollection
> is creating a SQL statement to select on a column named 'OID'. OIDs have
> been deprecated as of PostgreSQL 8.1:
>
>
http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.htm
> l#GUC-DEFAULT-WITH-OIDS
>
>
> The Postgres documentation suggests using SERIAL columns instead when
> uniqueness is needed:
> http://www.postgresql.org/docs/8.1/interactive/release-8-1.html:
>
>
> "default_with_oids is now false by default (Neil)
>
> "With this option set to false, user-created tables no longer have an OID
> column unless WITH OIDS is specified in CREATE TABLE. Though OIDs have
> existed in all releases of PostgreSQL, their use is limited because they
are
> only four bytes long and the counter is shared across all installed
> databases. The preferred way of uniquely identifying rows is via sequences
> and the SERIAL type, which have been supported since PostgreSQL 6.4."
>
>
> Is there a fix for GeoTools for this? Are OIDs necessary for GeoTools for
> some reason? Do I have to recreate all my tables with OIDs? (Do I pull my
> hair out or what?)
>
> Regards,
> Peter Fay
> http://www.intelliskills.com
>
>
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@...
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Peter Fay wrote:
>
> I=92ll try this question once more, as I received no response:
>
> Has anyone been able to use geotools2 with PostgreSQL (postgis) with a=20
> database schema other than =93public=94? (I would assume this problem i=
s=20
> also present for Oracle and other databases with named schemas).
>
> Does anyone know who is responsible for this part of geotools source co=
de?
>
Justin is the current module maintainer, you can tell by looking in the=20
pom.xml file, or checking this handy page I just made up :-)
- http://docs.codehaus.org/display/GEOTOOLS/Module+Matrix
Jody

Thanks Jody - I found that this issue was already in the bug list for =
the
last two years.... Maybe if I get a few days free sometime, I could work =
on
it.
-Peter
-----Original Message-----
From: geotools-gt2-users-admin@...
[mailto:geotools-gt2-users-admin@...] On Behalf Of =
Jody
Garnett
Sent: Friday, May 19, 2006 10:35 AM
To: pfay.geotools@...
Cc: geotools-gt2-users@...
Subject: Re: [Geotools-gt2-users] PostGIS with non-default (non-public)
schemas not working?
Peter Fay wrote:
>
> I'll try this question once more, as I received no response:
>
> Has anyone been able to use geotools2 with PostgreSQL (postgis) with a =
> database schema other than "public"? (I would assume this problem is=20
> also present for Oracle and other databases with named schemas).
>
> Does anyone know who is responsible for this part of geotools source =
code?
>
Justin is the current module maintainer, you can tell by looking in the=20
pom.xml file, or checking this handy page I just made up :-)
- http://docs.codehaus.org/display/GEOTOOLS/Module+Matrix
Jody
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, =
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache =
Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=120709&bid&3057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

You know, I think that some version of GeoTools has this fixed. Which
version of GeoTools are you using? I think 2.1.x has it: the
http://svn.geotools.org/geotools/branches/2.1.x/plugin/postgis/src/org/geotools/data/postgis/PostgisSQLBuilder.java
class calls the schema in the encodeTableName() method.
Chris
Peter Fay wrote:
> Thanks Jody - I found that this issue was already in the bug list for the
> last two years.... Maybe if I get a few days free sometime, I could work on
> it.
> -Peter
>
> -----Original Message-----
> From: geotools-gt2-users-admin@...
> [mailto:geotools-gt2-users-admin@...] On Behalf Of Jody
> Garnett
> Sent: Friday, May 19, 2006 10:35 AM
> To: pfay.geotools@...
> Cc: geotools-gt2-users@...
> Subject: Re: [Geotools-gt2-users] PostGIS with non-default (non-public)
> schemas not working?
>
> Peter Fay wrote:
>
>>I'll try this question once more, as I received no response:
>>
>>Has anyone been able to use geotools2 with PostgreSQL (postgis) with a
>>database schema other than "public"? (I would assume this problem is
>>also present for Oracle and other databases with named schemas).
>>
>>Does anyone know who is responsible for this part of geotools source code?
>>
>
> Justin is the current module maintainer, you can tell by looking in the
> pom.xml file, or checking this handy page I just made up :-)
> - http://docs.codehaus.org/display/GEOTOOLS/Module+Matrix
>
> Jody
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@...
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@...
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Chris,
I'm trying to do a simple filter in geotools 2.2.RC2 and used the example on
the geotools website:
http://docs.codehaus.org/display/GEOTOOLS/Filters
This doesn't compile since all the class have changed. Can you give me a
code sample of how one would find the set of points within 10 miles of a
point? (would one use GeometryDistanceFilter?)
For example, I have a postgis table with 1000 points. How would I obtain a
FeatureCollection that contains only those points with 10 miles of (x,y)?
-Pete

I haven't written straight GeoTools code in awhile. What're the errors
you're getting? I'd prefer just to debug what's listed there. I work
on GeoServer, and we only make filters with the parsers.
I do know that for what you want you need a distance filter though.
Chris
Peter Fay wrote:
> Chris,
> I'm trying to do a simple filter in geotools 2.2.RC2 and used the example on
> the geotools website:
> http://docs.codehaus.org/display/GEOTOOLS/Filters
>
> This doesn't compile since all the class have changed. Can you give me a
> code sample of how one would find the set of points within 10 miles of a
> point? (would one use GeometryDistanceFilter?)
>
> For example, I have a postgis table with 1000 points. How would I obtain a
> FeatureCollection that contains only those points with 10 miles of (x,y)?
>
> -Pete
>
>
>
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org