Hi, I have a question about the GTOPO30 coverage implementation in GT 2.2.1.
Is it possible that the implementation is buggy in the sense that the resulting GridCoverage.evalute methods do not deliver the correct height values for a specified coordinate? I just compared the results with some code we have here for reading GTOPO30 files. Using global mapper the values delivered by GTopo30Reader.read(..).evaluate seem to be totally wrong. Or is there something wrong in the way I use the classes? I checked everything twice. Th code below for instance delivers (with GTOPO30 file downloaded from http://edc.usgs.gov/products/elevation/gtopo30/gtopo30.html): 1418 104.0 The second value looks fine. ------------- start example code ---------------- File file = new File("d:/temp", "e020n40.dem"); GTopo30Reader reader = new GTopo30Reader(file); GridCoverage coverage = reader.read(null); GeoPosition pos = new GeoPosition(22., 39.5, 0.); int[] result = (int[])coverage.evaluate(new GeneralDirectPosition(pos.getLatitude(), pos.getLongitude())); System.out.println(result[0]); GTOPO30 gtop = new GTOPO30(new File("d:/temp")); System.out.println(gtop.getHeight(pos)); ------------ end code ----------------------- Helge ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
