|
From: Leandro B. <lea...@ad...> - 2005-08-04 17:39:15
|
Hi guys,
I'm new to geotools so excuse me if this is a simple question.
I want to load a jpeg o gif image with a world file as a layer in a map
context, then load it in the map pane (StyledMapPane) an be able to
"draw" over it. The drawing part works perfectly, it stores the features
the user draws in a MySQLDataStore.
The problem, I belive, is the image CS. When the mapPane loads it always
shows the scale in 12.000Km and not the correct scale of the image.
I tried set the area of interest from a GridCoverage this way:
map.setAreaOfInterest(gc.getEnvelope(), gc.getCoordinateReferenceSystem());
but the first parameter is not the same Envelope class and when I cast
it I get a ClassCastException
this is how I load the image (I got it from USGS)...
WorldImageReader wir = new WorldImageReader(new
File("/home/leandro/Desktop/compos.jpg"));
GridCoverage gc = wir.read(null);
anyone knows how to solve this?
thanks guys!
Leandro
pd: sorry if my english is not so good.
|