Hi Martin,

   As Adrian refered, I know Mercator cann't act when the point close to 90
N or 90 S.

   Here is a screenshot in MapInfo, in this software, when the region close
to the polar, it extends image , never abort work.

  I had implement a WebGIS application with MapXtreme like Google Map, now
my boss want change to OpenSource, I found geotools.

  Or can you tell me how to refer a clip region to render map, such as

  MapPainter mapPainter = new MapPainter(shpMap);
  mapPainter.render(85, -180, 80, -85, "test.png");

  A greed idea.

Regards.

2007/5/15, Martin Desruisseaux <[EMAIL PROTECTED]>:

新买 a écrit :
>     Yes, with Mercator Projection, only the part where latitude between
> -85 to 85 can be rendered. I trace the code of Mercator Projection,
> there is some code as "throw Exception...".
>     I try to comments these word, then it dont work.
>     May you solve this problem?\

As explained in my previous email, you can NOT display a map up to 90°N or
90°S
using Mercator projection, no matter which software (mapXtreme or
whatever) you
use. This is mathematically *impossible*. The formula for the spherical
case is:

   log(tan(PI/4 + 0.5*latitude))

With latitude = PI/2, we get

   log(tan(PI/4 + PI/4))  =
   log(tan(PI/2))  =
   log(sin(PI/2) / cos(PI/2))  =
   log(1 / 0)  =
   log(infinity)  =
   infinity

See also Wikipedia: http://en.wikipedia.org/wiki/Mercator_projection

"A Mercator map can never fully show the polar areas, since linear scale
  becomes infinitely high at the poles. (...snip...) At latitudes higher
  than 70° north or south, the Mercator projection is practically
unusable."

The "throw Exception" is there as a guard and even the 85° limit (before
throwing an exception) is a lot.

If you see a world map with latitude up to 90°N or 90°S, then this is not
a
Mercator projection. It may be a Plate Carre or something else, but *not*
a
Cylindrical Mercator.

       Martin

<<attachment: Mercator In MapInfo.png>>

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

Reply via email to