GeoTools
  1. GeoTools
  2. GEOT-536

Multilinestring and Multipolygon issue in Oracle SDO

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.M5
    • Fix Version/s: 2.1.1
    • Component/s: jdbc-oracle plugin
    • Labels:
      None
    • Environment:
      Windows XP, Java 1.5, Oracle 9i

      Description

      Class org.geotools.data.oracle.sdo.SDO
      Methods createMultiLine and createMultiPolygon:

      the next code snippet (common for both methods) seems to be an error (the comment says the opposite to the condition in the if sentence). We have tried accessing multipolygons and multilines in Oracle and it gives us the warning. Removing the ! operator in the if condition seems to fix the problem.
      ------------------------------------------------
      if (!(INTERPRETATION > 1))

      { // we cannot represent INTERPRETATION > 1 LOGGER.warning( "Could not create MultiLineString with INTERPRETATION "+INTERPRETATION+" - we can only represent 1 for straight edges"); return null; }

      --------------------------------------------------

        Issue Links

          Activity

          Hide
          Ritesh Agrawal added a comment -
          A work around for the problem is to create a like filter and pass it to feature source .

          Below is a sample code

                  LikeFilter likeFilter = filterFactory.createLikeFilter();
                  Expression pattern = filterFactory.createLiteralExpression("*");
                  Expression attr = filterFactory.createAttributeExpression(null, column.name);
                  likeFilter.setPattern(pattern, "*", "?", "\\");
                  likeFilter.setValue(attr);
                  
                  FeatureSource fs = dstore.getFeatureSource(column.table.name);
                  FeatureResults fr = fs.getFeatures();
                  FeatureCollection fc = fr.collection();
                  Iterator iter = fc.iterator();

          Like Filter will not work for numeric field so use comparefilter

          Regards,
          Ritesh
          Show
          Ritesh Agrawal added a comment - A work around for the problem is to create a like filter and pass it to feature source . Below is a sample code         LikeFilter likeFilter = filterFactory.createLikeFilter();         Expression pattern = filterFactory.createLiteralExpression("*");         Expression attr = filterFactory.createAttributeExpression(null, column.name);         likeFilter.setPattern(pattern, "*", "?", "\\");         likeFilter.setValue(attr);                  FeatureSource fs = dstore.getFeatureSource(column.table.name);         FeatureResults fr = fs.getFeatures();         FeatureCollection fc = fr.collection();         Iterator iter = fc.iterator(); Like Filter will not work for numeric field so use comparefilter Regards, Ritesh
          Hide
          Jody Garnett added a comment -
          The above mentioned code seemed to be the case of an enthusiastic cut and paste - problem resolved on 2.1.1 (patch will be applied to 2.2.x shortly)
          Show
          Jody Garnett added a comment - The above mentioned code seemed to be the case of an enthusiastic cut and paste - problem resolved on 2.1.1 (patch will be applied to 2.2.x shortly)
          Hide
          Chris Holmes added a comment -
          just trying to attach the jar...
          Show
          Chris Holmes added a comment - just trying to attach the jar...
          Hide
          Chris Holmes added a comment -
          to use in geoserver replace the gt2-oracle.jar in WEB-INF/lib with this one. Hopefully it should work, let us know if it does the trick.
          Show
          Chris Holmes added a comment - to use in geoserver replace the gt2-oracle.jar in WEB-INF/lib with this one. Hopefully it should work, let us know if it does the trick.
          Hide
          Chris Holmes added a comment -
          just wanted to attach the jar, turning this back to closed.
          Show
          Chris Holmes added a comment - just wanted to attach the jar, turning this back to closed.
          Hide
          Chris Holmes added a comment -
          Lots of people on this one last week...
          Show
          Chris Holmes added a comment - Lots of people on this one last week...

            People

            • Assignee:
              Chris Holmes
              Reporter:
              Rubén Béjar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: