if DESC tablename -> SDO_GEOMETRY() then geofield is detected (in geoserver 
1.6.0 rc3)
--------------------------------------------------------------------------------------

                 Key: GEOT-1689
                 URL: http://jira.codehaus.org/browse/GEOT-1689
             Project: GeoTools
          Issue Type: Bug
          Components: data oraclespatial
    Affects Versions: 2.4-RC0
         Environment: Client:

Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


GeoServer 1.6.0-RC3 - 
http://downloads.sourceforge.net/geoserver/geoserver-1.6.0-RC3.exe?modtime=1200549612&big_mirror=0
GeoServer-1.6.0-RC3-oracle-plugin - 
http://downloads.sourceforge.net/geoserver/geoserver-1.6.0-RC3-oracle-plugin.zip?modtime=1200550429&big_mirror=0

Server:
Oracle91 Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0
            Reporter: Eduard Witteveen
            Assignee: Andrea Aime
             Fix For: 2.4-RC1


When i try to add a new FeatureType in geoserver, based on the oracle 
connection, the type for my field of type: SDO_GEOMETRY is not detected. In the 
edit  FeatureType 
(http://localhost:8080/geoserver/config/data/typeSelectSubmit.do ) screen, the 
datatype is not detected. 

The console does display the following message:
23 Jan 17:13:50 WARN [data.oracle] - Could not determine geometry class for 
[MY_TABLE.GEOM]

When i looked into the code ( org.geotools.data.oracle.SqlStatementEncoder 
line: 82: TYPE_MAPPINGS.put("MDSYS.SDO_GEOMETRY", Geometry.class ); ) , i saw 
detection of the type, so i figured that it was a "good thing" to see what the 
type was in the database. 

DESCRIBE MY_TABLE

Name                           Null     Type                                    
                                                                                
                                                                      
------------------------------ -------- 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
.....
GEOM                                    SDO_GEOMETRY()                          
                                                                                
                                                                      
.....
## rows selected

Well, first thing i realised, was to see what kind of type i defined the field, 
so i looked at the creation script:
CREATE TABLE MY_TABLE (
...
 GEOM  MDSYS.SDO_GEOMETRY
...
);
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
 VALUES ('MY_TABLE', 'GEOM',
   MDSYS.SDO_DIM_ARRAY
     (MDSYS.SDO_DIM_ELEMENT('X', -7000.000000000, 300000.000000000,
0.000000100),
      MDSYS.SDO_DIM_ELEMENT('Y', 289000.000000000, 629000.000000000,
0.000000100)
    ),
    90112);

So, i assume that this was done correctly in oracle

This leaves me at the point where i can change the code, i _COULD_ add the   
TYPE_MAPPINGS.put("SDO_GEOMETRY()", Geometry.class ); after 
TYPE_MAPPINGS.put("MDSYS.SDO_GEOMETRY", Geometry.class );  but i have some 
difficulties first compiling geoserver with maven (from my side ;-) ) and i 
need to use a binairy-version in my current project.

For more information, feel free to contact me

(and does geoserver 1.6.0 rc3 also need a bug report of this?)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to