From: Ian T. <ian...@us...> - 2002-04-29 16:30:19
|
Update of /cvsroot/geotools/geotools2/geotools-src/awtRendering/tests/unit/org/geotools/rendering In directory usw-pr-cvs1:/tmp/cvs-serv5205/geotools-src/awtRendering/tests/unit/org/geotools/rendering Modified Files: RenderingTest.java Log Message: moved test data away from origin so that translation can be checked Index: RenderingTest.java =================================================================== RCS file: /cvsroot/geotools/geotools2/geotools-src/awtRendering/tests/unit/org/geotools/rendering/RenderingTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -w -C2 -d -r1.4 -r1.5 *** RenderingTest.java 23 Apr 2002 14:25:35 -0000 1.4 --- RenderingTest.java 29 Apr 2002 16:30:15 -0000 1.5 *************** *** 45,49 **** // Request extent ! EnvelopeExtent ex = new EnvelopeExtent(0, 15, 0, 15); Feature lineFeature = new DefaultFeature(); --- 45,49 ---- // Request extent ! EnvelopeExtent ex = new EnvelopeExtent(5, 15, 5, 15); Feature lineFeature = new DefaultFeature(); *************** *** 70,74 **** polysym.setFill(myFill); DefaultRule rule = new DefaultRule(); ! rule.setSymbolizers(new Symbolizer[]{linesym,polysym}); DefaultFeatureTypeStyle fts = new DefaultFeatureTypeStyle(); fts.setRules(new Rule[]{rule}); --- 70,74 ---- polysym.setFill(myFill); DefaultRule rule = new DefaultRule(); ! rule.setSymbolizers(new Symbolizer[]{polysym}); DefaultFeatureTypeStyle fts = new DefaultFeatureTypeStyle(); fts.setRules(new Rule[]{rule}); *************** *** 95,105 **** private LineString makeSampleLineString(final GeometryFactory geomFac) { Coordinate[] linestringCoordinates = new Coordinate[7]; ! linestringCoordinates[0] = new Coordinate(0.0d,0.0d); ! linestringCoordinates[1] = new Coordinate(1.0d,0.0d); ! linestringCoordinates[2] = new Coordinate(1.0d,1.0d); ! linestringCoordinates[3] = new Coordinate(2.0d,1.0d); ! linestringCoordinates[4] = new Coordinate(2.0d,2.0d); ! linestringCoordinates[5] = new Coordinate(3.0d,2.0d); ! linestringCoordinates[6] = new Coordinate(3.0d,3.0d); LineString line = geomFac.createLineString(linestringCoordinates); --- 95,105 ---- private LineString makeSampleLineString(final GeometryFactory geomFac) { Coordinate[] linestringCoordinates = new Coordinate[7]; ! linestringCoordinates[0] = new Coordinate(5.0d,5.0d); ! linestringCoordinates[1] = new Coordinate(6.0d,5.0d); ! linestringCoordinates[2] = new Coordinate(6.0d,6.0d); ! linestringCoordinates[3] = new Coordinate(7.0d,6.0d); ! linestringCoordinates[4] = new Coordinate(7.0d,7.0d); ! linestringCoordinates[5] = new Coordinate(8.0d,7.0d); ! linestringCoordinates[6] = new Coordinate(8.0d,8.0d); LineString line = geomFac.createLineString(linestringCoordinates); *************** *** 109,125 **** private com.vividsolutions.jts.geom.Polygon makeSamplePolygon(final GeometryFactory geomFac) { Coordinate[] polygonCoordinates = new Coordinate[10]; ! polygonCoordinates[0] = new Coordinate(2,2); ! polygonCoordinates[1] = new Coordinate(1,4); ! polygonCoordinates[2] = new Coordinate(1,6); ! polygonCoordinates[3] = new Coordinate(2,7); ! polygonCoordinates[4] = new Coordinate(4,6); ! polygonCoordinates[5] = new Coordinate(6,7); ! polygonCoordinates[6] = new Coordinate(8,6); ! polygonCoordinates[7] = new Coordinate(8,4); ! polygonCoordinates[8] = new Coordinate(6,2); ! polygonCoordinates[9] = new Coordinate(2,2); try{ LinearRing ring = geomFac.createLinearRing(polygonCoordinates); ! com.vividsolutions.jts.geom.Polygon polyg = geomFac.createPolygon(ring,null); return polyg; } --- 109,135 ---- private com.vividsolutions.jts.geom.Polygon makeSamplePolygon(final GeometryFactory geomFac) { Coordinate[] polygonCoordinates = new Coordinate[10]; ! polygonCoordinates[0] = new Coordinate(7,7); ! polygonCoordinates[1] = new Coordinate(6,9); ! polygonCoordinates[2] = new Coordinate(6,11); ! polygonCoordinates[3] = new Coordinate(7,12); ! polygonCoordinates[4] = new Coordinate(9,11); ! polygonCoordinates[5] = new Coordinate(11,12); ! polygonCoordinates[6] = new Coordinate(13,11); ! polygonCoordinates[7] = new Coordinate(13,9); ! polygonCoordinates[8] = new Coordinate(11,7); ! polygonCoordinates[9] = new Coordinate(7,7); ! ! Coordinate[] hole = new Coordinate[6]; ! hole[0] = new Coordinate(8,8); ! hole[1] = new Coordinate(7,9); ! hole[2] = new Coordinate(9,9); ! hole[3] = new Coordinate(11,9); ! hole[4] = new Coordinate(11,8); ! hole[5] = new Coordinate(8,8); try{ LinearRing ring = geomFac.createLinearRing(polygonCoordinates); ! LinearRing h1 = geomFac.createLinearRing(hole); ! ! com.vividsolutions.jts.geom.Polygon polyg = geomFac.createPolygon(ring,new LinearRing[]{h1}); return polyg; } |