[Mapserver-users] Adding a GIF layer to my .map file

Pericles S. Nacionales nacional at cbs.umn.edu
Thu Aug 14 16:28:56 EDT 2003


Mario,

Frank is right but if you're still not getting the GIF image, try
changing the .gfw extension to .wld.  (I don't think this is no longer
required with the newer versions of MapServer but it never hurts to try)

-Perry N.


On Thu, 2003-08-14 at 14:43, Mario Servin wrote:
> Hi all,
>     Still I am fooling around with this....
> This is my .map fiel can anybody tell me what is wrong this file ? The GIF
> image is not shown.
> #
> # Start of map file
> #
> NAME DEMO
> STATUS ON
> SIZE 600 600
> EXTENT -71.89965056 -41.36073059 -71.08687515 -40.99260904
> UNITS DD
> SHAPEPATH "Bariloche"
> IMAGECOLOR 255 255 255
> 
> # you may need to change this to match your MapServer build
> IMAGETYPE PNG
> 
> #
> # Start of web interface definition (including WMS enabling metadata)
> #
> WEB
>   HEADER demo_header.html
>   TEMPLATE demo.html
>   FOOTER demo_footer.html
>   MINSCALE 1000
>   MAXSCALE 1550000
>   IMAGEPATH "set in demo_init.html"
>   IMAGEURL "set in demo_init.html"
>   METADATA
>     WMS_TITLE "UMN MapServer Itasca Demo"
>     WMS_ABSTRACT "This is the UMN MapServer demonstration application for
> Itasca County located in north central Minnesota."
>     WMS_ACCESSCONSTRAINTS none
> 
>     # change this value to match your setup
>     WMS_ONLINERESOURCE "http://mariolaptop/MyPages/itasca/demo_init.html"
> 
>     WMS_SRS "EPSG:26915"
>   END
> END
> 
> #
> # Start of legend
> #
> LEGEND
>   KEYSIZE 18 12
>   LABEL
>     TYPE BITMAP
>     SIZE MEDIUM
>     COLOR 0 0 89
>   END
>   STATUS ON
> END
> 
> #
> # Start of scalebar
> #
> SCALEBAR
>   IMAGECOLOR 0 0 0
>   LABEL
>     COLOR 255 255 255
>     SIZE MEDIUM
>   END
>   STYLE 1
>   SIZE 300 10
>   COLOR 255 255 255
>   UNITS KILOMETERS
>   INTERVALS 5
>   TRANSPARENT TRUE
>   STATUS TRUE
> END
> 
> #
> # Start of symbol definitions (we're only using a few)
> #
> SYMBOL
>   NAME 'circle'
>   TYPE ELLIPSE
>   POINTS 1 1 END
>   FILLED TRUE
> END
> 
> #
> # Start of layer definitions
> #
> 
> LAYER
>   NAME LagoRutas
>   TYPE POLYGON
>   STATUS DEFAULT
>   DATA LagoRutas
>   CLASS
>     NAME 'Lago y Rutas'
>     COLOR 100 150 255
>   END
> END # lago
> 
> LAYER
>   NAME calles
>   TYPE LINE
>   STATUS DEFAULT
>   DATA calles
> #  CLASS
> #    NAME 'Calles'
> #    COLOR 0 0 0
>  # END
>   CLASSITEM "NAME"
>   LABELITEM "NAME"
>   CLASS
>    NAME 'Calles'
>    COLOR 0 0 0
>       LABEL
>        COLOR 0 0 0
>        TYPE BITMAP
>        SIZE MEDIUM
>        ANTIALIAS TRUE
>        POSITION CC
>        PARTIALS FALSE
>        MINDISTANCE 300
>        BUFFER 4
>      END # end of label
> 
>   END
> END # calles
> 
> LAYER # MODIS raster layer begins here
>     TYPE RASTER
>     STATUS ON
>     NAME "modis"
>     DATA "ImgRow4xCol4.gif"
> END # MODIS raster layer ends here
> 
> 
> END # Map File
> 
> Additionally the ImgRow4xCol4.gfw file is as follows:
> 0.000313
> 0
> 0
> 0.000313
> -71.488229
> -40.989377
> 
>     Where pixel dimensions where measured in GG.GGGGGG
>     Regards,
>                 Mario
> ----- Original Message ----- 
> From: "Pericles S. Nacionales" <nacional at cbs.umn.edu>
> To: "Mario Servin" <mservin at tecnoaccion.com.ar>
> Cc: <mapserver-users at lists.gis.umn.edu>
> Sent: Tuesday, August 12, 2003 2:15 PM
> Subject: Re: [Mapserver-users] Adding a GIF layer to my .map file
> 
> 
> > You are way ahead of me.  The version 4 tutorial isn't available for
> > public consumption yet.  It isn't complete (but thanks for pointing out
> > a raster projection issue that I have almost forgotten).  Please don't
> > use the tutorial just yet as I don't want to waste time answering
> > questions instead of finishing the tutorial.
> >
> > The definitive how-to for raster layers is available in the
> > documentation section of the mapserver site:
> > http://mapserver.gis.umn.edu/doc40/raster-howto.html
> >
> > I also recommend browsing through the how-tos for more in depth
> > explanations of concepts in MapServer.  The tutorial will point you to
> > these references when it becomes available.
> >
> > -Perry N.
> >
> > On Tue, 2003-08-12 at 09:17, Mario Servin wrote:
> > > Hi,
> > >     I followed the MapServer 4.0 Tutorial  for puting a layer with a GIF
> > > (RASTER type) in my .map file.  Well, nothing happened. The image is not
> > > shown. Ok, I did not realize that MapServer has no information about
> > > georeference of the GIF file, but nothing was mentioned about it in the
> > > Tutorial. Could it be the reason that the image is not shown?. Anyway,
> how
> > > can I georeference my GIF file?
> > >     Regards,
> > >                 Mario
> > >
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> > -- 
> > Pericles S. Nacionales <nacional at cbs.umn.edu>
> > University of Minnesota
> >
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
-- 
Pericles S. Nacionales <nacional at cbs.umn.edu>
University of Minnesota



More information about the mapserver-users mailing list