Martin,  

interesting discussion indeed. The problem looks very similar to ours
described in

http://www.nabble.com/Still-problems-with-reprojecting-raster-data-p9689563.html
http://www.nabble.com/Still-problems-with-reprojecting-raster-data-p9689563.html
 

We found a workaround in the way that we calculate our target envelope
ourselves before the rendering, and then put this envelope in a modified
StreamingRenderer and GridCoverageRenderer, which just hand this unchanged
envelope over to be used in Resampler2D. Originally, the target envelope was
determined there by calling 'CRSUtilities.transform(..., sourceEnvelope).
Moreover, we skipped the cropping in GridCoverageRenderer done by
'CRSUtilities.transform(deviceCRSToGCCRSTransform,destinationEnvelope)',
which already produced a wrong 'destinationEnvelopeInSourceGCCRS' when a
pole is included.
Of course I'm not sure if we might have missed something (it was hard to
understand all the rendering stuff), but at least we now obtain reasonable
raster images for AzimuthalEquidistant and Gnomonic projections including a
pole.

Cheers,
Olaf


Martin Desruisseaux-2 wrote:
> 
> Andrea Aime a écrit :
>> In this case the singularity is the south pole, whose latitude is
>> determined, but longitude is not. When you have it, you should add
>> the -180,180 range to envelope longitudes (or I'm missing something)?
> 
> Longitude would be tested too, like every bounded axis (no matter which
> axis it
> is). In the particular case of South Pole, the longitude is irrelevant,
> but this
> is just a particular case. Generally speaking, we have a choice:
> 
> Testing  (-180, -90), (180, -90), (-180, 90), (180, 90)
> 
> or testing (-180, centerY), (180, centerY), (centerX, -90), (centerX, 90).
> 
> Where (centerX, centerY) are relative to the initially transformed
> envelope. I
> tend toward the later. It make no difference for polar projections, but
> may make
> a difference for the 180° longitude bounds. Consider a MercatorProjection
> where
> the transformed envelope is between 20°N and 40°N. If we try to project
> (-180,
> 90) and its friends, we will get a TransformException because Mercator
> projection is not supported at the pole. If we try to project (-180,
> centerY)
> instead, we will get a valid point. If this point is inside the source
> envelope
> because this envelope overlaps the 180° longitude, the transformed
> envelope will
> be expanded on the full (-180 to 180) width. This is quite large, but at
> least
> it is correct, better than actual behavior which return a completly wrong
> target
> envelope when the source envelope overlaps the 180° longitude.
> 
>       Martin
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Envelope-reprojection-issues-on-stereographic-projectsion-tf3884518.html#a11053054
Sent from the geotools-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to