Hello.

My name is Chun
I am developing a navigation software as a hobby project. My own  
projection module is messy
and not very precise so I am trying to convert it to use geotools  
referencing module.
There's a little learning curve but the fruit must be sweet.

I'm trying to use mercator projection to draw world image onto my own  
JPanel
and perform various navigational operations like
pinpoint exact lon/lat pointed by mouse cursor
calculate length of two point, ...

My understanding so far is
1. Create mercator ProjectedCRS
2. Create AffineTransform to transform resulting meters into pixel  
positions. basically scale and translate
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?
3. Create DerivedCRS with 2) which will be screen crs
4. Create world2screen MathTransform from ProjectedCRS to ScreenCRS  
vice versa for image2world.


The resulting world2screen and screen crs is, I think, because i dont  
have to deal
with AffineTransform for pixel to/from lon/lat conversion and  
calculations can be done
directly supplying screen crs to the arguments, eg, for  
GeodeticCalculator.

So i'm trying to create DerivedCRS. DefaultDerivedCRS constructor's  
arguments are
conversionFromBase: ???
base: CARTESIAN_2D
baseToDerived: above AffineTransform
derivedCS: DefaultCartesianCS.DISPLAY


Now the question is
- My understanding is right?
- How do I create baseToDerived Conversion?
- 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?

Thank you.

--
YoungJoon Chun <[EMAIL PROTECTED]>



-------------------------------------------------------------------------
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