Simone Giannecchini a écrit : > Ciao Kevin, > it should be new Rectangle2D.Float(-180, -90,180,90) not new > Rectangle2D.Float(-180, -90, 360, 180) (I guess it's a typo from > Martin and I think he will give feedback on this :-) ).
In Java2D, the argument in Rectangle2D constructor are (minX, minY, width, height) rather than (minX, minY, maxX, maxY). So the values are really Float(-180, -90, 360, 180) if we want to cover the world. I think that it is unfortunate: I would have preferred a (minX, minY, maxX, maxY) constructor, which is less bug prone especially when handling rectangles with infinite bounds (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4295465). Geotools uses the later, but when using Java2D we are stick to (x, y, width, height). On an other topic, I agree with Simone that JPEG is usually a bad format for grid coverage. Martin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users