[Gdal-dev] Re: Problem creating GeoTiff across International Date
Line
Todd Jellett
todd.jellett at caris.com
Thu Oct 20 14:38:03 EDT 2005
Hi Ed,
The central meridian for the Mercator projection is 0.0. Your question
provided a clue
and I tried changing the CM to 170.0 and this did not exhibit the
problem we were
seeing (only one side of the GeoTiff being drawn - split at the IDL).
Problem is that the image came from a client (including the CM of 0.0).
We then tried
to display the image on the vector "Map of the World" reprojected to the
coordinate
system of the GeoTiff. Only a portion of the image displayed.
Incidentally, the GeoTiff
does not span the IDL, it is close to the IDL (~150 to ~170).
I think I understand what is going on now.
Todd
Ed McNierney wrote:
>Todd -
>
>I don't see anything about GeoTIFFs in there <g>. You're asking about
>pj_inv, pj_fwd, and proj, and you'll just have better luck on the proj4
>list. I'd suggest posting to that list, and I'm replying to it, too.
>
>What is the central meridian of your Mercator projection?
>
> - Ed
>
>Ed McNierney
>President and Chief Mapmaker
>TopoZone.com / Maps a la carte, Inc.
>73 Princeton Street, Suite 305
>North Chelmsford, MA 01863
>ed at topozone.com
>(978) 251-4242
>
>-----Original Message-----
>From: gdal-dev-bounces at lists.maptools.org
>[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Todd Jellett
>Sent: Thursday, October 20, 2005 12:29 PM
>To: gdal-dev at lists.maptools.org
>Subject: [Gdal-dev] Problem creating GeoTiff across International Date
>Line
>
>Hi all,
>
>I have a question which is related to geotiff images, the international
>date line and proj4.
>It may ultimately belong on the proj4 list but since it relates to
>GeoTiff I'm posting here.
>
>Is it the intention that pj_inv can be used to convert a projected coord
>(say mercator) to lat/long then use pj_fwd to convert back to mercator
>units and get the same x, y mercator value?
>
>With the current implemetation of proj4 "adjlon" being used in pj_inv.c
>to make sure that the returned longitude is always within the range of
>+/- 180 degrees. While this is fine most of the time, it causes problems
>when working around the international date line.
>
>eg. I have a mercator coordinate for an image corner. note: the image
>spans the date line.
>1) x,y = (23370182, 22807431)
>
>2) results from pj_inv
> Lat, Long = (86.81, -150.06)
>
>3) results from pj_fwd
> x,y = (-16705270, 22807431)
>
>The difference occurs because the orgininal longitude (before adjlon) of
>
>+209.04 was
>"corrected" to be within the range of -180. to +180 before being
>returned by pj_inv.
>The end result is an X coordinate which is 40 million meters east of
>where it originally was.
>Strictly speaking a longitude of -150.06 is the same location on the
>earth as +209.04 but when you project this point to x, y you do not get
>the same Y coordinate.
>
>Thanks
>Todd
>
>
>
>_______________________________________________
>Gdal-dev mailing list
>Gdal-dev at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/gdal-dev
>
>
More information about the Gdal-dev
mailing list