Ciao Juirgen,
please read below....

On Thu, Oct 9, 2008 at 12:45 PM, Jürgen Jacob <[EMAIL PROTECTED]> wrote:
> Dear Simone,
> thanks for your help!
>
> I get the image directly from the uDig Renderer:
> ApplicationGIS.getActiveMap().getRenderManager().getImage()

There should a similar method to get the associate grid-to world
transform and or the envelope. In basence of the grid to world, you
can build it using the envelope.
You can ask that to the udig guys.


>
> Additionally I'm no expert in the Geo world... and the word "georectified"
> is confusing me. Does it mean that we have cartesian coordinates with
> equidistant scale?

It means that there exists an affine transformation that maps from the
raster space (row columns) to the geographic space (lon,lat or
easting, northing or whatever it is  :-) )

>
> If I can guarantee that there will be always a Rectangular projection with
> equidistant lat / lon values, then it would be quite easy to calculate the
> new coverage.
>
> But the user can chose arbitrary crs in uDig and I'm not sure if this can
> lead to rotation, skew or axis seap (what's that? cant find a german
> translation..).

Your grid to world should be a simple scale and translate.


Simone.
>
> Jürgen
>
> Simone Giannecchini schrieb:
>>
>> 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!!!
>>>
>
>
>



-- 
-------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to