[mapserver-users] adding a palette to a greytiff
michele pierri
pierm4ci at yahoo.it
Thu Jul 8 01:13:37 PDT 2010
Ok,Thank you,Michele.
--- Gio 8/7/10, Lime, Steve D (DNR) <Steve.Lime at state.mn.us> ha scritto:
Da: Lime, Steve D (DNR) <Steve.Lime at state.mn.us>
Oggetto: RE: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it>, "Alexander Petkov" <greenkov at gmail.com>, "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Data: Giovedì 8 luglio 2010, 03:45
I guess I'd recommend moving to the OL website and looking at their examples. They've done a WONDERFUL job of providing examples that
cover most typical (and a number of atypical) use cases- including basic MapServer.
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 5:02 PM
To: Lime, Steve D (DNR); Alexander Petkov; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] adding a palette to a greytiff
Thank you!
Now it works. Here there is my output example results: http://img413.imageshack.us/img413/7964/mapserv.gif
Now can I put this image on a background map? For example on openlayers map?
Thanks again,
Michele.
--- Mer 7/7/10, Lime, Steve D (DNR) <Steve.Lime at state.mn.us> ha scritto:
Da: Lime, Steve D (DNR) <Steve.Lime at state.mn.us>
Oggetto: RE: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it>, "Alexander Petkov" <greenkov at gmail.com>, "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Data: Mercoledì 7 luglio 2010, 23:41
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</mc/compose?to=mapserver-users-bounces at lists.osgeo.org> [mapserver-users-bounces at lists.osgeo.org</mc/compose?to=mapserver-users-bounces at lists.osgeo.org>] On Behalf Of michele pierri [pierm4ci at yahoo.it</mc/compose?to=pierm4ci at yahoo.it>]
Sent: Wednesday, July 07, 2010 4:20 PM
To: Alexander Petkov; mapserver-users at lists.osgeo.org</mc/compose?to=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</mc/compose?to=pierm4ci at yahoo.it>> ha scritto:
Da: michele pierri <pierm4ci at yahoo.it</mc/compose?to=pierm4ci at yahoo.it>>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "Alexander Petkov" <greenkov at gmail.com</mc/compose?to=greenkov at gmail.com>>, mapserver-users at lists.osgeo.org</mc/compose?to=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</mc/compose?to=greenkov at gmail.com>> ha scritto:
Da: Alexander Petkov <greenkov at gmail.com</mc/compose?to=greenkov at gmail.com>>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it</mc/compose?to=pierm4ci at yahoo.it>>
Cc: mapserver-users at lists.osgeo.org</mc/compose?to=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</mc/compose?to=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</mc/compose?to=greenkov at gmail.com>> ha scritto:
Da: Alexander Petkov <greenkov at gmail.com</mc/compose?to=greenkov at gmail.com>>
Oggetto: Re: [mapserver-users] adding a palette to a greytiff
A: "michele pierri" <pierm4ci at yahoo.it</mc/compose?to=pierm4ci at yahoo.it>>
Cc: mapserver-users at lists.osgeo.org</mc/compose?to=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</mc/compose?to=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</mc/compose?to=greenkov at gmail.com><http://mc/compose?to=greenkov@gmail.com>> ha scritto:
Da: Alexander Petkov <greenkov at gmail.com</mc/compose?to=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</mc/compose?to=pierm4ci at yahoo.it><http://mc/compose?to=pierm4ci@yahoo.it>>
Cc: mapserver-users at lists.osgeo.org</mc/compose?to=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</mc/compose?to=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</mc/compose?to=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></mc/compose?to=mapserver-users at lists.osgeo.org</mc/compose?to=mapserver-users at lists.osgeo.org>>
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100708/9eee0e50/attachment.htm>
More information about the MapServer-users
mailing list