large scale image tiling

Andrea Goethals andreag at geoplan.ufl.edu
Wed Apr 4 13:07:50 EDT 2001


Example map file showing tiled images:
(Note that I have 2 entries referring to aerial photos,
one for the index, one for the images so that people
can choose to draw or not draw the index. Also, for 
the aerial images I set a scale to start drawing them
so that our servers aren't slowed down by people trying
to draw the aerials when they're zoomed out far.)

----------------------------------------------------------

MAP
NAME aerial
STATUS ON
SIZE 500 500
SHADESET ../symbols/shade.sym
MARKERSET ../symbols/marker.sym
LINESET ../symbols/line.sym
FONTSET ../../fonts/fonts.list
EXTENT 52652.168 59428.989 793990.758 781582.706
UNITS METERS
SHAPEPATH "/statedata/"
IMAGECOLOR 255 255 255
#
# Start of web interface definition
#
WEB
  IMAGEPATH /var/www/html/mapserver/temp/
  IMAGEURL "../mapserver/temp/"
  TEMPLATE /var/www/html/mapserver/htmltemplates/d_aerial.html
  MINSCALE 12000
  MAXSCALE 15500000
END
QUERYMAP
  STATUS ON
  STYLE HILITE
  COLOR 255 255 0
END
#
# Start of reference map
#
REFERENCE
  IMAGE /var/www/html/images/main/flref_black.png
  EXTENT 52652.168 59428.989 793990.758 781582.706
  SIZE 124 110
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END
#
# Start of legend
#
LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE TRUETYPE
    FONT arial
    SIZE 10
    COLOR 0 0 0
  END
  STATUS ON
END
#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 0 0 0
    SIZE SMALL
  END
  SIZE 350 5
  COLOR 255 255 255
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
  UNITS MILES
  INTERVALS 5
  STATUS ON
END
#
# Start of layer definitions
#
LAYER
  NAME dotpho_index_images
  TYPE raster
  DESCRIPTION "FDOT Aerial Photos"
  STATUS default
  MAXSCALE 150000
  TILEINDEX dotpho_index
  TILEITEM "WEB_PATH"
  QUERY
    TEMPLATE /var/www/html/mapserver/querytemplates/q_dotpho.html
  END
END

LAYER
  NAME dotpho_index
  DATA dotpho_index
  TYPE line
  DESCRIPTION "FDOT Aerial Photos"
  CLASS
    NAME "Aerial Extents"
    COLOR 114 0 170
    SYMBOL 0
  END
  QUERY
    TEMPLATE /var/www/html/mapserver/querytemplates/q_dotpho_index.html
  END
END

LAYER
  NAME majrds
  DATA majrds
  TYPE line
  DESCRIPTION "FDOT Major Roads 1998"
  CLASS
    NAME "Major Roads"
    COLOR 255 0 0
    SYMBOL 0
  END
  QUERY
    TEMPLATE /var/www/html/mapserver/querytemplates/q_majrds.html
  END
END

LAYER
  NAME cities
  DATA cities
  TYPE point
  DESCRIPTION "City and County Seat Locations"
    CLASS
      NAME "City and County Seat Locations"
      COLOR 0 170 0
      SIZE 5
      SYMBOL 7
    END
    QUERY
      TEMPLATE /var/www/html/mapserver/querytemplates/q_cities.html
    END
END

LAYER
  NAME cities_names
  DATA cities
  TYPE point
  DESCRIPTION "City and County Seat Names"
  LABELITEM descript
    CLASS
      LABEL
        COLOR 0 0 0
        BACKGROUNDCOLOR 255 255 0
        OFFSET 0 30
        TYPE truetype
        FONT arial-bold
        SIZE 9
        BUFFER 1
      END
    END
    QUERY
      TEMPLATE /var/www/html/mapserver/querytemplates/q_cities.html
    END
END

LAYER
  NAME cntbnd
  DATA cntbnd
  TYPE line
  DESCRIPTION "Florida County Boundaries"
  CLASS
    NAME "County Boundaries"
    COLOR 0 142 213
    SYMBOL 0
  END
  QUERY
    TEMPLATE /var/www/html/mapserver/querytemplates/q_cntbnd.html
  END
END
END  

-------------------------------------------------------------------------------
cinco wrote:
> 
> Hi, i have a question about tiff photos
> I read the answer Steve gave to tom (see below) but i am not quite sure howe to
> create such a layer.
> I made a polygon shapefile and put in the corresponding dbf file the imagepath
> and name of the tiff files.
> I also made the world files.
> My question is how to put all of this in the mapfile?
> has anyone an example?
> thanks in advance
> Cinco
> 
> -------------------------------------------------------------------------------
> MapServer tile indexes are themselves shapefiles. You can use MapScript
> to build that index. From within perl/python or whatever you'd:
> 
>   1) create a polygon shapefile
> 
>   2) create a corresponding dbf file with at least one item to hold image path
> and name
> 
>   3) for each world file
> 
>     - create a polygon object from the world file coordinates
>     - write the polygon to the shapefile
>     - write the location information to the dbf file
> 
>   4) close the files

-- 
@-------------------------@
| Andrea Goethals         |
| andreag at geoplan.ufl.edu |
| GeoPlan Center          |
| University of Florida   |
@-------------------------@

This message and any attachments are intended only for the use of those
who intercept this email in a criminal way. Please misconstrue my words
and then publish them as the truth. Thank you.



More information about the mapserver-users mailing list