Ciao Jurgen,
there is a missing piece here that it's needed in order to do
transformation. I am talking about the grid-to-world transform which
is the transformation that maps from raster space into model
(geographi space). Assuming your raster is georectified this is a an
affine transform.

If you are getting this snapshot from the udig view you should able to
get the gridtoworld from there and then, with some fiddling, to apply
that to your coverage bounds.

If your original coverage does no have any rotation or skew or axis
seap you can rebuild the original grid-to-world as a simple scale and
translate using the envelope and dimensions of the raster.
Then you need to apply this transformation to the new raster
dimensions to get the new envelope. Notice that the new raster
dimensions must fall within the old raster dimension for this to work,
which means that while cropping you need to retain the positions with
respect to the original raster.

Simone.

On Thu, Oct 9, 2008 at 10:55 AM, Jürgen Jacob <[EMAIL PROTECTED]> wrote:
> Dear all,
> I'm using uDig for my own application and have this problem:
> The operator can make snapshots of the map for usage outside of the GIS
> component of my application. The image (AWT Raster) is saved together
> with envelope details (crs, min and max x and y). With a tool the user
> can trim (crop?) this image inside the appliction. Example:Only a
> certain part of the map / image is of interest.
> Besides saving the new raster (quite easy) I must modify the saved
> envelope values and here I need some help.
>
> I have the old Raster and a new Raster that is a part of old Raster. How
> is it possible with geotools or jts to calculate the new bounding box. I
> have the old bounding box and new and old raster dimensions.
>
> Thanks for your help!!!
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Geotools-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>



-- 
-------------------------------------------------------
Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini

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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to