org.geotools.data.oracle.sdo.SDO.createPoint throws IllegalArgumentException 
-----------------------------------------------------------------------------

                 Key: GEOT-3407
                 URL: http://jira.codehaus.org/browse/GEOT-3407
             Project: GeoTools
          Issue Type: Bug
          Components: data oraclespatial
    Affects Versions: 2.6.5
            Reporter: Joel Carranza
            Assignee: Andrea Aime


I have a GeometryCollection containg a point and line which fails to be 
correctly parsed with SDO class. Throws exception:

java.lang.IllegalArgumentException: ELEM_INFO STARTING_OFFSET 899 inconsistent 
with ORDINATES length 466
          at org.geotools.data.oracle.sdo.SDO.createPoint(SDO.java:2365)
          at org.geotools.data.oracle.sdo.SDO.createCollection(SDO.java:2911)
          at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2335)
          at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2289)

Offending line in SDO class is:

if (!(STARTING_OFFSET >= 1) || !(STARTING_OFFSET <= coords.size()))
   throw new IllegalArgumentException("ELEM_INFO STARTING_OFFSET 
"+STARTING_OFFSET+" inconsistent with ORDINATES length "+coords.size());

This is wrong as it fails to take into account the dimensions. STARTING_OFFSET 
should be compared against ordinateSize( coords, GTYPE ) as it is in other 
parts of the code. See comments on ordinateSize() method


-- 
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

        

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to