Hi Jody,

Thanks for your help. I'm a GeoTools beginner and have limited Java
experience, so will need to ask some basic questions...

> [EMAIL PROTECTED] wrote:
>> I'm new to GeoTools, using it underneath GeoServer with an Oracle
>> datastore to read feature data that is in an unusual format due to
>> having
>> been originally entered using GeoMedia before being exported to Oracle.
>>
> Interesting.
>> For example, one Oracle table contains in each row a first element with
>> SDO_ETYPE of 0 (denoting "geometry type not supported by Oracle"): this
>> is
>> done as to to approximate an "oriented points" geometry, which
>> apparently
>> is supported by the latest Oracle but was not supported by the Oracle
>> being used at the time of table creation. Hence, although the data is
>> two-dimensional the SDO_ORDINATES array in fact contains three ordinates
>> for the element of type 0, which causes an exception to be thrown at
>> line
>> 2082 of org.geotools.data.oracle.sdo.SDO.coordinates(SDO.java).
>>
> Yeah I only support what was in the documentation, and this class (SDO)
> was picked up by JTS recently, and
> thus I can probably retire it.  Can you try making use of JTS 1.7 and
> see if it does any better?

By "the documentation", do you mean 'OpenGIS Simple Features Specification
for SQL, Revision 1.1'? Or is JTS a replacement for these specifications?
(I'm very confused!) Another example of the kind of Oracle data I'm trying
to deal with is

SDO_GEOMETRY(2002, 82474, NULL, SDO_ELEM_INFO_ARRAY(1, 4, 1, 1, 2, 2),
SDO_ORDINATE_ARRAY(212617.232, 599480.464, 212690.034, 599577.342,
212809.778, 599595.966))

The first triplet (1, 4, 1) of the element info array denotes a compound
line string, while the second triplet (1, 2, 2) denotes a line string of
circular arcs. I know that 'Simple Features Specification for SQL'
specifies no subclass of Curve other than LineString, but I don't mind
approximating circular arcs with chords: this approximation can apparently
be done within GeoTools using the function GT_PLARC2PL, so has a similar
Oracle data-transformation problem already been implemented in GeoTools?
(And how can I search for the GeoTools classes that make use of
GT_PLARC2PL?)

And how would I make GeoServer use JTS 1.7 rather than SDO? (If that is
what you meant - sorry!)
>
> Regardless you will probably have to manipulate your STRUCT to reflect
> an EDO_RTYPE that is known to
> your new oracle system.
>> For reasons of interoperability with other applications that use the
>> data,
>> it's not possible for me to change the geometry structure within the
>> Oracle tables, so I think I need to transform the data somehow before
>> presenting it to GeoTools. Or should I define a new kind of DataStore?
>> Or
>> might a GeoMedia datastore be able to handle the Oracle tables? Or do I
>> need to write a new module for GeoTools?
>>
> For something like this, I would subclass oracle datastore and ask it to
> use a new SDO class. For you new SDO class
>  you can teach it how to recognize your ETYPE 0 (and its intended
> meaning).
>> Any help or hints as to how to get started would be greatly appreciated.
>> Or can anyone point to the appropriate section(s) of the GeoTools
>> design?
>>
> The javadocs for SDO are very complete, SDO is used by an
> GeometryConverter which is where you would need to subclass, and perform
> any STRUCT manipulation.  If there are any additional ETYPES which you
> can smoothly adapt to JTS please feel free to
> add them. Although the warning about moving over to JTS1.7 should be
> noted.

Sorry for the crudeness of my understanding, but exactly would class would
I sublass? OracleDatastore? Or GeometryConverter? Does the change to
JTS1.7 mean that I have to be careful which classes I use in my code?
>
> These classes are called by SDOAttributeIO (which is only engaged for
> geometry columns).
>
Would my transformation code be most similar to that in SDOAttributeIO?

> Cheers,
> Jody



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to