gdalindex question

Dylan Beaudette dylan at IICI.NO-IP.ORG
Tue Oct 5 14:42:13 EDT 2004


On Monday 04 October 2004 01:56 pm, David Fawcett wrote:
> I was wondering if you had a SHAPEPATH in the MAP object.  Does your app
> know where to look for the images listed in your tileindex?
>
> David.
>
> David J. Fawcett
> MN Office of Environmental Assistance
>

That was it! My SHAPEPATH directive was pointing to the base of all my other
data, which of course did not point to my image files.

I am not sure if this is correct, but my map file now contains a SHAPEPATH
directive pointing to the folder that contains the raster images referenced
by the tile index, and all of my other data is referenced via absolute paths.

Thanks for all the help!

Dylan


> >>> Dylan Keon <keon at NACSE.ORG> 10/4/2004 3:50:32 PM >>>
>
> Hi Dylan :-)
>
> After upgrading to 4.2.x or so, I found I had to use absolute paths
> for
> tileindexes.  That is, SHAPEPATH wouldn't work with my TILEINDEX
> declaration.  So, try:
>
>    TILEINDEX "/full/path/to/imagery/doqq/tiled/doqq_index.shp"
>
> and see if that makes a difference.  Also, are you sure it's TILEITEM
> "Location" instead of "location"?  It may be case sensitive, I can't
> remember.
>
> --Dylan
>
> On 10/04/2004 01:45 PM, Dylan Beaudette wrote:
> > Ed-
> >
> > Thanks for  the quick reply!
> >
> > The mapserver output looks a litte funny because I am displaying the
>
> tile
>
> > index as a polygon layer, so that I know that it actually exists, and
>
> is
>
> > projected corectly. The labels do look like strange file names, but
>
> they are
>
> > indeed correct...
> >
> > when i attempt to access the rasters individually:
> > DATA "imagery/doqq/tiled/o38122f1nw.tif.temp.tiff"
> >
> > ...it works fine:
> > http://169.237.35.250/~dylan/temp/tile_index_with_1_raster.jpg
> >
> > ...but the rasters are not loaded via the TILEINDEX method.
> >
> > here is the updated layer definition (thanks for the OFFSITE idea!!)
> > ----------------snip------------------
> > LAYER
> >  NAME "DOQQ_index"
> >  TYPE RASTER
> >  TILEINDEX "imagery/doqq/tiled/doqq_index.shp"
> >  TILEITEM "Location"
> >
> >  #DATA "imagery/doqq/tiled/o38122f1nw.tif.temp.tiff"
> >  STATUS DEFAULT
> >
> >  #ignore black pixels (treat as transparent)
> >  OFFSITE 0 0 0
> >
> >
> >  #render the rest of the pixel values!
> >  CLASS
> >   NAME "DOQQ"
> >  END
> > END
> >
> > ----------------snip------------------
> >
> > ...still no success with the rasters this way...
> >
> > any ideas?
> >
> > thanks again!
> >
> > Dylan
> >
> > On Monday 04 October 2004 11:37 am, Ed McNierney wrote:
> >>Dylan -
> >>
> >>Thanks for asking a well-documented question!
> >>
> >>Your MapServer output looks like you're using the tile index layer as
>
> a
>
> >>POLYGON layer, and doesn't seem to match up with the map file
>
> fragment you
>
> >>post (i.e. there's no TYPE POLYGON layer with labels there).  The
>
> filenames
>
> >>that are appearing as labels look a little funny - are you sure those
>
> are
>
> >>the correct filenames?
> >>
> >>Also, you're causing all black pixels to be displayed as white, which
>
> won't
>
> >>"remove" them.  You may want to use the OFFSITE statement to cause
>
> black
>
> >>pixels to be transparent, letting overlapped data show through.
> >>
> >>      - Ed
> >>
> >>Ed McNierney
> >>President and Chief Mapmaker
> >>TopoZone.com
> >>
> >>At 02:18 PM 10/4/2004, Dylan Beaudette wrote:
> >>>Greetings!
> >>>
> >>>I have a pile of DOQQ images  that i would like to use with my map,
>
> and
>
> >>>wanted to use gdalindex to setup an efficient way for these images
>
> to be
>
> >>>loaded.
> >>>
> >>>note that everything is in the same projection.
> >>>
> >>>after running:
> >>>gdaltindex doqq_index.shp *.tiff
> >>>
> >>>i am left with a shapfile with entries for all of the images....
>
> seems ok.
>
> >>>...looking at the output in QGIS:
> >>>http://169.237.35.250/~dylan/temp/gdalindex_problems.jpg
> >>>...all seems fine (except for a few mssing images)
> >>>
> >>>however mapserver is not rendering the tiff files based on the
>
> index:
> >>>http://169.237.35.250/~dylan/temp/tile_index.png
> >>>
> >>>here is my layer defs in my map file:
> >>>----------------------------snip----------------------------
> >>>LAYER
> >>> NAME "DOQQ_index"
> >>> TYPE RASTER
> >>> TILEINDEX "imagery/doqq/tiled/doqq_index.shp"
> >>> TILEITEM "Location"
> >>>
> >>> #DATA "imagery/doqq/tiled/o38122f1nw.tif.temp.tiff"
> >>> STATUS DEFAULT
> >>>
> >>> #remove the black (no_data) pixels!
> >>> CLASSITEM "[pixel]"
> >>> CLASS
> >>>  EXPRESSION ([pixel] == 0 )
> >>>  COLOR 255 255 255
> >>> END
> >>>
> >>> #render the rest of the pixel values!
> >>> CLASS
> >>>  NAME "DOQQ"
> >>> END
> >>>END
> >>>----------------------------snip----------------------------
> >>>
> >>>
> >>>any ideas>?
> >>>
> >>>thanks in advance!!
> >>>
> >>>Dylan Beaudette
> >>>Soil Science Grad Group
> >>>University of California at Davis
>
> --
> **************************************************************
>   Dylan Keon - GIS Coordinator
>   Northwest Alliance for Computational Science and Engineering
>   Oregon State University
>   Corvallis, OR 97331
>   keon at nacse.org     voice: 541-737-6608     fax: 541-737-6609
>   http://gis.nacse.org
> **************************************************************



More information about the mapserver-users mailing list