[gdal-dev] gdalwarp t_srs '+ortho +lat_0=90' projection problem
Heiko Schröter
schroete at iup.physik.uni-bremen.de
Mon Oct 12 10:39:17 EDT 2009
Am Montag 12 Oktober 2009 15:53:15 schrieben Sie:
Joaquim,
thanks very much for your reply.
Just found that using '-wo' can cure the thing (a bit).
The calculus goes soemthing like:
SOURCE_EXTRA=5.5*Pixel_X/degrees_span_of_map
(degrees_span = Your wanted map in deegres)
The 5.5 [degrees] are just an visual estimation of the gap width.
i.e. wmap_work.gif = 2408 Pixel in X Dir.
So: SOURCE_EXTRA = 5.5*2408/360=36.78
gdalwarp -s_srs 'epsg:4326' -t_srs '+proj=ortho +lon_0=0 +lat_0=90' -ts 500 500 -wo SOURCE_EXTRA=(35...40) IN.gif OUT.gif
When playing with this setting say from 35 to 40 you will notice that the gap closes in and vanishes when SOURCE_EXTRA > 37.
Unfortunatly the whole thing is a bit dependend on the lat_0 setting.
But for me it is a good starter to have a work around.
A clear bugfix would be prefered of course.
heiko
> Heiko,
>
> It could be worst. Try for instance
>
> gdalwarp -of GTiff -s_srs epsg:4326 -t_srs +proj=sinu wmap_work.gif
> wmap_out.tiff
>
> I think this is the same as in this 2 years old bug report
>
> http://trac.osgeo.org/gdal/ticket/2305
>
> Joaquim Luis
>
> > Hello gdal list,
> >
> > reprojecting raster images from epsg:4326 -> '+ortho +lat_0=90 lon_0=0' results in a not closed image, missing about 5-6°. (.i.e Pacman like)
> > Reproducable for '+lon_0=90,180 and 270'.
> >
> > Now shifting 'lon_0=6/-6' resolves the issue and the map is closed.
> > Reproducable for every 'lon_0=84/96...'
> > Editing and fine tuning the .wld file won't resolve the issue.
> > The problem is reproducable with any image.
> >
> > The wmap_work.gif image ca be downloaded here (185k):
> > http://iup.physik.uni-bremen.de/~schroete/wmap_work.gif
> >
> > I need to display the closed images with viewprot from 'lon_0=0/90/270'.
> > What am i missing or doing wrong ?
> >
> > Regards
> > Heiko
> >
> >
> >
> > Commands used:
> > $ gdalwarp --version
> > GDAL 1.6.0, released 2008/12/04
> >
> > $ gdalwarp -of GTiff -s_srs 'epsg:4326' -t_srs '+proj=ortho +lon_0=0 +lat_0=90' wmap_work.gif wmap_out.gif
> >
> > The wmap_work.wld file:
> > 0.1495016
> > 0
> > 0
> > -0.1495016
> > -180
> > 90
> >
> > $ gdalinfo wmap_work.gif | head -n 15
> > Driver: GIF/Graphics Interchange Format (.gif)
> > Files: wmap_work.gif
> > Size is 2408, 1208
> > Coordinate System is `'
> > Origin = (-180.074750800000004,90.074750800000004)
> > Pixel Size = (0.149501600000000,-0.149501600000000)
> > Corner Coordinates:
> > Upper Left (-180.0747508, 90.0747508)
> > Lower Left (-180.0747508, -90.5231820)
> > Upper Right ( 179.9251020, 90.0747508)
> > Lower Right ( 179.9251020, -90.5231820)
> > Center ( -0.0748244, -0.2242156)
> > Band 1 Block=2408x1 Type=Byte, ColorInterp=Palette
> > NoData Value=126
> > Metadata:
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> >
> >
>
--
-----------------------------------------------------------------------
!!! NEUE TELEPHONNUMMER !!!
!!! NEW PHONE NUMBER !!!
Dipl.-Ing. Heiko Schröter
Institute of Environmental Physics (IUP) phone: ++49-(0)421-218-62092
Institute of Remote Sensing (IFE) fax: ++49-(0)421-218-4555
University of Bremen (FB1)
P.O. Box 330440 email: schroete at iup.physik.uni-bremen.de
Otto-Hahn-Allee 1
28359 Bremen
Germany
-----------------------------------------------------------------------
More information about the gdal-dev
mailing list