← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11351: Upgraded to geotools 9.3

 

------------------------------------------------------------
revno: 11351
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-07-06 15:23:55 +0200
message:
  Upgraded to geotools 9.3
modified:
  dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java
  dhis-2/pom.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMap.java	2013-07-06 13:23:55 +0000
@@ -36,8 +36,7 @@
 import java.util.List;
 
 import org.geotools.data.DataUtilities;
-import org.geotools.data.simple.SimpleFeatureCollection;
-import org.geotools.feature.FeatureCollections;
+import org.geotools.feature.DefaultFeatureCollection;
 import org.geotools.feature.SchemaException;
 import org.geotools.feature.simple.SimpleFeatureBuilder;
 import org.geotools.geometry.jts.ReferencedEnvelope;
@@ -217,7 +216,7 @@
         SimpleFeatureType featureType;
         SimpleFeatureBuilder featureBuilder;
         SimpleFeature feature;
-        SimpleFeatureCollection featureCollection;
+        DefaultFeatureCollection featureCollection;
         Style style = null;
 
         featureType = createFeatureType( mapObject.getGeometry() );
@@ -225,7 +224,7 @@
         featureBuilder.add( mapObject.getGeometry() );
         feature = featureBuilder.buildFeature( null );
 
-        featureCollection = FeatureCollections.newCollection();
+        featureCollection = new DefaultFeatureCollection();
         featureCollection.add( feature );
 
         // Create style for this map object
@@ -283,7 +282,7 @@
     {
         String str = "Error creating map image: " + error;
         BufferedImage image = new BufferedImage( 500, 25, BufferedImage.TYPE_INT_RGB );
-        Graphics2D g = (Graphics2D) image.createGraphics();
+        Graphics2D g = image.createGraphics();
 
         g.setColor( Color.WHITE );
         g.fill( new Rectangle( 500, 25 ) );

=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml	2013-06-26 15:48:29 +0000
+++ dhis-2/pom.xml	2013-07-06 13:23:55 +0000
@@ -962,6 +962,6 @@
     <jackson.version>2.0.6</jackson.version>
     <camel.version>2.10.2</camel.version>
     <slf4j.version>1.6.6</slf4j.version>
-    <geotools.version>8.4</geotools.version>
+    <geotools.version>9.3</geotools.version>
   </properties>
 </project>