Thank you for your quick reply.

Maybe my definition or basic knowledge is wrong. Plz be patient with  
my ignorance
and correct what i am missing.

My understanding is.
CoordinateSystem means x y relations.
CoordinateReferenceSystem is CS with exact numbers.

so given lon/lat point,
WGS84 CRS -> ProjectedCRS
gives meters.
this meter need to be affine transformed to be pixels.
Am i missing something?

My comments follow below.


On Jul 18, 2008, at 7:21 PM, Martin Desruisseaux wrote:

> Y. J. Chun a écrit :
>
>> 1. Create mercator ProjectedCRS
>> 2. Create AffineTransform to transform resulting meters into  
>> pixel     positions. basically scale and translate
>
> Right.
>
>> 2.1. Create AffineTransform to transform my mercator map to        
>> ProjectedCRS. the image data has xy to lonlat reference points so  
>> i       can use GridToEnvelopeMapper?
>
> I'm not sure to understand this part. What do you mean by "Mercator  
> map" exactly? It should be the ProjectedCRS already, so there is no  
> transformation here.
>

image pixel -- (AffineTransform) --> meters -- (inverse proj crs ->  
wgs crs) --> lon/lat ?
My world map is consisted with many images.
because images have only some reference points not upper left, lower  
right coordination
I need this transform to check if the image contains my screen lon/lat  
and needs to be loaded.

>
>> 3. Create DerivedCRS with 2) which will be screen crs
>
> Right.
>
>> 4. Create world2screen MathTransform from ProjectedCRS to  
>> ScreenCRS  vice versa for image2world.
>
> Could be done before 3. This "world2screen" (or "objective to  
> display" in GO-1 terminology) is the affine transform created at  
> step 2, so you already have it.
>


Again, my understanding is
WGS83 CRS (which is lon/lat) --> projected crs (meters) --- (affine  
transform) -->  screen pixels ?
So my world2screen means lon/lat to pixel. Do you mean the same?
It seems your world means meters (the result of projected crs  
conversion).


>
>> - How do I create baseToDerived Conversion?
>
> You can wraps your AffineTransform computed at step 2 in a  
> MathTransform using ProjectiveTransform.create(...) method. Then you  
> can give this MathTransform to a DefiningConversion constructor.
>

I already supplied that mathtransform in baseToDerived parameter and  
all others too.
Why does it need conversion parameter?


>
>> - If i want to zoom/pan, I have to modify 2) AffineTransform. does  
>> it  affect screen crs and world2screen on the fly?
>> or do i have to create world2screen again every time i zoom/pan?
>
> You have to recreate the CRS every time because all CRS are  
> immutable by design. For performance reason it is better to recreate  
> them on a "lazy" basis, i.e. only when you need it.
>
>       Martin

Another question arises. Is it better to use EngineeringCRS for this  
specific screen crs?
I just didn't figure out the purpose of engineering crs yet cuz it  
says CARTESIAN crs
does not have transformation to other crs.

Thank you.


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

Reply via email to