From: <jer...@in...> - 2006-01-04 17:53:42
|
Hi, With my rasters, I've got the same problem (y coordinate are negatives) with the geotiff downloaded at http://www.csc.noaa.gov/crs/tcm/sample_geotiff.html So it seems to come from my code and the use of geotools. Any ideas where it does come from ? Jérémy *************** code : ------ MapContext mapContext = new DefaultMapContext(); StyleBuilder styleBuilder = new StyleBuilder(); Envelope envelope = new Envelope(); // On charge le GridCoverage GeoTiffReader reader = (GeoTiffReader) ((new GeoTiffFormat()).getReader(new File(NOM_FICHIER_GEOTIFF))); GridCoverage gc = reader.read(null); debug("gc.getCoordinateReferenceSystem() >" + gc.getCoordinateReferenceSystem()); debug("gc.getEnvelope() >" + gc.getEnvelope()); output : -------- Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode. [DEBUG_GeotiffTest] gc.getCoordinateReferenceSystem() >PROJCS["NAD83 / UTM zone 17N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Lon", EAST], AXIS["Lat", NORTH], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator", AUTHORITY["OGC","Transverse_Mercator"]], PARAMETER["central_meridian", -81.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9996], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","26917"]] [DEBUG_GeotiffTest] gc.getEnvelope() >GeneralEnvelope[703983.695935, -3738421.777099, 704893.695935, -3737739.777099] |