Hi, 
    I am relatively new to geotools and I'm looking for a way to display an
image on the center of a JMapPane in instances where the image does not have
any grid information associated with it.  Then once the image is placed on
the center of the map, the user should be able to move, resize, crop, and/or
georeference it.  Below is my code snippet that will only add images to the
JMapPane if there is associated Grid information.  The 'else' statement runs
if there is an unknown or no grid associated with the file: 

AbstractGridFormat format = GridFormatFinder.findFormat(imageFile);  //find
the format of the image File object 
if (!(format instanceof UnknownFormat)) {  //the format was found so run a
getReader method 
          readImage = format.getReader(imageFile); 
} else {   //format is an instance of UnknownFormat,         
          //Implement adding the image to the JMapPane here and allowing the
user to move, crop, resize, and georeference the image. 
} 
map.addLayer(readImage, rasterStyle);  //add the image file to the map layer 

If anyone can point me to an example of give me some guidance, it would be
GREATLY appreciated!! 

S Dille
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/JMapPane-and-Images-tp5109212p5109212.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to