From: <obs...@ao...> - 2005-07-30 21:07:22
|
sorry to ask such an elementary question about geotools, but i'm really struggling with the whole GridCoverage stuff. all i want to do is: load up a DEM (arcgrid, geotiff, whatever), and given a GPS co-ordinate, get the elevation data. this is not a gui thing or other fancy ssytem, just a basic command line System.out.print(...) output, as simple as you can get. I also need to do a similiar thing with road and water data in a shapefile, but i have a better handle on that stuff. the problem for me is that most of the demo code on the website for dealing with raster data doesn't seem to work 100% on Geotools 2.1 (at least given my rudimentary java, geotools, and gis familiarity). In fact, its probably confused me more then helped since it uses GridCoverage (which is deprecated) instead of GridCoverage2d. looking through the geotools and opengis api javadocs, i haven't seen anything that can really help me do what I want. It seems like the evaluate() function in Coverage or the getDataBlock() in GridCoverage might help, but i'm still working on getting results from them, and not sure if they will do the trick. if someone could just say "use the XXXX function in the YYYY class" that would give me a lot of reassurance because I would at least know its possible. while i'm asking about this, the results of the envelope that seems to give a bounding box for the loaded map data aren't in GPS - i guess they are in some other coordinate reference system. i haven't looked into translating them to GPS coords yet, but if anyone could give me hints on the translation that would be great. thanks a lot in advance. -Mike Gordon obs...@ao... Team Jefferson www.teamjefferson.com |