JDBC Update Geometry Collections
--------------------------------

                 Key: GEOT-2651
                 URL: http://jira.codehaus.org/browse/GEOT-2651
             Project: GeoTools
          Issue Type: Bug
          Components: data jdbc
    Affects Versions: 2.5.4
         Environment: JAVA 6 ; JTS Version 1.10
            Reporter: Michael Fröhler
            Priority: Critical


An update of certain geometry collection is not possible, as Geometry.equals 
method of JTS does not support at least certain types of GeometryCollections.

Result is an error with message: This method does not support 
GeometryCollection arguments

Example Geometry:

GEOMETRYCOLLECTION (
    POLYGON ((
            4465427.01287204 5331922.44208214, 
            4465437.76279866 5331886.55464433, 
            4465466.64028524 5331897.63869739, 
            4465427.01287204 5331922.44208214
        )), 
    POINT (
        4465454.97619893 5331898.86085942
    ), 
    LINESTRING (
        4465449.05410193 5331870.44579147, 
        4465456.10962711 5331883.54890965, 
        4465483.72696851 5331878.30766238, 
        4465481.91269061 5331908.94880028, 
        4465461.35087438 5331923.26143707
    ))


Create a Feature with the geometry an write it into a JDBC Datastore. Try to 
edit the feature without modifying the geometry. Edit will fail as the equal 
method of JTS throws Exception.

Code section where exception is thrown:

In the class JDBCFeatureWriter:

        if (live != null) {
            if (live.equals(current)) {
                // no modifications made to current
                live = null;
                current = null;

In the class JDBCTextFeatureWriter

            if (!DataUtilities.attributesEqual(liveAtt, currAtt)) {
                if (LOGGER.isLoggable(Level.INFO)) {
                    LOGGER.fine("modifying att# " + i + " to " + currAtt);
                }

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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to