[Schmitzm-commits] r341 - in branches/1.0-gt2-2.6: . src/org/geotools/gui/swing src/org/geotools/renderer/lite/gridcoverage2d src/org/geotools/renderer/shape src/schmitzm/geotools src/schmitzm/geotools/feature src/schmitzm/geotools/gui src/schmitzm/geotools/io src/schmitzm/geotools/styling src/skrueger/geotools src/skrueger/geotools/labelsearch

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Aug 31 12:16:42 CEST 2009


Author: alfonx
Date: 2009-08-31 12:16:40 +0200 (Mon, 31 Aug 2009)
New Revision: 341

Modified:
   branches/1.0-gt2-2.6/migration_to_gt2-2.6.txt
   branches/1.0-gt2-2.6/src/org/geotools/gui/swing/JMapPane.java
   branches/1.0-gt2-2.6/src/org/geotools/renderer/lite/gridcoverage2d/RasterSymbolizerSupport.java
   branches/1.0-gt2-2.6/src/org/geotools/renderer/shape/TransitionShapefileRenderer.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/FilterUtil.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/PipedFeatureIterator.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/io/GeoExportUtil.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java
   branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFeatureCollectionTableModel.java
   branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java
Log:
Migrating to GT2.6... only 46 compile errors left...

Modified: branches/1.0-gt2-2.6/migration_to_gt2-2.6.txt
===================================================================
--- branches/1.0-gt2-2.6/migration_to_gt2-2.6.txt	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/migration_to_gt2-2.6.txt	2009-08-31 10:16:40 UTC (rev 341)
@@ -61,4 +61,14 @@
 
 GridCoverage factory
 ====================
-- FactoryFinder replaced with CoverageFactoryFinder
\ No newline at end of file
+- FactoryFinder replaced with CoverageFactoryFinder
+
+Feature-Attributes
+====================
+- getAttributes(Object[]) replaced with List<Object> atts = f.getAttributes(); 
+
+
+FeatureTypeBuilder
+====================
+- builder.addTypes( ftype.getAttributeTypes() ) wird zu
+    

Modified: branches/1.0-gt2-2.6/src/org/geotools/gui/swing/JMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/org/geotools/gui/swing/JMapPane.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/org/geotools/gui/swing/JMapPane.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -58,18 +58,12 @@
 import javax.swing.JPanel;
 
 import org.apache.log4j.Logger;
-import org.geotools.feature.FeatureCollection;
-import org.geotools.filter.IllegalFilterException;
-import org.geotools.map.DefaultMapContext;
 import org.geotools.map.MapContext;
-import org.geotools.map.MapLayer;
 import org.geotools.map.event.MapLayerListEvent;
 import org.geotools.map.event.MapLayerListListener;
-import org.geotools.referencing.crs.DefaultGeographicCRS;
 import org.geotools.renderer.GTRenderer;
 import org.geotools.renderer.label.LabelCacheImpl;
 import org.geotools.renderer.lite.LabelCache;
-import org.geotools.renderer.lite.LabelCacheDefault;
 import org.geotools.renderer.lite.StreamingRenderer;
 import org.geotools.renderer.shape.TransitionShapefileRenderer;
 import org.geotools.styling.Graphic;
@@ -77,10 +71,8 @@
 import org.geotools.styling.Mark;
 import org.geotools.styling.PointSymbolizer;
 import org.geotools.styling.PolygonSymbolizer;
-import org.geotools.styling.Style;
 import org.geotools.styling.StyleBuilder;
 import org.geotools.styling.StyleFactory;
-import org.opengis.filter.Filter;
 import org.opengis.filter.FilterFactory2;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 
@@ -88,7 +80,6 @@
 
 import com.vividsolutions.jts.geom.Coordinate;
 import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.geom.Geometry;
 import com.vividsolutions.jts.geom.GeometryFactory;
 
 public class JMapPane extends JPanel implements MouseListener,

Modified: branches/1.0-gt2-2.6/src/org/geotools/renderer/lite/gridcoverage2d/RasterSymbolizerSupport.java
===================================================================
--- branches/1.0-gt2-2.6/src/org/geotools/renderer/lite/gridcoverage2d/RasterSymbolizerSupport.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/org/geotools/renderer/lite/gridcoverage2d/RasterSymbolizerSupport.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -21,15 +21,12 @@
 import java.util.List;
 import java.util.Map;
 
-import javax.media.jai.util.Range;
-
 import org.apache.log4j.Logger;
 import org.geotools.coverage.Category;
 import org.geotools.coverage.CoverageFactoryFinder;
 import org.geotools.coverage.GridSampleDimension;
 import org.geotools.coverage.grid.GridCoverage2D;
 import org.geotools.coverage.grid.GridGeometry2D;
-import org.geotools.factory.FactoryFinder;
 import org.geotools.styling.ColorMap;
 import org.geotools.styling.ColorMapEntry;
 import org.geotools.styling.RasterSymbolizer;

Modified: branches/1.0-gt2-2.6/src/org/geotools/renderer/shape/TransitionShapefileRenderer.java
===================================================================
--- branches/1.0-gt2-2.6/src/org/geotools/renderer/shape/TransitionShapefileRenderer.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/org/geotools/renderer/shape/TransitionShapefileRenderer.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -16,7 +16,6 @@
  */
 package org.geotools.renderer.shape;
 
-import static org.geotools.data.shapefile.ShpFileType.GRX;
 import static org.geotools.data.shapefile.ShpFileType.QIX;
 import static org.geotools.data.shapefile.ShpFileType.SHX;
 

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/FilterUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/FilterUtil.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/FilterUtil.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -31,7 +31,6 @@
 
 import org.geotools.factory.CommonFactoryFinder;
 import org.geotools.filter.FilterFactoryImpl;
-import org.geotools.filter.visitor.DuplicatingFilterVisitor;
 import org.opengis.filter.Filter;
 import org.opengis.filter.FilterFactory;
 import org.opengis.filter.FilterFactory2;

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -37,8 +37,10 @@
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -59,7 +61,6 @@
 import org.geotools.feature.FeatureIterator;
 import org.geotools.feature.FeatureTypeBuilder;
 import org.geotools.feature.GeometryAttributeType;
-import org.geotools.feature.IllegalAttributeException;
 import org.geotools.feature.SchemaException;
 import org.geotools.feature.type.GeometricAttributeType;
 import org.geotools.filter.FilterFactory;
@@ -70,6 +71,7 @@
 import org.geotools.styling.StyleBuilder;
 import org.geotools.styling.Symbolizer;
 import org.geotools.util.SimpleInternationalString;
+import org.opengis.feature.IllegalAttributeException;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
 import org.opengis.feature.type.AttributeDescriptor;
@@ -609,13 +611,15 @@
     FeatureCollection<SimpleFeatureType, SimpleFeature> resultFc = DefaultFeatureCollections.newCollection();
     FeatureIterator<SimpleFeature>   fi       = fc.features();
     // Array fuer die Attribut-Werte eines Features
-    Object[]          fValues  = new Object[resultType.getAttributeCount()];
+    
+    List<Object>     fValues  = new ArrayList<Object>(resultType.getAttributeCount());
     for ( ; fi.hasNext(); ) {
       // Werte der alten Attribute in Array schreiben
-      fi.next().getAttributes(fValues);
+    	fValues = fi.next().getAttributes();
+      
       // Default-Werte der neuen Attribute in Array schreiben
-      for ( int i=fType.getAttributeCount(); i<fValues.length; i++)
-        fValues[i] = resultType.getAttributeDescriptors().get(i).getDefaultValue();
+      for ( int i=fType.getAttributeCount(); i<fValues.size(); i++)
+        fValues.set(i,resultType.getAttributeDescriptors().get(i).getDefaultValue());
       // Erweitertes SimpleFeature erzeugen und FeatureCollection fuellen
       resultFc.add( resultType.create( fValues ) );
     }

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/PipedFeatureIterator.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/PipedFeatureIterator.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/PipedFeatureIterator.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -46,14 +46,14 @@
  */
 public class PipedFeatureIterator implements Iterator<SimpleFeature> {
   /** Holds the {@link FeatureIterator} which is piped. */
-  protected FeatureIterator fIter = null;
+  protected FeatureIterator<SimpleFeature> filter = null;
   
   /**
    * Creates a new iterator.
-   * @param fIter {@link FeatureIterator} which is piped
+   * @param filter {@link FeatureIterator} which is piped
    */
-  public PipedFeatureIterator(FeatureIterator fIter) {
-    this.fIter = fIter;
+  public PipedFeatureIterator(FeatureIterator<SimpleFeature> filter) {
+    this.filter = filter;
   }
   
   /**
@@ -61,7 +61,7 @@
    */
   @Override
   public boolean hasNext() {
-    return fIter.hasNext();
+    return filter.hasNext();
   }
 
   /**
@@ -69,7 +69,7 @@
    */
   @Override
   public SimpleFeature next() {
-    return fIter.next();
+    return filter.next();
   }
 
   /**

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/JMapPane.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -66,7 +66,6 @@
 import org.geotools.factory.GeoTools;
 import org.geotools.feature.FeatureCollection;
 import org.geotools.filter.AbstractFilter;
-import org.geotools.filter.FilterFactoryImpl;
 import org.geotools.filter.GeometryFilterImpl;
 import org.geotools.filter.spatial.DWithinImpl;
 import org.geotools.geometry.GeneralEnvelope;

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/io/GeoExportUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/io/GeoExportUtil.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/io/GeoExportUtil.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -47,7 +47,6 @@
 import org.geotools.feature.FeatureCollection;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
-import org.opengis.feature.type.FeatureType;
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -378,8 +378,10 @@
 					new Color[] { new Color(0, 0, 0, 0) },
 					// new NumberRange(colorMapMin-2, colorMapMin-1), //
 					// logischer, aber klappt nicht!?
-					new NumberRange(colorMapMax + 3, colorMapMax + 4),
-					new NumberRange(lowerStart, colorMapMin - 1)));
+					NumberRange.create(colorMapMax + 3, colorMapMax + 4),
+//					new NumberRange(colorMapMax + 3, colorMapMax + 4),
+					NumberRange.create(lowerStart, colorMapMin - 1),
+//					new NumberRange(lowerStart, colorMapMin - 1)));
 
 		// Create the GridSampleDimension
 		GridSampleDimension gsd = new GridSampleDimension(name, categories

Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFeatureCollectionTableModel.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFeatureCollectionTableModel.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFeatureCollectionTableModel.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -42,7 +42,6 @@
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
 import org.opengis.feature.type.AttributeDescriptor;
-import org.opengis.feature.type.FeatureType;
 import org.opengis.filter.Filter;
 
 import schmitzm.geotools.gui.FeatureCollectionTableModel;

Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java	2009-08-28 11:13:50 UTC (rev 340)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/LabelSearch.java	2009-08-31 10:16:40 UTC (rev 341)
@@ -43,11 +43,9 @@
 import org.geotools.map.MapLayer;
 import org.geotools.styling.Style;
 import org.geotools.styling.TextSymbolizer;
-import org.opengis.feature.Feature;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
 import org.opengis.feature.type.AttributeDescriptor;
-import org.opengis.feature.type.FeatureType;
 import org.opengis.filter.Filter;
 import org.opengis.filter.expression.Expression;
 import org.opengis.filter.expression.PropertyName;



More information about the Schmitzm-commits mailing list