Sandeep Kumar Jakkaraju a écrit :
> 3). If I can create the images !!  Can I get the pixel x,y corresponding 
> to some Lat/Lon on the Image Generated ???

I can't said for the two first question. But for this last question, you can.

Given an arbitrary RenderedImage, the easiest approach is to create a 
GeneralEnvelope object with the east, west, north and south bounds of yours 
image. Then you can create a GridCoverage object:

     RenderedImage image = ...
     GeneralEnvelope envelope = new GeneralEnvelope(myCRS);
     envelope.setRange(0, ...);
     envelope.setRange(1, ...);
     GridCoverageFactory factory = FactoryFinder.getGridCoverageFactory(null);
     GridCoverage2D coverage = factory.create("My coverage", image, envelope);

 From that point, you can invoke:

     int[] values = null;
     Point2D point = ...;
     values = coverage.evaluate(point, values);

where 'point' is geographic coordinates.

Note that with more sophesticated grid coverage creation, you can also get 
GridCoverage2D to convert automatically for you the pixel value in some 
floating 
point values. For example if the pixel values are height multiplied by 100 (in 
order to fit as an integer type), GridCoverage2D can divide the values by 100 
for you.

        Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to