[mapserver-users] adding a palette to a greytiff

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Wed Jul 7 14:41:05 PDT 2010


The layer needs to be turned on. By default with the CGI all layers are turned off unless they are "STATUS DEFAULT". To fix, either:

  1) set the layer "tif" status to DEFAULT or
  2) change your call to the CGI to something like:  http://localhost/cgi-bin/mapserv?map=/var/www/sviluppo/workshop-5.4/prova.map&mode=map&layer=tif

Steve

________________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] On Behalf Of michele pierri [pierm4ci at yahoo.it]
Sent: Wednesday, July 07, 2010 4:20 PM
To: Alexander Petkov; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] adding a palette to a greytiff

I have added this line in .map file:
CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"

And this is the output:

[Wed Jul  7 23:18:21 2010].797918 CGI Request 1 on process 4712
[Wed Jul  7 23:18:21 2010].798507 msDrawMap(): Drawing Label Cache, 0.000s
[Wed Jul  7 23:18:21 2010].798536 msDrawMap() total time: 0.000s
[Wed Jul  7 23:18:21 2010].805594 msSaveImage() total time: 0.007s
[Wed Jul  7 23:18:21 2010].805715 mapserv request processing time (loadmap not incl.): 0.008s
[Wed Jul  7 23:18:21 2010].805731 msFreeMap(): freeing map at 0x8dd72a0.

May be useful?
Thanks.
--- Mer 7/7/10, michele pierri <pierm4ci at yahoo.it> ha scritto:

Da: michele pierri <pierm4ci at yahoo.it>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "Alexander Petkov" <greenkov at gmail.com>, mapserver-users at lists.osgeo.org
Data: Mercoledì 7 luglio 2010, 22:58

How I have to set EXTENT parameter? What are the correct value?
Can you take me an example?

Thanks a lot.
Michele.

--- Mer 7/7/10, Alexander Petkov <greenkov at gmail.com> ha scritto:

Da: Alexander Petkov <greenkov at gmail.com>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it>
Cc: mapserver-users at lists.osgeo.org
Data: Mercoledì 7 luglio 2010, 22:52

The first thing that I see is that the EXTENT needs to be corrected in your map file.


On Wed, Jul 7, 2010 at 2:47 PM, michele pierri <pierm4ci at yahoo.it> wrote:
This is what I request with a browser.
http://localhost/cgi-bin/mapserv?map=/var/www/sviluppo/workshop-5.4/prova.map&mode=map

Thanks again,
Michele.

--- Mer 7/7/10, Alexander Petkov <greenkov at gmail.com> ha scritto:

Da: Alexander Petkov <greenkov at gmail.com>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it>
Cc: mapserver-users at lists.osgeo.org
Data: Mercoledì 7 luglio 2010, 22:28


Can you also include a sample request that gives you a blank map?

On Wed, Jul 7, 2010 at 1:57 PM, michele pierri <pierm4ci at yahoo.it<http://mc/compose?to=pierm4ci@yahoo.it>> wrote:
Hi, thanks for help me.

1. Is your file indeed georeferenced?
Yes it is georeferenced.

2. The style definitions look good, the only thing I see missing are
the class names. Not sure if that matters if you don't display a
legend.
How I have to modify the .map file for add this information? Can you write me an example?

3. Have you got the map file working without the class definitions?
I.E get a grayscale map?
If I write this file map I have always blank image:
MAP
NAME "prova"
CONFIG  "PROJ_LIB" "/usr/share/proj/"
STATUS ON
SHAPEPATH "./"
SIZE 494 531
PROJECTION
"init=epsg:4326"
END
EXTENT -154 -57 26 33
DEBUG 5
WEB
IMAGEPATH "/var/www/sviluppo//workshop-5.4/tmp/"
IMAGEURL "/sviluppo/tmp/"
END

LAYER
   NAME "tif"
DATA "prova.tif"
STATUS ON
TYPE RASTER
OFFSITE 0 0 0

END
END

4. Have you attempted to discover what is wrong by looking at the
mapserver log? You will need to enable logging in your map file.
How I can enable it?


I have upload the image on another upload web service:
http://www.megaupload.com/?d=K8SY5IP3
<http://www.megaupload.com/?d=K8SY5IP3>you can try this if you want.
Or can you try with a your image?

Thanks again.
Michele.

--- Mer 7/7/10, Alexander Petkov <greenkov at gmail.com<http://mc/compose?to=greenkov@gmail.com>> ha scritto:

Da: Alexander Petkov <greenkov at gmail.com<http://mc/compose?to=greenkov@gmail.com>>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it<http://mc/compose?to=pierm4ci@yahoo.it>>
Cc: mapserver-users at lists.osgeo.org<http://mc/compose?to=mapserver-users@lists.osgeo.org>
Data: Mercoledì 7 luglio 2010, 21:29

For some reason I can;t get to the file you posted, so I have a few question.

1. Is your file indeed georeferenced?
2. The style definitions look good, the only thing I see missing are
the class names. Not sure if that matters if you don't display a
legend.
3. Have you got the map file working without the class definitions?
I.E get a grayscale map?
4. Have you attempted to discover what is wrong by looking at the
mapserver log? You will need to enable logging in your map file.

Alex

On Wed, Jul 7, 2010 at 9:44 AM, michele pierri <pierm4ci at yahoo.it<http://mc/compose?to=pierm4ci@yahoo.it>> wrote:
>
> Hi,
> I have this image: http://www.2shared.com/photo/Qu2cyRc2/prova.html
> I would visualize it with a colour scaled palette.
> I have write this file.map, but I receive only blank page.
>
> MAP
>     NAME    "prova"
>     CONFIG  "PROJ_LIB" "/usr/share/proj/"
>     STATUS ON
>     SHAPEPATH "./"
>     SIZE 494 531
>     PROJECTION
>         "init=epsg:4326"
>     END
>         EXTENT -154 -57 26 33
>     DEBUG 5
>
>     WEB
>         IMAGEPATH "/var/www/sviluppo//workshop-5.4/tmp/"
>         IMAGEURL "/sviluppo/tmp/"
>     END
>
>     LAYER
>           NAME "tif"
>         DATA "prova.tif"
>         STATUS ON
>         TYPE RASTER
>         OFFSITE 0 0 0
>         CLASSITEM "[pixel]"
>
>         CLASS
>             EXPRESSION ([pixel] >= 0 AND [pixel] < 10 )
>             STYLE
>                 COLOR 0 255 255
>             END
>         END
>
>         CLASS
>             EXPRESSION ([pixel] >= 10 AND [pixel] < 40)
>             STYLE
>                 COLOR 0 255 0
>             END
>         END
>
>         CLASS
>             EXPRESSION ( [pixel] >= 40 AND [pixel] < 80)
>             STYLE
>                 COLOR 255 255 0
>             END
>         END
>
>         CLASS
>             EXPRESSION ([pixel] >= 80 AND [pixel] < 120)
>             STYLE
>                 COLOR 255 127 0
>             END
>         END
>
>         CLASS
>             EXPRESSION ([pixel] >= 120 AND [pixel] < 150)
>             STYLE
>                 COLOR 255 0 0
>               END
>         END
>
>         CLASS
>             EXPRESSION ([pixel] >= 150 AND [pixel] < 200)
>             STYLE
>                 COLOR 255 127 255
>             END
>         END
>
>         CLASS
>             EXPRESSION ([pixel] >= 200 AND [pixel]<40)
>             STYLE
>                 COLOR 0 0 0
>               END
>         END
>     END
> END
>
>
> Can anyone help me please? I am sorry but I am a beginner.
> Thanks in advance,
> Michele.
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org<http://mc/compose?to=mapserver-users@lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>









-----Segue allegato-----

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org</mc/compose?to=mapserver-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users





More information about the MapServer-users mailing list