[mapserver-users] is this reorientation possible?

2010-09-23 Thread Alan Swithenbank

Hi,

I've done some looking at the docs and some googling, but, haven't
yet clearly determined if the kind of map reorientation I want to do
is possible in some reasonable way.

Basically I have a perl mapscript server setup that produces an
html form user interface page having a version of the canonical
"Blue Marble" world map image. The interface is used to query our
database, and I use query results to generate shapefiles to plot
marine predator tracks from satellite tagged animals over the map
image. That all is working fine.

My problem is many of the animals cross the +/-180 degrees longitude
line and on an image with west and east boundaries of -180 and +180
that crossing causes track connecting lines to run across the entire
world map image. (That isn't a suprise. I deal with that issue all
the time in other systems.)

Ideally I'd like to be able to reorient the world map so that depending
on whether we're working in the Atlantic I can select to use 0 degrees
as the map center, or if we're working in the Pacific I can select to use
-/+180 degrees as the map center, and get track positions to plot
properly. Barring that, is there a feature I can turn on that, in
creating the final shapefiles, understands not to make the -/+180
cross connection segment in a track? (I'm using the perl Geo::Shapelib 
module to create shapefiles.)


I know I can do those things in my own perl code with position
translations and track segment restrictions, but, am hoping to not
have to work quite that hard. And, I'm afraid my current knowledge of
mapserver/perl-mapscript is barely out of the code pattern matching
phase...;^)

If someone could point me in the general direction of information on
dealing these issues with respect to mapserver/perl-mapscript, I'd
really appreciate it.

thanks!

Alan Swithenbank
Research Progammer
Tagging of Pacific Predators Project
Hopkins Marine Station of Stanford University
120 Ocean View Blvd.
Pacific Grove, CA
93950
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] RE: CGI returning a 502 error

2010-09-23 Thread Lime, Steve D (DNR)
Nope, can't combine those. At least you can specify symbol/size/color all at 
once...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
Sent: Thursday, September 23, 2010 10:47 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: CGI returning a 502 error



Thanks Steve. Looks like I am going to have to figure out how to compile my
own binaries. I think I have streamlined the POST parameters as much as I
can, unless there is a way to combine the following:

&map_layer[layer1]=FEATURE+POINTS+0+0+END+END
&map_layer[layer1]_CLASS[0]_STYLE[0]=SYMBOL+ellipse+SIZE+200+COLOR+255+0+0





Lime, Steve D (DNR) wrote:
> 
> Yes, there is a preset limit on the number of parameters the MapServer cgi
> will accept and indeed it is 100. There are two ways to work around this.
> 
> 1) Edit the MS_MAX_CGI_PARAMS setting in cgiutil.h and recompile.
> 2) Consider combining the requested layers calls into a single variable.
> That is:
> 
> Change 
>   ...layer=layer1&layer=layer2&layer=layer3... 
> to:
>   ...layers=layer1+layer2+layer3...
> 
> You should see an error message from MapServer in your web server error
> log if you ran into this limitation...
> 
> Steve
> 
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
> Sent: Tuesday, September 21, 2010 11:19 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] RE: CGI returning a 502 error
> 
> 
> I do not think it is a string length limit. The IIS returns a separate
> error
> for that. At least it does when you exceed the URL length limit in a GET
> request. 
> 
> I have been doing some tests and it looks like it might be more of a limit
> in the number of parameters in the POST request. I can't find any info
> regarding the maximum number of parameters that you can send in one
> request
> (to an IIS server), but again, I would think that IIS would be responding
> with a more specific error if the limit was with it. 
> 
> Is it possible that the MapServer CGI is limited to 100 POST parameters? 
> 
> Fawcett, David (MPCA) wrote:
>> 
>> According to the docs, starting with MapServer 5.0, there is no limit to
>> the number of layers in a mapfile. 
>> http://mapserver.org/introduction.html#layer-object
>> 
>> I am guessing that you are running into a different issue.  
>> 
>> Have you captured the post request string and examined it to make sure
>> that it is valid?  
>> 
>> Are you running into a string length limit for your post request?  The
>> URL
>> for your post request would be limited to ~2k char for IE, but this only
>> includes the URL to the server, not the key:value pairs.  There could be
>> a
>> size limit for post requests set on your Web server to help prevent DOS
>> attacks.  I don't know where this would be set in IIS.
>> 
>> David.
>> 
>> -Original Message-
>> From: mapserver-users-boun...@lists.osgeo.org
>> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
>> Sent: Monday, September 20, 2010 6:18 PM
>> To: mapserver-users@lists.osgeo.org
>> Subject: [mapserver-users] CGI returning a 502 error
>> 
>> 
>> I'm using the ms4w binaries (5.6.3) under IIS 7.
>> 
>> My application sends (via http POST) a lot of parameters to modify the
>> .map
>> file. Mostly to add features to layers that are turned off by default and
>> then make them visible. When my parameters cause the map to show over 50
>> layers, the IIS returns a 502 error. 
>> 
>> I realize that the max layers are set to 100 in the default map.h file,
>> but
>> like I said, I am using the compiled binaries from ms4w. Does anyone know
>> if
>> they change that to 50 when they compile, or should I look elsewhere to
>> find
>> my problem? 
>> 
>> 
>> -- 
>> View this message in context:
>> http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
>> 
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
>> 
> 
> -- 
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p339.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

--

RE: [mapserver-users] RE: CGI returning a 502 error

2010-09-23 Thread Lime, Steve D (DNR)
The hard limit was purposeful. The thought at the time was that 100 would be 
sufficient in 99.9% of cases (this is the only time I've heard of someone 
running into it) and anything beyond 100 would likely be some sort of rogue 
attack. The code itself does not use the maximum in allocating parameter lists, 
that's done dynamically. It's only a check...

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Thursday, September 23, 2010 1:23 AM
To: mapserver-users@lists.osgeo.org; Lime, Steve D (DNR)
Subject: Re: [mapserver-users] RE: CGI returning a 502 error

Wasn't there a similar problem about the hard-coded maximum number of classes a 
few years ago? That problem was solved, if I remember correctly. Wouldn't it be 
a good idea to take that solution over to the number of CGI parms? The problem 
won't turn up often, but if it does it is hard to detect, and as far as I can 
see it's not hard to solve.

Jan

On 09/22/10 20:56, Lime, Steve D (DNR) wrote:

Yes, there is a preset limit on the number of parameters the MapServer cgi will 
accept and indeed it is 100. There are two ways to work around this.



1) Edit the MS_MAX_CGI_PARAMS setting in cgiutil.h and recompile.

2) Consider combining the requested layers calls into a single variable. That 
is:



Change

  ...layer=layer1&layer=layer2&layer=layer3...

to:

  ...layers=layer1+layer2+layer3...



You should see an error message from MapServer in your web server error log if 
you ran into this limitation...



Steve



-Original Message-

From: 
mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli

Sent: Tuesday, September 21, 2010 11:19 AM

To: mapserver-users@lists.osgeo.org

Subject: [mapserver-users] RE: CGI returning a 502 error





I do not think it is a string length limit. The IIS returns a separate error

for that. At least it does when you exceed the URL length limit in a GET

request.



I have been doing some tests and it looks like it might be more of a limit

in the number of parameters in the POST request. I can't find any info

regarding the maximum number of parameters that you can send in one request

(to an IIS server), but again, I would think that IIS would be responding

with a more specific error if the limit was with it.



Is it possible that the MapServer CGI is limited to 100 POST parameters?



Fawcett, David (MPCA) wrote:



According to the docs, starting with MapServer 5.0, there is no limit to

the number of layers in a mapfile.

http://mapserver.org/introduction.html#layer-object



I am guessing that you are running into a different issue.



Have you captured the post request string and examined it to make sure

that it is valid?



Are you running into a string length limit for your post request?  The URL

for your post request would be limited to ~2k char for IE, but this only

includes the URL to the server, not the key:value pairs.  There could be a

size limit for post requests set on your Web server to help prevent DOS

attacks.  I don't know where this would be set in IIS.



David.



-Original Message-

From: 
mapserver-users-boun...@lists.osgeo.org

[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli

Sent: Monday, September 20, 2010 6:18 PM

To: mapserver-users@lists.osgeo.org

Subject: [mapserver-users] CGI returning a 502 error





I'm using the ms4w binaries (5.6.3) under IIS 7.



My application sends (via http POST) a lot of parameters to modify the

.map

file. Mostly to add features to layers that are turned off by default and

then make them visible. When my parameters cause the map to show over 50

layers, the IIS returns a 502 error.



I realize that the max layers are set to 100 in the default map.h file,

but

like I said, I am using the compiled binaries from ms4w. Does anyone know

if

they change that to 50 when they compile, or should I look elsewhere to

find

my problem?





--

View this message in context:

http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html

Sent from the Mapserver - User mailing list archive at Nabble.com.

___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users





___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users






___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Font encoding

2010-09-23 Thread Bennos

Hi Dejan,

thanks for the hint. I could identify some problems with wrong hex-codes and
i am trying now to replace them. But i am still encountering problems with
that. The strange thing is, that charachters with the right hex are not
generated correctly by mapserver either.
Besids, I checked the shapefile again in ArcMap and saw that the characters
are wrong even there, although they should be correct. So I should check the
original file and the export again.

Cheers
Benjamin
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Font-encoding-tp5550875p5563821.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: CGI returning a 502 error

2010-09-23 Thread stoli


Thanks Steve. Looks like I am going to have to figure out how to compile my
own binaries. I think I have streamlined the POST parameters as much as I
can, unless there is a way to combine the following:

&map_layer[layer1]=FEATURE+POINTS+0+0+END+END
&map_layer[layer1]_CLASS[0]_STYLE[0]=SYMBOL+ellipse+SIZE+200+COLOR+255+0+0





Lime, Steve D (DNR) wrote:
> 
> Yes, there is a preset limit on the number of parameters the MapServer cgi
> will accept and indeed it is 100. There are two ways to work around this.
> 
> 1) Edit the MS_MAX_CGI_PARAMS setting in cgiutil.h and recompile.
> 2) Consider combining the requested layers calls into a single variable.
> That is:
> 
> Change 
>   ...layer=layer1&layer=layer2&layer=layer3... 
> to:
>   ...layers=layer1+layer2+layer3...
> 
> You should see an error message from MapServer in your web server error
> log if you ran into this limitation...
> 
> Steve
> 
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
> Sent: Tuesday, September 21, 2010 11:19 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] RE: CGI returning a 502 error
> 
> 
> I do not think it is a string length limit. The IIS returns a separate
> error
> for that. At least it does when you exceed the URL length limit in a GET
> request. 
> 
> I have been doing some tests and it looks like it might be more of a limit
> in the number of parameters in the POST request. I can't find any info
> regarding the maximum number of parameters that you can send in one
> request
> (to an IIS server), but again, I would think that IIS would be responding
> with a more specific error if the limit was with it. 
> 
> Is it possible that the MapServer CGI is limited to 100 POST parameters? 
> 
> Fawcett, David (MPCA) wrote:
>> 
>> According to the docs, starting with MapServer 5.0, there is no limit to
>> the number of layers in a mapfile. 
>> http://mapserver.org/introduction.html#layer-object
>> 
>> I am guessing that you are running into a different issue.  
>> 
>> Have you captured the post request string and examined it to make sure
>> that it is valid?  
>> 
>> Are you running into a string length limit for your post request?  The
>> URL
>> for your post request would be limited to ~2k char for IE, but this only
>> includes the URL to the server, not the key:value pairs.  There could be
>> a
>> size limit for post requests set on your Web server to help prevent DOS
>> attacks.  I don't know where this would be set in IIS.
>> 
>> David.
>> 
>> -Original Message-
>> From: mapserver-users-boun...@lists.osgeo.org
>> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
>> Sent: Monday, September 20, 2010 6:18 PM
>> To: mapserver-users@lists.osgeo.org
>> Subject: [mapserver-users] CGI returning a 502 error
>> 
>> 
>> I'm using the ms4w binaries (5.6.3) under IIS 7.
>> 
>> My application sends (via http POST) a lot of parameters to modify the
>> .map
>> file. Mostly to add features to layers that are turned off by default and
>> then make them visible. When my parameters cause the map to show over 50
>> layers, the IIS returns a 502 error. 
>> 
>> I realize that the max layers are set to 100 in the default map.h file,
>> but
>> like I said, I am using the compiled binaries from ms4w. Does anyone know
>> if
>> they change that to 50 when they compile, or should I look elsewhere to
>> find
>> my problem? 
>> 
>> 
>> -- 
>> View this message in context:
>> http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
>> 
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
>> 
> 
> -- 
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p339.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5563549.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Get the legend of a layer .map file

2010-09-23 Thread michele pierri
Thanks.

--- Gio 23/9/10, michele pierri  ha scritto:

Da: michele pierri 
Oggetto: Re: [mapserver-users] Get the legend of a layer .map file
A: "Bob Basques" , mapserver-users@lists.osgeo.org
Data: Giovedì 23 settembre 2010, 17:12

Can you take me an example,please?
I'm sorry but I am not very expert.
And after how I can do the request via CGI?
CLASS  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )  NAME  <=== IS IT 
WRIGHT?  STYLE   COLOR 0 255 255  ENDEND
Thanks again.
--- Gio 23/9/10, Bob Basques  ha scritto:

Da: Bob Basques 
Oggetto: Re:
 [mapserver-users] Get the legend of a layer .map file
A: mapserver-users@lists.osgeo.org, "michele pierri" 
Data: Giovedì 23 settembre 2010, 17:06


  




  
  

  Just add in a NAME parameter inside of each CLASS tag set.  You'll need 
to request the LEGEND object via CGI or orther method, but the NAME vales are 
used to describe the Legend Chips in the mapserver output.

  

  bobb

  


  

  

  >>> michele pierri  wrote:


  

  

  Hi,

  
I have a file.map like this:  



MAP

   NAME"distribution"
  
   CONFIG  "PROJ_LIB" "/usr/share/proj/"

   STATUS ON
  
   SHAPEPATH "./"

   PROJECTION
  
  "init=epsg:4326"

   END

   CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"

   DEBUG 5

 LAYER

  NAME "tif"

  DATA 
"/var/www/tmp/a5e1ddfb-6dec-40d0-94e1-ded12f41397e/out/distribution.tiff"

  STATUS DEFAULT

  TYPE RASTER

  CLASSITEM "[pixel]"

CLASS

  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )

  STYLE

   COLOR 0 255 255

  END

END

CLASS

EXPRESSION ([pixel] >= 20 AND [pixel] < 40)

   STYLE

 COLOR 0 255 0

   END

END

CLASS

   EXPRESSION ( [pixel] >= 40 AND [pixel] < 60)

   STYLE

COLOR 255 255 0

   END

END

CLASS

   EXPRESSION ([pixel] >= 60 AND [pixel] < 80)

   STYLE

 COLOR 255 127 0

   END

END

CLASS

   EXPRESSION ([pixel] >= 80 AND [pixel] < 100)

 STYLE

  COLOR 255 0 0

 END

   END

CLASS

   EXPRESSION ([pixel] = 100 )

STYLE

 COLOR 255 123 0

END

END

END

END




Can I have returned with the image,  the legend that describes the meaning of 
the colors?


Thanks in advance.















 






  
-Segue allegato-

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Get the legend of a layer .map file

2010-09-23 Thread Fawcett, David (MPCA)
If your request URL string currently includes &mode=map, change it to 
&mode=legend

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of michele pierri
Sent: Thursday, September 23, 2010 10:12 AM
To: Bob Basques; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Get the legend of a layer .map file

Can you take me an example,please?
I'm sorry but I am not very expert.
And after how I can do the request via CGI?

CLASS

  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )

  NAME  <=== IS IT WRIGHT?

  STYLE

   COLOR 0 255 255

  END

END



Thanks again.

--- Gio 23/9/10, Bob Basques  ha scritto:

Da: Bob Basques 
Oggetto: Re: [mapserver-users] Get the legend of a layer .map file
A: mapserver-users@lists.osgeo.org, "michele pierri" 
Data: Giovedì 23 settembre 2010, 17:06

Just add in a NAME parameter inside of each CLASS tag set.  You'll need to 
request the LEGEND object via CGI or orther method, but the NAME vales are used 
to describe the Legend Chips in the mapserver output.


bobb



>>> michele pierri  wrote:

Hi,

I have a file.map like this:





MAP







   NAME"distribution"







   CONFIG  "PROJ_LIB" "/usr/share/proj/"







   STATUS ON







   SHAPEPATH "./"







   PROJECTION







  "init=epsg:4326"





   END





   CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"





   DEBUG 5





 LAYER





  NAME "tif"





  DATA 
"/var/www/tmp/a5e1ddfb-6dec-40d0-94e1-ded12f41397e/out/distribution.tiff"





  STATUS DEFAULT





  TYPE RASTER





  CLASSITEM "[pixel]"





CLASS





  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )





  STYLE





   COLOR 0 255 255





  END





END





CLASS





EXPRESSION ([pixel] >= 20 AND [pixel] < 40)





   STYLE





 COLOR 0 255 0





   END





END





CLASS





   EXPRESSION ( [pixel] >= 40 AND [pixel] < 60)





   STYLE





COLOR 255 255 0





   END





END





CLASS





   EXPRESSION ([pixel] >= 60 AND [pixel] < 80)





   STYLE





 COLOR 255 127 0





   END





END





CLASS





   EXPRESSION ([pixel] >= 80 AND [pixel] < 100)





 STYLE





  COLOR 255 0 0





 END





   END





CLASS





   EXPRESSION ([pixel] = 100 )





STYLE





 COLOR 255 123 0





END





END





END





END







Can I have returned with the image,  the legend that describes the meaning of 
the colors?





Thanks in advance.









___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Get the legend of a layer .map file

2010-09-23 Thread michele pierri
Can you take me an example,please?
I'm sorry but I am not very expert.
And after how I can do the request via CGI?
CLASS  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )  NAME  <=== IS IT 
WRIGHT?  STYLE   COLOR 0 255 255  ENDEND
Thanks again.
--- Gio 23/9/10, Bob Basques  ha scritto:

Da: Bob Basques 
Oggetto: Re: [mapserver-users] Get the legend of a layer .map file
A: mapserver-users@lists.osgeo.org, "michele pierri" 
Data: Giovedì 23 settembre 2010, 17:06


  




  
  

  Just add in a NAME parameter inside of each CLASS tag set.  You'll need 
to request the LEGEND object via CGI or orther method, but the NAME vales are 
used to describe the Legend Chips in the mapserver output.

  

  bobb

  


  

  

  >>> michele pierri  wrote:


  

  

  Hi,

  
I have a file.map like this:  



MAP

   NAME"distribution"
  
   CONFIG  "PROJ_LIB" "/usr/share/proj/"

   STATUS ON
  
   SHAPEPATH "./"

   PROJECTION
  
  "init=epsg:4326"

   END

   CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"

   DEBUG 5

 LAYER

  NAME "tif"

  DATA 
"/var/www/tmp/a5e1ddfb-6dec-40d0-94e1-ded12f41397e/out/distribution.tiff"

  STATUS DEFAULT

  TYPE RASTER

  CLASSITEM "[pixel]"

CLASS

  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )

  STYLE

   COLOR 0 255 255

  END

END

CLASS

EXPRESSION ([pixel] >= 20 AND [pixel] < 40)

   STYLE

 COLOR 0 255 0

   END

END

CLASS

   EXPRESSION ( [pixel] >= 40 AND [pixel] < 60)

   STYLE

COLOR 255 255 0

   END

END

CLASS

   EXPRESSION ([pixel] >= 60 AND [pixel] < 80)

   STYLE

 COLOR 255 127 0

   END

END

CLASS

   EXPRESSION ([pixel] >= 80 AND [pixel] < 100)

 STYLE

  COLOR 255 0 0

 END

   END

CLASS

   EXPRESSION ([pixel] = 100 )

STYLE

 COLOR 255 123 0

END

END

END

END




Can I have returned with the image,  the legend that describes the meaning of 
the colors?


Thanks in advance.















 




  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Get the legend of a layer .map file

2010-09-23 Thread Bob Basques
Just add in a NAME parameter inside of each CLASS tag set.  You'll need to 
request the LEGEND object via CGI or orther method, but the NAME vales are used 
to describe the Legend Chips in the mapserver output. 

bobb 




>>> michele pierri  wrote:


Hi, 

I have a file.map like this: 

MAP 
   NAME"distribution" 
   CONFIG  "PROJ_LIB" "/usr/share/proj/" 
   STATUS ON 
   SHAPEPATH "./" 
   PROJECTION 
  "init=epsg:4326"
   END
   CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"
   DEBUG 5
 LAYER
  NAME "tif"
  DATA 
"/var/www/tmp/a5e1ddfb-6dec-40d0-94e1-ded12f41397e/out/distribution.tiff"
  STATUS DEFAULT
  TYPE RASTER
  CLASSITEM "[pixel]"
CLASS
  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )
  STYLE
   COLOR 0 255 255
  END
END
CLASS
EXPRESSION ([pixel] >= 20 AND [pixel] < 40)
   STYLE
 COLOR 0 255 0
   END
END
CLASS
   EXPRESSION ( [pixel] >= 40 AND [pixel] < 60)
   STYLE
COLOR 255 255 0
   END
END
CLASS
   EXPRESSION ([pixel] >= 60 AND [pixel] < 80)
   STYLE
 COLOR 255 127 0
   END
END
CLASS
   EXPRESSION ([pixel] >= 80 AND [pixel] < 100)
 STYLE
  COLOR 255 0 0
 END
   END
CLASS
   EXPRESSION ([pixel] = 100 )
STYLE
 COLOR 255 123 0
END
END
END
END


Can I have returned with the image,  the legend that describes the meaning of 
the colors?
Thanks in advance.




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Get the legend of a layer .map file

2010-09-23 Thread michele pierri
Hi,I have a file.map like this:MAP
   NAME "distribution"
   CONFIG  "PROJ_LIB" "/usr/share/proj/"
   STATUS ON
   SHAPEPATH "./"
   PROJECTION
  "init=epsg:4326"
   END
   CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"
   DEBUG 5
 LAYER
  NAME "tif"
  DATA 
"/var/www/tmp/a5e1ddfb-6dec-40d0-94e1-ded12f41397e/out/distribution.tiff"
  STATUS DEFAULT
  TYPE RASTER
  CLASSITEM "[pixel]"
CLASS
  EXPRESSION ([pixel] >= 0 AND [pixel] < 20 )
  STYLE
   COLOR 0 255 255
  END
END
CLASS
EXPRESSION ([pixel] >= 20 AND [pixel] < 40)
   STYLE
 COLOR 0 255 0
   END
END
CLASS
   EXPRESSION ( [pixel] >= 40 AND [pixel] < 60)
   STYLE
COLOR 255 255 0
   END
END
CLASS
   EXPRESSION ([pixel] >= 60 AND [pixel] < 80)
   STYLE
 COLOR 255 127 0
   END
END
CLASS
   EXPRESSION ([pixel] >= 80 AND [pixel] < 100)
 STYLE
  COLOR 255 0 0
 END
   END
CLASS
   EXPRESSION ([pixel] = 100 )
STYLE
 COLOR 255 123 0
END
END
END
END

Can I have returned with the image,  the legend that describes the meaning of 
the colors?Thanks in advance.



  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Coments about the Tickedt 3541

2010-09-23 Thread Sumit Sharma

Initially this bug appears random to me as well, but it is certainly not. 
However, there is surely some loophole in OCI, and that bug is exploited by
MapServer. I have posted this bug in Oracle forum as well, but no luck as of
now. 
As Alan is already able to verify this behavior, hopefully we will get some
patch soon ... :-)
-Sumit
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Coments-about-the-Tickedt-3541-tp5558012p5563227.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Raster Background

2010-09-23 Thread Ibrahim Saricicek

Hi list,

I found the answer;
http://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg06172.html
In the layer definition I've added OFFSITE 0 0 0

Thanks

Sep 23, 2010; 12:00pm   
Ibrahim Saricicek   – Raster Background

 This message was accepted by the mapserver-users@lists.osgeo.org 
mailing
list.
Hi list,

I have a rotated satellite image as seen below.
Is there a way of not showing the black background on the rest of bbox?

Should I change something on image? Or is there a function like "Pixel
Transparency" like on Erdas Imagine 2010?

Regards... 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Raster-Background-tp5562235p5563158.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Raster Background

2010-09-23 Thread Sumit Sharma

You may want to use OFFSITE at layer level. 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Raster-Background-tp5562235p5563149.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] wfs and oracle spatial

2010-09-23 Thread Holger Porath

Hi list,

we are having issues with using mapserver 5.6.5 as a wfs together with  
oracle. When we submit a wfs getfeature filter request mapserver  
doesn't use the filter in the sql statement. It just searches all the  
objects in the database and applies the filter on the result. This is  
very inefficient and even leads to timeouts.


Here is our filter request:

Filter=%3CFilter%3E%3CPropertyIsLike%20wildCard%3D 
%22%25%22%20singleChar%3D%22%3F%22%20escape%3D%22ESC%22%3E 
%3CPropertyName%3EFS_FSZ%3C%2FPropertyName%3E%3CLiteral%3E111%3C 
%2FLiteral%3E%3C%2FPropertyIsLike%3E%3C%2FFilter%3E


As you can see the filter for the attribute "FS_FSZ" is set to "111".

The debug log shows that this isn't used in the sql at all: Using this  
Sql to retrieve the data : SELECT fs_id, FS_GKNR, FS_FLNR, FS_FSZ,  
FS_FSN, FS_FSSTATUS, FS_ID, FS_FSRWERT_ABS, FS_FSHWERT_ABS,  
fs_koordinate FROM os_flst
I expected to see a where clause like the following: where fs_fsz like  
"111"
When we switch back to mapserver 5.0.0 we see the correct where clause  
in the debug log. So what are we doing wrong or is this a bug?


Thanks for your help.
Regards,
Holger

This is how our layer definition looks like:
 LAYER
NAME "test_flst"
 METADATA
 "wfs_extent"  "341 547 3666000 5726000"
 "wfs_title"   "test_flst"
 "gml_featureid"   "fs_id"
 "gml_include_items"   "all" # optional
 END # of METADATA
 TYPE POINT
 STATUS ON  
CONNECTIONTYPE oraclespatial
 CONNECTION  "user/p...@service"
 DATA"fs_koordinate from os_flst USING UNIQUE fs_id NONE"
 PROJECTION
 "init=epsg:31467"
 END # of PROJECTION
 DUMP TRUE
 END # of LAYER
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Internal Server Error / proxy.cgi

2010-09-23 Thread Simone Lella

 Hi,

I'm using MS4W with Windows 7.
When I call "http://localhost:8081/cgi-bin/proxy.cgi";, the response is:

/Internal Server Error
/

/The server encountered an internal error or misconfiguration and was 
unable to complete your request./


/Please contact the server administrator, ad...@local.domain and inform 
them of the time the error occurred, and anything you might have done 
that may have caused the error./


/More information about this error may be available in the server error log.
/


The "error.log" file contains:

/[Thu Sep 23 09:49:43 2010] [warn] PassEnv variable PYTHONPATH was undefined
[Thu Sep 23 09:49:43 2010] [notice] Apache/2.2.10 (Win32) configured -- 
resuming normal operations

[Thu Sep 23 09:49:43 2010] [notice] Server built: Oct 10 2008 12:39:04
[Thu Sep 23 09:49:43 2010] [notice] Parent: Created child process 2932
[Thu Sep 23 09:49:43 2010] [warn] PassEnv variable PYTHONPATH was undefined
[Thu Sep 23 09:49:44 2010] [warn] PassEnv variable PYTHONPATH was undefined
[Thu Sep 23 09:49:44 2010] [notice] Child 2932: Child process is running
[Thu Sep 23 09:49:44 2010] [notice] Child 2932: Acquired the start mutex.
[Thu Sep 23 09:49:44 2010] [notice] Child 2932: Starting 64 worker threads.
[Thu Sep 23 09:49:44 2010] [notice] Child 2932: Starting thread to 
listen on port 8081.
[Thu Sep 23 09:50:13 2010] [error] [client 127.0.0.1] (OS 2)Impossibile 
trovare il file specificato.  : couldn't create child process: 720002: 
proxy.cgi
[Thu Sep 23 09:50:13 2010] [error] [client 127.0.0.1] (OS 2)Impossibile 
trovare il file specificato.  : couldn't spawn child process: 
C:/ms4w/Apache/cgi-bin/proxy.cgi/



The "proxy.cgi" file was created in "C:/ms4w/Apache/cgi-bin/proxy.cgi" 
and I've copied into the following text:


/#!/usr/bin/env python

"""This is a blind proxy that we use to get around browser
restrictions that prevent the Javascript from loading pages not on the
same server as the Javascript.  This has several problems: it's less
efficient, it might break some sites, and it's a security risk because
people can use this proxy to browse the web and possibly do bad stuff
with it.  It only loads pages via http and https, but it can load any
content type. It supports GET and POST requests."""

import urllib2
import cgi
import sys, os

# Designed to prevent Open Proxy type stuff.

allowedHosts = ['www.openlayers.org', 'openlayers.org',
'labs.metacarta.com', 'world.freemap.in',
'prototype.openmnnd.org', 'geo.openplans.org',
'sigma.openplans.org', 'demo.opengeo.org',
'www.openstreetmap.org', 'sample.azavea.com',
'v-swe.uni-muenster.de:8080',
'vmap0.tiles.osgeo.org','localhost:8081']

method = os.environ["REQUEST_METHOD"]

if method == "POST":
qs = os.environ["QUERY_STRING"]
d = cgi.parse_qs(qs)
if d.has_key("url"):
url = d["url"][0]
else:
url = "http://www.openlayers.org";
else:
fs = cgi.FieldStorage()
url = fs.getvalue('url', "http://www.openlayers.org";)

try:
host = url.split("/")[2]
if allowedHosts and not host in allowedHosts:
print "Status: 502 Bad Gateway"
print "Content-Type: text/plain"
print
print "This proxy does not allow you to access that location 
(%s)." % (host,)

print
print os.environ

elif url.startswith("http://";) or url.startswith("https://";):

if method == "POST":
length = int(os.environ["CONTENT_LENGTH"])
headers = {"Content-Type": os.environ["CONTENT_TYPE"]}
body = sys.stdin.read(length)
r = urllib2.Request(url, body, headers)
y = urllib2.urlopen(r)
else:
y = urllib2.urlopen(url)

# print content type header
i = y.info()
if i.has_key("Content-Type"):
print "Content-Type: %s" % (i["Content-Type"])
else:
print "Content-Type: text/plain"
print

print y.read()

y.close()
else:
print "Content-Type: text/plain"
print
print "Illegal request."

except Exception, E:
print "Status: 500 Unexpected Error"
print "Content-Type: text/plain"
print
print "Some unexpected error occurred. Error text was:", E/


I've modified "proxy.cgi" file at "allowedHosts" by adding "localhost:8081".

I must modify the first row of "proxy.cgi" file?
Can this issue related to the Windows 7 OS?


Thanks

Simone


 *_
 _*



--
Simone Lella
Istituto per il Rilevamento Elettromagnetico dell'Ambiente
IREA - CNR (http://www.irea.cnr.it)
Via Bassini, 15
Tel. +39 02-23699299
Milano

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Raster Background

2010-09-23 Thread Ibrahim Saricicek

Hi list,

I have a rotated satellite image as seen below.
Is there a way of not showing the black background on the rest of bbox?

Should I change something on image? Or is there a function like "Pixel
Transparency" like on Erdas Imagine 2010?

Regards...

http://osgeo-org.1803224.n2.nabble.com/file/n5562235/background.png 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Raster-Background-tp5562235p5562235.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users