RE: AW: [Geoserver-devel] Schema not created under Oracle

Yeah we could do that. I'll look at adding it when I move to the java bean config object.

Sean

Sean, do you think it might be possible to have a datastore
param that says the geometry type? So the user could set it
in his config if he knows that everything in the table will
be a point, or a line, or whatever? It seems like many users
might have this be the case, and would want
DescribeFeatureType to report the correct types.

Chris

>
> Simon
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Geoghegan, Sean [mailto:Sean.Geoghegan@anonymised.com]
> > Gesendet: Freitag, 23. Januar 2004 09:02
> > An: 'Simon Räss'; 'Kirk Mower';
> > geoserver-devel@lists.sourceforge.net
> > Betreff: RE: [Geoserver-devel] Schema not created under Oracle
> >
> > The OracleDataStore reports all Geometry columns as being of type
> > Geometry. This is because the Oracle SDO_Geometry type does not
> > distingish between geometry types. The
FeatureTypeTransformer just
> needs
> > to support Geometry and it should work.
> >
> > Sean
> >
> > > -----Original Message-----
> > > From: Simon Räss [mailto:cocoa@anonymised.com]
> > > Sent: Friday, 23 January 2004 6:18 PM
> > > To: 'Kirk Mower'; geoserver-devel@lists.sourceforge.net
> > > Subject: AW: [Geoserver-devel] Schema not created under Oracle
> > >
> > > Hi
> > >
> > > The problem seems to be that FeatureTypeTransformer does not
> > > recognize your type of geometries (see inner RuntimeException).
> > > Can you tell me the type of geometries you have?
> > >
> > > Simon
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: geoserver-devel-admin@lists.sourceforge.net
> > > [mailto:geoserver-devel-
> > > > admin@lists.sourceforge.net] Im Auftrag von Kirk Mower
> > > > Gesendet: Freitag, 23. Januar 2004 02:57
> > > > An: geoserver-devel@lists.sourceforge.net
> > > > Betreff: [Geoserver-devel] Schema not created under Oracle
> > > >
> > > > I am running Geoserver 1.1.0 with Oracle Spatial and no
> > > Schema.xml --
> > > > only info.xml . When running DescribeFeatureType I am getting
> errors
> > > on
> > > > every one of these layers (see below). I have tested
> > > bc_roads from the
> > > > shape file and it works fine. Thanks.
> > > >
> > > > javax.xml.transform.TransformerException: Encoding Error at
> > > >
> > > org.geotools.xml.transform.TransformerBase.transform(Transform
> > > erBase.jav
> > > > a:120) at
> > > >
> > > org.geotools.xml.transform.TransformerBase.transform(Transform
> > > erBase.jav
> > > > a:102) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.generateFrom
> > > Schema(Des
> > > > cribeResponse.java:372) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.generateSpec
> > > ifiedTypes
> > > > (DescribeResponse.java:329) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.generateType
> > > s(Describe
> > > > Response.java:201) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.execute(Desc
> > > ribeRespon
> > > > se.java:110) at
> > > >
> > > org.vfny.geoserver.servlets.AbstractService.doService(Abstract
> > > Service.ja
> > > > va:295) at
> > > >
> > > org.vfny.geoserver.servlets.AbstractService.doGet(AbstractServ
> > > ice.java:2
> > > > 02) at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> > > >
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> > > >
> > > org.vfny.geoserver.servlets.wfs.WfsDispatcher.doResponse(WfsDi
> > > spatcher.j
> > > > ava:172) at
> > > >
> > > org.vfny.geoserver.servlets.wfs.WfsDispatcher.doGet(WfsDispatc
> > > her.java:1
> > > > 23) at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> > > >
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> > > > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at
> > > >
> > >
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> > > >
> > > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatche
> > > r.java:252
> > > > ) at
> > > >
> > > jrun.servlet.ServletEngineService.dispatch(ServletEngineServic
> > > e.java:527
> > > > ) at
> > > jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
> > > at
> > > >
> > > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(Threa
> > > dPool.java
> > > > :451) at
> > > jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) Caused
> > > > by: java.lang.RuntimeException: Unsupported type:
> > > > com.vividsolutions.jts.geom.Geometry at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncodeGeometry(FeatureTypeTransformer.java:415) at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncode(FeatureTypeTransformer.java:279) at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncode(FeatureTypeTransformer.java:212) at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncode(FeatureTypeTransformer.java:190) at
> > > >
> > > org.geotools.xml.transform.TransformerBase$XMLReaderSupport.pa
> > > rse(Transf
> > > > ormerBase.java:469) at
> > > >
> > > org.apache.xalan.transformer.TransformerIdentityImpl.transform
> > > (Transform
> > > > erIdentityImpl.java:452) at
> > > >
> > > org.geotools.xml.transform.TransformerBase.transform(Transform
> > > erBase.jav
> > > > a:117) ... 20 more --------- java.lang.RuntimeException:
> Unsupported
> > > > type: com.vividsolutions.jts.geom.Geometry at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncodeGeometry(FeatureTypeTransformer.java:415) at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncode(FeatureTypeTransformer.java:279) at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncode(FeatureTypeTransformer.java:212) at
> > > >
> > > org.geotools.gml.producer.FeatureTypeTransformer$FeatureTypeTr
> > > anslator.e
> > > > ncode(FeatureTypeTransformer.java:190) at
> > > >
> > > org.geotools.xml.transform.TransformerBase$XMLReaderSupport.pa
> > > rse(Transf
> > > > ormerBase.java:469) at
> > > >
> > > org.apache.xalan.transformer.TransformerIdentityImpl.transform
> > > (Transform
> > > > erIdentityImpl.java:452) at
> > > >
> > > org.geotools.xml.transform.TransformerBase.transform(Transform
> > > erBase.jav
> > > > a:117) at
> > > >
> > > org.geotools.xml.transform.TransformerBase.transform(Transform
> > > erBase.jav
> > > > a:102) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.generateFrom
> > > Schema(Des
> > > > cribeResponse.java:372) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.generateSpec
> > > ifiedTypes
> > > > (DescribeResponse.java:329) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.generateType
> > > s(Describe
> > > > Response.java:201) at
> > > >
> > > org.vfny.geoserver.responses.wfs.DescribeResponse.execute(Desc
> > > ribeRespon
> > > > se.java:110) at
> > > >
> > > org.vfny.geoserver.servlets.AbstractService.doService(Abstract
> > > Service.ja
> > > > va:295) at
> > > >
> > > org.vfny.geoserver.servlets.AbstractService.doGet(AbstractServ
> > > ice.java:2
> > > > 02) at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> > > >
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> > > >
> > > org.vfny.geoserver.servlets.wfs.WfsDispatcher.doResponse(WfsDi
> > > spatcher.j
> > > > ava:172) at
> > > >
> > > org.vfny.geoserver.servlets.wfs.WfsDispatcher.doGet(WfsDispatc
> > > her.java:1
> > > > 23) at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> > > >
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> > > > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at
> > > >
> > >
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> > > >
> > > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatche
> > > r.java:252
> > > > ) at
> > > >
> > > jrun.servlet.ServletEngineService.dispatch(ServletEngineServic
> > > e.java:527
> > > > ) at
> > > jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
> > > at
> > > >
> > > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(Threa
> > > dPool.java
> > > > :451) at
jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > The SF.Net email is sponsored by EclipseCon 2004 Premiere
> > > Conference
> > > > on Open Tools Development and Integration See the breadth
> > > of Eclipse
> > > > activity. February 3-5 in Anaheim, CA.
> > > > http://www.eclipsecon.org/osdn
> > > > _______________________________________________
> > > > Geoserver-devel mailing list
> > > > Geoserver-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > The SF.Net email is sponsored by EclipseCon 2004 Premiere
> > > Conference on Open Tools Development and Integration See the
> > > breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> > > http://www.eclipsecon.org/osdn
> > > _______________________________________________
> > > Geoserver-devel mailing list
> > > Geoserver-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
> > >
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004 Premiere
Conference
> on Open Tools Development and Integration See the breadth
of Eclipse
> activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>

--

That might be tough - would need a couple of indexed properties one for table name and one for Geometry type.
Chris can we not do this based on the schema.xml file?

That is the user can set almost anything they want for the schema.xml file - within limits that agree with what the DataStore says.

That is even of the AttributeType from Oracle is Geometry.class (and not LineString.class or Point.class ) , the ui will give them a drop down list of acceptable mappings and gml:LineStringType and gml:PointType will both be in the list for them to choose.

Geoghegan, Sean wrote:

Yeah we could do that. I'll look at adding it when I move to the java bean config object.

Sean

Sean, do you think it might be possible to have a datastore param that says the geometry type? So the user could set it in his config if he knows that everything in the table will be a point, or a line, or whatever? It seems like many users might have this be the case, and would want DescribeFeatureType to report the correct types.

Chris
   

Frankly, I don't like the idea of adding this to the schema.xml file. I don't want to bother with schema.xml files at all. I prefer to let geoserver do gml schema generation for me (automatically...). In my special case, the information which geometries are allowed in which table is stored in another db table. Sean told me once to subclass OracleDataStore (I use an oracle db...) and override one method (don't know its name anymore, something like createGeometryAttribute...). That's the way I'd do it.

Simon

Am 04.02.2004 um 23:53 schrieb Jody Garnett:

That might be tough - would need a couple of indexed properties one for table name and one for Geometry type.
Chris can we not do this based on the schema.xml file?

That is the user can set almost anything they want for the schema.xml file - within limits that agree with what the DataStore says.

That is even of the AttributeType from Oracle is Geometry.class (and not LineString.class or Point.class ) , the ui will give them a drop down list of acceptable mappings and gml:LineStringType and gml:PointType will both be in the list for them to choose.

Geoghegan, Sean wrote:

Yeah we could do that. I'll look at adding it when I move to the java bean config object.

Sean

Sean, do you think it might be possible to have a datastore param that says the geometry type? So the user could set it in his config if he knows that everything in the table will be a point, or a line, or whatever? It seems like many users might have this be the case, and would want DescribeFeatureType to report the correct types.

Chris

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

That should work fine for your purposes Simon, since you have a way to
tell the datastore to create more specific FeatureTypes. This is more for
users who aren't advanced enough to override datastores with their own
classes and knowledge of their oracle dbs.

I think that storing it in the schema.xml file and as a param for the db
aren't mutually exclusive. GeoServer should allow both, for geotools your
only option is the latter. If it's coded up for geotools then geoserver
users can choose to take advantage of it for their datastore params
(we could even just allow it in the actual config files, just for advanced
users). And geotools does not have another way to specify it. But you're
right Jody, users can just set it in the schema.xml file, that should be
sufficient for most users. I had sort of forgot about that, and like
trying to do everything automatically for users, but yeah, with that in
mind, that users can just specify a more constrained thing in their
schema.xml file, I put this at a fairly low priority from a geoserver
perspective.

Chris

On Thu, 5 Feb 2004, Simon Raess wrote:

Frankly, I don't like the idea of adding this to the schema.xml file. I
don't want to bother with schema.xml files at all. I prefer to let
geoserver do gml schema generation for me (automatically...). In my
special case, the information which geometries are allowed in which
table is stored in another db table. Sean told me once to subclass
OracleDataStore (I use an oracle db...) and override one method (don't
know its name anymore, something like createGeometryAttribute...).
That's the way I'd do it.

Simon

Am 04.02.2004 um 23:53 schrieb Jody Garnett:

> That might be tough - would need a couple of indexed properties one
> for table name and one for Geometry type.
> Chris can we not do this based on the schema.xml file?
>
> That is the user can set almost anything they want for the schema.xml
> file - within limits that agree with what the DataStore says.
>
> That is even of the AttributeType from Oracle is Geometry.class (and
> not LineString.class or Point.class ) , the ui will give them a drop
> down list of acceptable mappings and gml:LineStringType and
> gml:PointType will both be in the list for them to choose.
>
> Geoghegan, Sean wrote:
>
>> Yeah we could do that. I'll look at adding it when I move to the
>> java bean config object.
>>
>> Sean
>>
>>
>>> Sean, do you think it might be possible to have a datastore param
>>> that says the geometry type? So the user could set it in his config
>>> if he knows that everything in the table will be a point, or a line,
>>> or whatever? It seems like many users might have this be the case,
>>> and would want DescribeFeatureType to report the correct types.
>>>
>>> Chris
>>>
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--