All,
I have the following information:
BufferedImage object ( Read in from a file using ImageIO)
A Coordinate Reference System ID (in this case its EPSG:4267 but it could
be any valid one)
Coordinates of the lower left corner and upper right corner in Latitude,
Longitude (WGS84 (EPSG:4326))
Filename
What I want to do is create a method that takes the information and then
writes out a Geotif with the correct header information. With out
modifying the raster portion.
Here is where I am struggling. I can convert the coordinates to the
requested projection using techniques specified in the demo class for
converting between systems. Which gives me two DirectPosition2D objects
one for the lower left corner and one for the upper right corner.
I then don't know how to create a Envelope since the Envelope2D takes a
Rectangle. Which is the lower left coordinate and the width and height.
How do I create the Rectangle from the two DirecPosition2D objects? that
is correct for any passed in targetCRS.
Once I have the envelope I can then create the GridCoverage and then write
it out. (I have done this already)
The key here is that I know the corners in terms of Lat- Long and the
image is in a known projection. I need to get the points into the images
projection to correctly write to GeoTiff.
Any Ideas?
Thanks,
Jared
-------------------------------------------------------------------------
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