extent is invalid for geotiff

Ed McNierney ed at TOPOZONE.COM
Thu Feb 10 18:49:32 EST 2005


John -

OK - it sounds like you made a good diagnosis.  If the PNG image looks
the same in a viewer application as it does in the HTML template output
from MapServer, then you don't have template problems.

And you've also demonstrated that you can clearly and accurately follow
instructions.  This is an excellent skill.  You would, therefore, do
well to acquire instructions that are correct <g>!

I made a typo in the EXTENT line I gave you, and you faithfully
duplicated that typo in your map file.  That's the problem - your X
extent in the map file is much larger than your image's real extents.

The MAXX value (the third number) from your listgeo output is
-9325729.471, but I typed it as -932579.471, omitting the "2" that
should be in the tens place.  This made the maximum X value a much
larger number than it should be, and MapServer is correctly generating a
map of those (large) extents, with your GeoTIFF occupying a little bitty
patch on the left.

GIGO, as they used to say....

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
(978) 251-4242


-----Original Message-----
From: John Bonk [mailto:bonk at eosdata.gsfc.nasa.gov] 
Sent: Thursday, February 10, 2005 5:31 PM
To: "Ed McNierney" <ed at topozone.com>
Subject: RE: [UMN_MAPSERVER-USERS] extent is invalid for geotiff

Ed,

Once again, thank you very much for your reply.  Please see below for 
answers to you questions embedded  in your reply,

John

At 16:44 2005-02-10 -0500, Ed McNierney wrote:
>John -
>
>You may have two separate problems, one of which may be a non-problem.
>
>1. If the image is "smaller than [you] would expect, and offset
>vertically", could that simply be because the EXTENT is slightly larger
>than the geographic extent of the image, and offset vertically?  Try
>adjusting the numbers in the EXTENT line.  If you view the TIFF image
in
>an image viewer, does the imagery fill the frame, or is there blank
>space around it?

When viewed in an image viewer, the geotiff image fills the entire
frame.

>2. In your HTML template, you have somewhere an <IMG> tag to display
the
>map, which looks something like <IMG SRC=[img]....>.  Is there a HEIGHT
>and WIDTH field in that tag?  Are they 300 and 400, respectively?  If
>those values don't match the SIZE in your map file, you're asking to
>display the image at a different size than it was produced, which will
>give odd results.

The dimensions in the img tag in the HTML doc match the SIZE in the map
file.
BTW, the only reason I mention the png image, is that I can send it to a

viewer
where I can obviously see that the geotiff is left justified and
displaced 
downward.
It looks the same way in my browser when serving the map in map mode but
its
not as obvious without the frame. BTW, the geotiff part of the png is a
bad 
fit, it
covers only about 10% of the area of the png.  If the png were a
tictactoe 
board,
the geotiff does not quite cover the rectangle in the first column
second row.

We tried playing around with the extent with mixed success.  Well try
again and
let you know.

>         - 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: John Bonk [mailto:bonk at eosdata.gsfc.nasa.gov]
>Sent: Thursday, February 10, 2005 3:55 PM
>To: Ed McNierney; John Bonk; MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: RE: [UMN_MAPSERVER-USERS] extent is invalid for geotiff
>
>Ed,
>
>Thank you again for responding to my question.
>
>I'm still having problems understanding extent.
>
>When I serve up my geotiff with your extent using
>
>MAP
>    IMAGETYPE PNG
>    EXTENT -13053641.3 3358256.867 -932579.471 5752577.812
>
>    SIZE 400 300
>    SHAPEPATH "data"
>
>    LAYER # MODIS raster layer begins here
>      NAME modis
>      DATA RGB_mosaic_250m.tif
>      STATUS DEFAULT
>      TYPE RASTER
>    END # MODIS raster layer ends here
>
>END # end of map file
>
>I end up with an image that is smaller than I would expect, and offset
>vertically.
>
>If I add an html template to the above and serve the geotiff in the
>browse mode, the image in the geotiff occupies a very small area in the
>png that is produced.  The geotiff image is left justified and centered
>vertically in the png.
>
>Can anyone explain why this is?  How can I get the geotiff image to
fill
>the entire png?
>
>John
>
>
>
>At 09:41 2005-02-08 -0500, Ed McNierney wrote:
> >John -
> >
> >No, there isn't any preferred method.  A GeoTIFF will hold
projection,
> >datum, and bounding box information in a way that can be read by
> >MapServer.  As long as the GeoTIFF is created properly (i.e. you
can't
> >leave out the projection) the coordinate formats used don't matter.
> >
> >         - 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: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> >On Behalf Of John Bonk
> >Sent: Monday, February 07, 2005 11:39 AM
> >To: MAPSERVER-USERS at LISTS.UMN.EDU
> >Subject: Re: [UMN_MAPSERVER-USERS] extent is invalid for geotiff
> >
> >Ed,
> >
> >Thank you, that worked.  I seems obvious now when I look back at the
> >documentation.
> >
> >Perhaps someone can answer another question.  In creating geotiffs,
is
> >there a preferred way of specify coordinates (degrees, UTM, etc)  so
> >that the image will work well with MapServer?
> >
> >Thanks again for the response,
> >John
> >At 23:10 2005-02-04 -0500, Ed McNierney wrote:
> > >John -
> > >
> > >If that's the only data layer in your map, ignore PROJECTION
> > >completely, at least for now.
> > >
> > >Have you tried an EXTENT of:
> > >
> > >EXTENT -13053641.3 3358256.867 -932579.471 5752577.812
> > >
> > >         - Ed
> > >
> > >Ed McNierney
> > >TopoZone.com
> > >
> > >-----Original Message-----
> > >From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> > >On Behalf Of John Bonk
> > >Sent: Friday, February 04, 2005 5:08 PM
> > >To: MAPSERVER-USERS at LISTS.UMN.EDU
> > >Subject: [UMN_MAPSERVER-USERS] extent is invalid for geotiff
> > >
> > >I am very new at this.  I am having problems serving a geotiff
image
> > >with the following attributes:
> > >
> > >Projection Method: CT_Equirectangular
> > >     ProjCenterLatGeoKey: 0.000000 (  0d 0' 0.00"N)
> > >     ProjCenterLongGeoKey: 0.000000 (  0d 0' 0.00"E)
> > >     ProjFalseEastingGeoKey: 0.000000 m
> > >     ProjFalseNorthingGeoKey: 0.000000 m
> > >
> > >Corner Coordinates:
> > >Upper Left    (-13053641.300,5752577.812)
> > >Lower Left    (-13053641.300,3358256.867)
> > >Upper Right   (-9325729.471,5752577.812)
> > >Lower Right   (-9325729.471,3358256.867)
> > >Center        (-11189685.386,4555417.340)
> > >
> > >I have tried all sorts of variation of these number in the EXTENT
> > >field
> >
> > >but  I have been getting an 'extent is invalid' message.
> > >
> > >Can anyone help me express the EXTENT and PROJECTION to read this
>file?
> > >
> > >John
> > >=======================================
> > >
>
>=======================================

=======================================
John Bonk
SSAI/NASA GES DISC
Phone:(301) 614-5280
Fax:  (301) 614-5268
For more information about
the NASA GES DISC and its services:
http://daac.gsfc.nasa.gov/ 



More information about the mapserver-users mailing list