Andrea-
    Thanks for looking into this. The output looks *MUCH* better: 

http://www.javaxt.com/download/?/images/temp/reproject_out.jpeg

Couple questions:

(1) Should I use your code for production purposes or should I wait for an 
official bug fix?
(2) I see black borders around the output image. Is that normal?

Thanks Again!
Peter




----- Original Message ----
From: Andrea Aime <[email protected]>
To: Peter Borissow <[email protected]>
Cc: Simone Giannecchini <[email protected]>; 
[email protected]
Sent: Sat, March 26, 2011 7:53:37 AM
Subject: Re: [Geotools-gt2-users] Error Reprojecting Coverage to EPSG:900913

On Wed, Mar 16, 2011 at 11:21 AM, Peter Borissow
<[email protected]> wrote:
> Hello Andrea/All-
>      I have attached an example of an image I am trying to reproject. The
> image is just a plain jpeg returned from a wms. I would like to learn how to
> transform the image into another projection. Here's the code I am using to
> no avail.

Hi Peter,
unfortunately I had time to look into this one only today.
Unfortunately I can confirm you've found a bug, a serious one too:
http://jira.codehaus.org/browse/GEOT-3484

The problem happens any time the reprojetion is working on an area
where the map projection deformation is fully simmetrical to the
two axis cutting it in four equal quadrants, which is what happens
with the Mercator projection in that area.

The error is in an estimator that tries to see if it's possible to optimize
the fully mathematical correct reprojection (which is very expensive) with
an affine transform or a grid warp.
Unfortunately the estimation process is fooled by the symmetrical setup
of the projection and ends up thinking the projection can be approximated
by an affine transform.

The attached program should work fine, it just disables the optimization.

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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



      

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to