Difference between revisions of "Tiled imagery layer"

From OSGeo
Jump to navigation Jump to search
(→‎Multi-Res Tiled Imagery: i hate wikitext)
Line 3: Line 3:
 
This is a page to create a mapfile to stick in front of Ka-Map's tile.php to cache tiles for a multi-resolution dataset to grab via wms the best resolution data possible for any particular area.  Please add in a layer for any imagery you feel is missing.
 
This is a page to create a mapfile to stick in front of Ka-Map's tile.php to cache tiles for a multi-resolution dataset to grab via wms the best resolution data possible for any particular area.  Please add in a layer for any imagery you feel is missing.
  
<nowiki>
+
MAP
MAP
+
  EXTENT -180 -90 180 90
  EXTENT -180 -90 180 90
+
  IMAGECOLOR 255 255 255
  IMAGECOLOR 255 255 255
+
  IMAGETYPE png
  IMAGETYPE png
+
  SIZE 500 250
  SIZE 500 250
+
  STATUS ON
  STATUS ON
+
  UNITS DD
  UNITS DD
+
  NAME "World Demo"
  NAME "World Demo"
+
 
+
  OUTPUTFORMAT
  OUTPUTFORMAT
+
    NAME png
    NAME png
+
    MIMETYPE image/png
    MIMETYPE image/png
+
    DRIVER GD/PNG
    DRIVER GD/PNG
+
    EXTENSION png
    EXTENSION png
+
    IMAGEMODE PC256
    IMAGEMODE PC256
+
    TRANSPARENT FALSE
    TRANSPARENT FALSE
+
  END
  END
+
 
+
  PROJECTION
  PROJECTION
+
    "init=epsg:4326"
    "init=epsg:4326"
+
  END
  END
+
  LEGEND
  LEGEND
+
      IMAGECOLOR 255 255 255
      IMAGECOLOR 255 255 255
+
    KEYSIZE 18 12
    KEYSIZE 18 12
+
    KEYSPACING 5 5
    KEYSPACING 5 5
+
    LABEL
    LABEL
+
      SIZE MEDIUM
      SIZE MEDIUM
+
      TYPE BITMAP
      TYPE BITMAP
+
      BUFFER 0
      BUFFER 0
+
      COLOR 0 0 89
      COLOR 0 0 89
+
      FORCE FALSE
      FORCE FALSE
+
      MINDISTANCE -1
      MINDISTANCE -1
+
      MINFEATURESIZE -1
      MINFEATURESIZE -1
+
      OFFSET 0 0
      OFFSET 0 0
+
      PARTIALS TRUE
      PARTIALS TRUE
+
    END
    END
+
    POSITION LL
    POSITION LL
+
    STATUS ON
    STATUS ON
+
  END
  END
+
 
+
  QUERYMAP
  QUERYMAP
+
      COLOR 255 0 0
      COLOR 255 0 0
+
    SIZE -1 -1
    SIZE -1 -1
+
    STATUS OFF
    STATUS OFF
+
    STYLE HILITE
    STYLE HILITE
+
  END
  END
+
 
+
  REFERENCE
  REFERENCE
+
    COLOR -1 -1 -1
    COLOR -1 -1 -1
+
    EXTENT -180 -90 180 90
    EXTENT -180 -90 180 90
+
    IMAGE "../htdocs/images/world_key.png"
    IMAGE "../htdocs/images/world_key.png"
+
    OUTLINECOLOR 255 0 0
    OUTLINECOLOR 255 0 0
+
    SIZE 240 120
    SIZE 240 120
+
    STATUS ON
    STATUS ON
+
      MARKER 0
      MARKER 0
+
      MARKERSIZE 0
      MARKERSIZE 0
+
      MINBOXSIZE 3
      MINBOXSIZE 3
+
      MAXBOXSIZE 0
      MAXBOXSIZE 0
+
  END
  END
+
 
+
  SCALEBAR
  SCALEBAR
+
      BACKGROUNDCOLOR 0 0 0
      BACKGROUNDCOLOR 0 0 0
+
      COLOR 255 255 255
      COLOR 255 255 255
+
    IMAGECOLOR 255 255 255
    IMAGECOLOR 255 255 255
+
    INTERVALS 5
    INTERVALS 5
+
    LABEL
    LABEL
+
      SIZE SMALL
      SIZE SMALL
+
      TYPE BITMAP
      TYPE BITMAP
+
      BUFFER 0
      BUFFER 0
+
      COLOR 0 0 0
      COLOR 0 0 0
+
      FORCE FALSE
      FORCE FALSE
+
      MINDISTANCE -1
      MINDISTANCE -1
+
      MINFEATURESIZE -1
      MINFEATURESIZE -1
+
      OFFSET 0 0
      OFFSET 0 0
+
      PARTIALS TRUE
      PARTIALS TRUE
+
      POSITION CR
      POSITION CR
+
    END
    END
+
      OUTLINECOLOR 0 0 0
      OUTLINECOLOR 0 0 0
+
    POSITION LL
    POSITION LL
+
    SIZE 250 3
    SIZE 250 3
+
    STATUS ON
    STATUS ON
+
    STYLE 0
    STYLE 0
+
    TRANSPARENT TRUE
    TRANSPARENT TRUE
+
    UNITS KILOMETERS
    UNITS KILOMETERS
+
  END
  END
+
 
+
  WEB
  WEB
+
    IMAGEPATH "/tmp/"
    IMAGEPATH "/tmp/"
+
    IMAGEURL "/tmp/"
    IMAGEURL "/tmp/"
+
      METADATA
      METADATA
+
        "original_projection" "init=epsg:4326"
        "original_projection" "init=epsg:4326"
+
        "original_extents"  "-180,-90,180,90"
        "original_extents"  "-180,-90,180,90"
+
      END
      END
+
    QUERYFORMAT text/html
    QUERYFORMAT text/html
+
  END
  END
+
 
+
  LAYER
  LAYER
+
    CONNECTION "http://sigma.openplans.org:3128/geoserver/wms?styles=&"
    CONNECTION "http://sigma.openplans.org:3128/geoserver/wms?styles=&"
+
    CONNECTIONTYPE WMS
    CONNECTIONTYPE WMS
+
      METADATA
      METADATA
+
        "wms_srs" "EPSG:4326"
        "wms_srs" "EPSG:4326"
+
        "wms_onlineresource"  "http://sigma.openplans.org:3128/geoserver/wms?"
        "wms_onlineresource"  "http://sigma.openplans.org:3128/geoserver/wms?"
+
        "wms_name"  "topp:major_roads,topp:roads,topp:poly_landmarks,topp:states,topp:water_shorelines"
        "wms_name"  "topp:major_roads,topp:roads,topp:poly_landmarks,topp:states,topp:water_shorelines"
+
        "wms_formatlist"  "image/png,image/gif,image/jpeg,image/wbmp"
        "wms_formatlist"  "image/png,image/gif,image/jpeg,image/wbmp"
+
        "wms_format"  "image/png"
        "wms_format"  "image/png"
+
        "wms_server_version"  "1.1.0"
        "wms_server_version"  "1.1.0"
+
        "wms_title" "TIGER"
        "wms_title" "TIGER"
+
      END
      END
+
    NAME "TIGER"
    NAME "TIGER"
+
    SIZEUNITS PIXELS
    SIZEUNITS PIXELS
+
    STATUS ON
    STATUS ON
+
    TOLERANCE 0
    TOLERANCE 0
+
    TOLERANCEUNITS PIXELS
    TOLERANCEUNITS PIXELS
+
    TYPE RASTER  
    TYPE RASTER  
+
    UNITS METERS
    UNITS METERS
+
  END
  END
+
 
+
END
END
 
 
 
 
 
</nowiki>
 

Revision as of 08:20, 29 June 2006

Multi-Res Tiled Imagery

This is a page to create a mapfile to stick in front of Ka-Map's tile.php to cache tiles for a multi-resolution dataset to grab via wms the best resolution data possible for any particular area. Please add in a layer for any imagery you feel is missing.

MAP
  EXTENT -180 -90 180 90
  IMAGECOLOR 255 255 255
  IMAGETYPE png
  SIZE 500 250
  STATUS ON
  UNITS DD
  NAME "World Demo"

  OUTPUTFORMAT
    NAME png
    MIMETYPE image/png
    DRIVER GD/PNG
    EXTENSION png
    IMAGEMODE PC256
    TRANSPARENT FALSE
  END

  PROJECTION
    "init=epsg:4326"
  END
  LEGEND
      IMAGECOLOR 255 255 255
    KEYSIZE 18 12
    KEYSPACING 5 5
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 89
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
    END
    POSITION LL
    STATUS ON
  END

  QUERYMAP
      COLOR 255 0 0
    SIZE -1 -1
    STATUS OFF
    STYLE HILITE
  END

  REFERENCE
    COLOR -1 -1 -1
    EXTENT -180 -90 180 90
    IMAGE "../htdocs/images/world_key.png"
    OUTLINECOLOR 255 0 0
    SIZE 240 120
    STATUS ON
      MARKER 0
      MARKERSIZE 0
      MINBOXSIZE 3
      MAXBOXSIZE 0
  END

  SCALEBAR
      BACKGROUNDCOLOR 0 0 0
      COLOR 255 255 255
    IMAGECOLOR 255 255 255
    INTERVALS 5
    LABEL
      SIZE SMALL
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
      POSITION CR
    END
      OUTLINECOLOR 0 0 0
    POSITION LL
    SIZE 250 3
    STATUS ON
    STYLE 0
    TRANSPARENT TRUE
    UNITS KILOMETERS
  END

  WEB
    IMAGEPATH "/tmp/"
    IMAGEURL "/tmp/"
      METADATA
        "original_projection" "init=epsg:4326"
        "original_extents"  "-180,-90,180,90"
      END
    QUERYFORMAT text/html
  END

  LAYER
    CONNECTION "http://sigma.openplans.org:3128/geoserver/wms?styles=&"
    CONNECTIONTYPE WMS
      METADATA
        "wms_srs" "EPSG:4326"
        "wms_onlineresource"  "http://sigma.openplans.org:3128/geoserver/wms?"
        "wms_name"  "topp:major_roads,topp:roads,topp:poly_landmarks,topp:states,topp:water_shorelines"
        "wms_formatlist"  "image/png,image/gif,image/jpeg,image/wbmp"
        "wms_format"  "image/png"
        "wms_server_version"  "1.1.0"
        "wms_title" "TIGER"
      END
    NAME "TIGER"
    SIZEUNITS PIXELS
    STATUS ON
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    TYPE RASTER 
    UNITS METERS
  END

END