Re: [mapserver-users] Tile Index Issues

2012-08-21 Thread Stephen Woodbridge

On 8/21/2012 7:38 PM, Peter Mallen wrote:

Hello All,

I am new to map server and I am attempting to display polygon shapefiles
using a tile index but have not been able to see any results.
Eventually I would like to use these tiles to place images(raster) files
on my map but I was first just testing the 'TILEINDEX' feature with
vector data.

All of the shapefiles being referenced in my index shapefile are in the
same folder.


Also, in my index shapefile I have the following two shapefiles
referenced under the 'location' column:
\ms4w\Apache\htdocs\map.data\Guatemala_Cities.shp
\ms4w\Apache\htdocs\map.data\Bolivian_Cities.shp

The following page was used as a reference for creating my map file:
http://mapserver.org/utilities/tile4ms.html

Any help on this would be great.

Thank You,

Peter Mallen


What does your mapfile look like?

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


[mapserver-users] Tile Index Issues

2012-08-21 Thread Peter Mallen
   TRUE
>>   END
>> END
>>
>> CLASS
>>   NAME "Seuil d\'inondation majeure"
>>   EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in
'%ID_REG%')
>>   GROUP "REG_ADMIN"
>>   MINSCALEDENOM 11
>>
>>   STYLE
>>   SYMBOL 'circle'
>>   COLOR   255 0 0
>>   OUTLINECOLOR 0 0 0
>>   SIZE 14
>>   END
>>
>>   LABEL
>>   WRAP"!"
>>   ALIGN   CENTER
>>   COLOR   0 0 0
>>   OUTLINECOLOR255 255 255
>>   ANTIALIAS   FALSE
>>   TYPETRUETYPE
>>   FONT"ubuntu"
>>   SIZE14
>>   FORCE TRUE
>>   OFFSET  0 12
>>   END
>> END
>>
>> if i understant this meant that for a layer, i must validate all 
>> variables of all class even if i don't use them all.
>> My include of 'adn_station_max_v.map' contains X substitutions in X 
>> class so i must have X validations even if i don't use all X class.
>>
>> In my example, i include many class with 'adn_station_max_v.map' but 
>> i'm using only one variable at a time. All class in CLASSGROUP
'REG_ADMIN'
>> only use 'ID_REG'.
>>
>>
>> 2012/8/21 Stephen Woodbridge > <mailto:wood...@swoodbridge.com>>
>>
>>  You probably need to quote:
>>
>> 'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'
>>
>> "#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'
>>
>>  And I would be very suspicious that '#ID_REG' is a value
identifier
>>  because of the '#' character.
>>
>>  -Steve W
>>
>>
>>  On 8/21/2012 11:38 AM, Marc-Andr? Trottier wrote:
>>
>>  there is my layer's definition :
>>
>>LAYER
>>VALIDATION
>>ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>>#ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>>END
>>INCLUDE "../layers/bd/adn_station_max___v.map"
>>CLASSGROUP "BASSIN"
>>NAME "adn_station_bassin"
>>END
>>
>>LAYER
>>VALIDATION
>>#ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>>ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>>END
>>INCLUDE "../layers/bd/adn_station_max___v.map"
>>CLASSGROUP "REG_ADMIN"
>>NAME "adn_station_reg_admin"
>>END
>>
>>  with these commented lines a got this error :
>>  msValidateParameter(): Regular expression error. Parameter
pattern
>>  validation failed.
>>
>>  without comment, i got no error.
>>
>>  CLASSGROUP 'BASSIN' contains many class but each class use
only
>>  'ID_BASSIN' and
>>  CLASSGROUP 'REG_ADMIN' contains many class but each class
use
>>  only 'ID_REG'
>>
>>  is it the right thing to do ? or like i thought, the
validation
>>  block
>>  can contains only the variable used by the layer ?
>>
>>
>>
>>  _
>>  mapserver-users mailing list
>>  mapserver-users@lists.osgeo.__org
>>  <mailto:mapserver-users@lists.osgeo.org>
>>  http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>>  <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>
>>
>>  _
>>  mapserver-users mailing list
>>  mapserver-users@lists.osgeo.__org
>>  <mailto:mapserver-users@lists.osgeo.org>
>>  http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>>  <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
>
>



--

Message: 3
Date: Tue, 21 Aug 2012 20:35:23 +
From: Peisheng Zhao 
To: users mapserver 
Subject: [mapserver-users] how to add a time stamp on raster data
Message-ID: 
Content-Type: text/plain; charset="iso-8859-1"


Hi all,

We have a set of time-series data. Is it popossible to add a time stamp,
i.e. the value of time parameter in the request, on raster data? Thanks.

Peisheng
  
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120821/a
054ab61/attachment-0001.html>

--

Message: 4
Date: Tue, 21 Aug 2012 21:13:10 +
From: "Lime, Steve D (DNR)" 
To: Peisheng Zhao , users mapserver

Subject: Re: [mapserver-users] how to add a time stamp on raster data
Message-ID:



Content-Type: text/plain; charset="iso-8859-1"

Probably, you'd do it through an annotation layer. What version are you
using? What interface (CGI, WMS, WCS)? Basically the idea would be to
funnel the time parameter into a TEXT expression in the annotation
layer. Layer would look like (assuming a variable called 'time' is
passed) this I think:

LAYER
  NAME 'timestamp'
  TYPE ANNOTATION
  STATUS DEFAULT
  TRANSFORM LL # lower-left corner of the
  FEATURE
POINTS 10 10 END
  END
  VALIDATION
'time' 'some expression that matches time values'
  END
  CLASS
LABEL
  ...
END
TEXT '%time%'
  END
END

This would plop the passed time in the lower left corner of the output,
or at least I think it should.

Steve


From: mapserver-users-boun...@lists.osgeo.org
[mapserver-users-boun...@lists.osgeo.org] on behalf of Peisheng Zhao
[zha...@hotmail.com]
Sent: Tuesday, August 21, 2012 3:35 PM
To: users mapserver
Subject: [mapserver-users] how to add a time stamp on raster data


Hi all,

We have a set of time-series data. Is it popossible to add a time stamp,
i.e. the value of time parameter in the request, on raster data? Thanks.

Peisheng
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120821/9
13868a4/attachment.html>

--

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


End of mapserver-users Digest, Vol 55, Issue 43
***
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how to add a time stamp on raster data

2012-08-21 Thread Peisheng Zhao
MapServer 5.4.1. WMS.

From: steve.l...@state.mn.us
To: zha...@hotmail.com; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] how to add a time stamp on raster data
Date: Tue, 21 Aug 2012 21:20:35 +







What version? What interface? Looking at the code, at least for 6.2+, class 
text is a candidate for substitution.



Steve





From: Peisheng Zhao [zha...@hotmail.com]

Sent: Tuesday, August 21, 2012 4:16 PM

To: Lime, Steve D (DNR); users mapserver

Subject: RE: [mapserver-users] how to add a time stamp on raster data






Steve,



Thank you for your answer. I have tried the method you suggest. But it prints 
out "%time%, not the value of time.



Peisheng






From: steve.l...@state.mn.us

To: zha...@hotmail.com; mapserver-users@lists.osgeo.org

Subject: RE: [mapserver-users] how to add a time stamp on raster data

Date: Tue, 21 Aug 2012 21:13:10 +




Probably, you'd do it through an annotation layer. What version are you using? 
What interface (CGI, WMS, WCS)? Basically the idea would be to funnel the time 
parameter into a TEXT
 expression in the annotation layer. Layer would look like (assuming a variable 
called 'time' is passed) this I think:




LAYER
  NAME 'timestamp'
  TYPE ANNOTATION
  STATUS DEFAULT
  TRANSFORM LL # lower-left corner of the 
  FEATURE
POINTS 10 10 END
  END  
  VALIDATION
'time' 'some expression that matches time values'
  END
  CLASS
LABEL
  ...
END
TEXT '%time%'
  END
END



This would plop the passed time in the lower left corner of the output, or at 
least I think it should.



Steve




From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of Peisheng Zhao 
[zha...@hotmail.com]

Sent: Tuesday, August 21, 2012 3:35 PM

To: users mapserver

Subject: [mapserver-users] how to add a time stamp on raster data








Hi all,



We have a set of time-series data. Is it popossible to add a time stamp, i.e. 
the value of time parameter in the request, on raster data? Thanks.



Peisheng













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


Re: [mapserver-users] how to add a time stamp on raster data

2012-08-21 Thread Lime, Steve D (DNR)
What version? What interface? Looking at the code, at least for 6.2+, class 
text is a candidate for substitution.

Steve


From: Peisheng Zhao [zha...@hotmail.com]
Sent: Tuesday, August 21, 2012 4:16 PM
To: Lime, Steve D (DNR); users mapserver
Subject: RE: [mapserver-users] how to add a time stamp on raster data

Steve,

Thank you for your answer. I have tried the method you suggest. But it prints 
out "%time%, not the value of time.

Peisheng


From: steve.l...@state.mn.us
To: zha...@hotmail.com; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] how to add a time stamp on raster data
Date: Tue, 21 Aug 2012 21:13:10 +

Probably, you'd do it through an annotation layer. What version are you using? 
What interface (CGI, WMS, WCS)? Basically the idea would be to funnel the time 
parameter into a TEXT expression in the annotation layer. Layer would look like 
(assuming a variable called 'time' is passed) this I think:

LAYER
  NAME 'timestamp'
  TYPE ANNOTATION
  STATUS DEFAULT
  TRANSFORM LL # lower-left corner of the
  FEATURE
POINTS 10 10 END
  END
  VALIDATION
'time' 'some expression that matches time values'
  END
  CLASS
LABEL
  ...
END
TEXT '%time%'
  END
END

This would plop the passed time in the lower left corner of the output, or at 
least I think it should.

Steve


From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of Peisheng Zhao 
[zha...@hotmail.com]
Sent: Tuesday, August 21, 2012 3:35 PM
To: users mapserver
Subject: [mapserver-users] how to add a time stamp on raster data


Hi all,

We have a set of time-series data. Is it popossible to add a time stamp, i.e. 
the value of time parameter in the request, on raster data? Thanks.

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


Re: [mapserver-users] how to add a time stamp on raster data

2012-08-21 Thread Peisheng Zhao
Steve,

Thank you for your answer. I have tried the method you suggest. But it prints 
out "%time%, not the value of time.

Peisheng

From: steve.l...@state.mn.us
To: zha...@hotmail.com; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] how to add a time stamp on raster data
Date: Tue, 21 Aug 2012 21:13:10 +







Probably, you'd do it through an annotation layer. What version are you using? 
What interface (CGI, WMS, WCS)? Basically the idea would be to funnel the time 
parameter into a TEXT
 expression in the annotation layer. Layer would look like (assuming a variable 
called 'time' is passed) this I think:




LAYER
  NAME 'timestamp'
  TYPE ANNOTATION
  STATUS DEFAULT
  TRANSFORM LL # lower-left corner of the 
  FEATURE
POINTS 10 10 END
  END  
  VALIDATION
'time' 'some expression that matches time values'
  END
  CLASS
LABEL
  ...
END
TEXT '%time%'
  END
END



This would plop the passed time in the lower left corner of the output, or at 
least I think it should.



Steve




From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of Peisheng Zhao 
[zha...@hotmail.com]

Sent: Tuesday, August 21, 2012 3:35 PM

To: users mapserver

Subject: [mapserver-users] how to add a time stamp on raster data








Hi all,



We have a set of time-series data. Is it popossible to add a time stamp, i.e. 
the value of time parameter in the request, on raster data? Thanks.



Peisheng






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


Re: [mapserver-users] how to add a time stamp on raster data

2012-08-21 Thread Lime, Steve D (DNR)
Probably, you'd do it through an annotation layer. What version are you using? 
What interface (CGI, WMS, WCS)? Basically the idea would be to funnel the time 
parameter into a TEXT expression in the annotation layer. Layer would look like 
(assuming a variable called 'time' is passed) this I think:

LAYER
  NAME 'timestamp'
  TYPE ANNOTATION
  STATUS DEFAULT
  TRANSFORM LL # lower-left corner of the
  FEATURE
POINTS 10 10 END
  END
  VALIDATION
'time' 'some expression that matches time values'
  END
  CLASS
LABEL
  ...
END
TEXT '%time%'
  END
END

This would plop the passed time in the lower left corner of the output, or at 
least I think it should.

Steve


From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of Peisheng Zhao 
[zha...@hotmail.com]
Sent: Tuesday, August 21, 2012 3:35 PM
To: users mapserver
Subject: [mapserver-users] how to add a time stamp on raster data


Hi all,

We have a set of time-series data. Is it popossible to add a time stamp, i.e. 
the value of time parameter in the request, on raster data? Thanks.

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


[mapserver-users] how to add a time stamp on raster data

2012-08-21 Thread Peisheng Zhao

Hi all,

We have a set of time-series data. Is it popossible to add a time stamp, i.e. 
the value of time parameter in the request, on raster data? Thanks.

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


Re: [mapserver-users] validation block

2012-08-21 Thread Stephen Woodbridge

Hi David,

Thank you for the feedback, I have only done this with SQL statements. 
I'm surprised that we implemented this using a different syntax.
Anyway your complete example below will hopefully help others to get it 
working also.


Thanks,
  -Steve W

On 8/21/2012 3:28 PM, Fawcett, David (MPCA) wrote:

I do something like the second example in one of my applications.  I send the 
comma-delimited string for use as part of the IN statement.

This basically allows you to symbolize features from your spatial data set 
based on data passed in through the URL.

I pass these URL vars:
&group1=129,119,041,005,159,051,011,147,097,015,067,171,081,063,025,093,009,149,079,049,065,003,143,027,039,007,099,121,151,135,107,047,033,031,023,089,001,013,161,109,139,061,055,101,045,127,113,117,167,085,133,073,071,157,105,083,165,077,111,059,115,019,153,125,169,087,043,145,017,131,021,173,035,095,091,155,057,103,075,029,069&group2=137,163,037,141,123&group3=&group4=053

Here is the layer definition:

LAYER
   NAME "airdata"
   STATUS DEFAULT
   DATA 'county_thin'
   TYPE POLYGON
   TEMPLATE "templates/emiss_imap_template.html"

   VALIDATION
  group1 "^[0-9\,]+$"
  group2 "^[0-9\,]+$"
  group3 "^[0-9\,]+$"
  group4 "^[0-9\,]+$"
   END
   CLASS
  NAME "group1"
EXPRESSION ('[county_fip]' IN '%group1%')
   STYLE
   COLOR 241 238 246
   END
   END
   CLASS
  NAME "group2"
EXPRESSION ('[county_fip]' IN '%group2%')
   STYLE
   COLOR 189 201 225
   END
   END
   CLASS
  NAME "group3"
EXPRESSION ('[county_fip]' IN '%group3%')
   STYLE
   COLOR 116 169 207
   END
   END
   CLASS
  NAME "group4"
EXPRESSION ('[county_fip]' IN '%group4%')
   STYLE
   COLOR 5 112 176
   END
   END

END

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge
Sent: Tuesday, August 21, 2012 1:16 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] validation block

Typically the SQL syntax is   column in (a,b,c,d)
So based on this

[id_bassin] in '%ID_BASSIN%'

would be problematic I think because your syntax is:

column in 'string'

Which is not valid. Also what is your validation for %ID_BASSIN%?
Is something like this?   ^\([0-9]+(,[0-9]+)*\)$

where ID_BASSIN=(123,234,345)

or do you want something like:

[id_bassin] in (%ID_BASSIN%)

with a valdiation like:  ^[0-9]+(,[0-9]+)*$

where ID_BASSIN=123,234,345

-Steve W

On 8/21/2012 1:33 PM, Marc-André Trottier wrote:

here is an example of two class in 'adn_station_max_v.map' :

CLASS
  NAME "Information non disponible (grande échelle)"
  EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%')
  GROUP "BASSIN"
  MINSCALEDENOM 0
  MAXSCALEDENOM 15
  STYLE
  SYMBOL 'circle'
  COLOR 128 128 128
  OUTLINECOLOR 0 0 0
  SIZE 9
  END

  LABEL
  COLOR   0 0 0
  OUTLINECOLOR255 255 255
  ANTIALIAS   FALSE
  TYPETRUETYPE
  FONT"ubuntu"
  SIZE14
  POSITION auto
  FORCE TRUE
  END
END

CLASS
  NAME "Seuil d\'inondation majeure"
  EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in '%ID_REG%')
  GROUP "REG_ADMIN"
  MINSCALEDENOM 11

  STYLE
  SYMBOL 'circle'
  COLOR   255 0 0
  OUTLINECOLOR 0 0 0
  SIZE 14
  END

  LABEL
  WRAP"!"
  ALIGN   CENTER
  COLOR   0 0 0
  OUTLINECOLOR255 255 255
  ANTIALIAS   FALSE
  TYPETRUETYPE
  FONT"ubuntu"
  SIZE14
  FORCE TRUE
  OFFSET  0 12
  END
END

if i understant this meant that for a layer, i must validate all
variables of all class even if i don't use them all.
My include of 'adn_station_max_v.map' contains X substitutions in X
class so i must have X validations even if i don't use all X class.

In my example, i include many class with 'adn_station_max_v.map' but
i'm using only one variable at a time. All class in CLASSGROUP 'REG_ADMIN'
only use 'ID_REG'.


2012/8/21 Stephen Woodbridge mailto:wood...@swoodbridge.com>>

 You probably need to quote:

'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'

"#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'

 And I would be very suspicious that '#ID_REG' is a value identifier
 because of the '#' character.

 -Steve W


 On 8/21/2012 11:38 AM, Marc-André Trottier wrote:

 there is my layer's definition :

   LAYER
   VALIDATION
   ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
 

Re: [mapserver-users] validation block

2012-08-21 Thread Fawcett, David (MPCA)
I do something like the second example in one of my applications.  I send the 
comma-delimited string for use as part of the IN statement.  

This basically allows you to symbolize features from your spatial data set 
based on data passed in through the URL.  

I pass these URL vars:
&group1=129,119,041,005,159,051,011,147,097,015,067,171,081,063,025,093,009,149,079,049,065,003,143,027,039,007,099,121,151,135,107,047,033,031,023,089,001,013,161,109,139,061,055,101,045,127,113,117,167,085,133,073,071,157,105,083,165,077,111,059,115,019,153,125,169,087,043,145,017,131,021,173,035,095,091,155,057,103,075,029,069&group2=137,163,037,141,123&group3=&group4=053

Here is the layer definition:

LAYER
  NAME "airdata"
  STATUS DEFAULT
  DATA 'county_thin'
  TYPE POLYGON
  TEMPLATE "templates/emiss_imap_template.html"

  VALIDATION
 group1 "^[0-9\,]+$"
 group2 "^[0-9\,]+$"
 group3 "^[0-9\,]+$"
 group4 "^[0-9\,]+$"
  END
  CLASS
 NAME "group1"
   EXPRESSION ('[county_fip]' IN '%group1%')
   STYLE
   COLOR 241 238 246
   END
  END
  CLASS
 NAME "group2"
   EXPRESSION ('[county_fip]' IN '%group2%')
   STYLE
   COLOR 189 201 225
   END
  END
  CLASS
 NAME "group3"
   EXPRESSION ('[county_fip]' IN '%group3%')
   STYLE
   COLOR 116 169 207
   END
  END
  CLASS
 NAME "group4"
   EXPRESSION ('[county_fip]' IN '%group4%')
   STYLE
   COLOR 5 112 176
   END
  END

END

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge
Sent: Tuesday, August 21, 2012 1:16 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] validation block

Typically the SQL syntax is   column in (a,b,c,d)
So based on this

[id_bassin] in '%ID_BASSIN%'

would be problematic I think because your syntax is:

column in 'string'

Which is not valid. Also what is your validation for %ID_BASSIN%?
Is something like this?   ^\([0-9]+(,[0-9]+)*\)$

where ID_BASSIN=(123,234,345)

or do you want something like:

[id_bassin] in (%ID_BASSIN%)

with a valdiation like:  ^[0-9]+(,[0-9]+)*$

where ID_BASSIN=123,234,345

-Steve W

On 8/21/2012 1:33 PM, Marc-André Trottier wrote:
> here is an example of two class in 'adn_station_max_v.map' :
>
> CLASS
>  NAME "Information non disponible (grande échelle)"
>  EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%')
>  GROUP "BASSIN"
>  MINSCALEDENOM 0
>  MAXSCALEDENOM 15
>  STYLE
>  SYMBOL 'circle'
>  COLOR 128 128 128
>  OUTLINECOLOR 0 0 0
>  SIZE 9
>  END
>
>  LABEL
>  COLOR   0 0 0
>  OUTLINECOLOR255 255 255
>  ANTIALIAS   FALSE
>  TYPETRUETYPE
>  FONT"ubuntu"
>  SIZE14
>  POSITION auto
>  FORCE TRUE
>  END
> END
>
> CLASS
>  NAME "Seuil d\'inondation majeure"
>  EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in '%ID_REG%')
>  GROUP "REG_ADMIN"
>  MINSCALEDENOM 11
>
>  STYLE
>  SYMBOL 'circle'
>  COLOR   255 0 0
>  OUTLINECOLOR 0 0 0
>  SIZE 14
>  END
>
>  LABEL
>  WRAP"!"
>  ALIGN   CENTER
>  COLOR   0 0 0
>  OUTLINECOLOR255 255 255
>  ANTIALIAS   FALSE
>  TYPETRUETYPE
>  FONT"ubuntu"
>  SIZE14
>  FORCE TRUE
>  OFFSET  0 12
>  END
> END
>
> if i understant this meant that for a layer, i must validate all 
> variables of all class even if i don't use them all.
> My include of 'adn_station_max_v.map' contains X substitutions in X 
> class so i must have X validations even if i don't use all X class.
>
> In my example, i include many class with 'adn_station_max_v.map' but 
> i'm using only one variable at a time. All class in CLASSGROUP 'REG_ADMIN'
> only use 'ID_REG'.
>
>
> 2012/8/21 Stephen Woodbridge  >
>
> You probably need to quote:
>
>'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'
>
>"#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'
>
> And I would be very suspicious that '#ID_REG' is a value identifier
> because of the '#' character.
>
> -Steve W
>
>
> On 8/21/2012 11:38 AM, Marc-André Trottier wrote:
>
> there is my layer's definition :
>
>   LAYER
>   VALIDATION
>   ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>   #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>   END
>   INCLUDE "../layers/bd/adn_station_max___v.map"
>   CLASSGROUP "BASSIN"
>   NAME "adn_station_bassin"
>

Re: [mapserver-users] validation block

2012-08-21 Thread Stephen Woodbridge

Typically the SQL syntax is   column in (a,b,c,d)
So based on this

[id_bassin] in '%ID_BASSIN%'

would be problematic I think because your syntax is:

column in 'string'

Which is not valid. Also what is your validation for %ID_BASSIN%?
Is something like this?   ^\([0-9]+(,[0-9]+)*\)$

where ID_BASSIN=(123,234,345)

or do you want something like:

[id_bassin] in (%ID_BASSIN%)

with a valdiation like:  ^[0-9]+(,[0-9]+)*$

where ID_BASSIN=123,234,345

-Steve W

On 8/21/2012 1:33 PM, Marc-André Trottier wrote:

here is an example of two class in 'adn_station_max_v.map' :

CLASS
 NAME "Information non disponible (grande échelle)"
 EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%')
 GROUP "BASSIN"
 MINSCALEDENOM 0
 MAXSCALEDENOM 15
 STYLE
 SYMBOL 'circle'
 COLOR 128 128 128
 OUTLINECOLOR 0 0 0
 SIZE 9
 END

 LABEL
 COLOR   0 0 0
 OUTLINECOLOR255 255 255
 ANTIALIAS   FALSE
 TYPETRUETYPE
 FONT"ubuntu"
 SIZE14
 POSITION auto
 FORCE TRUE
 END
END

CLASS
 NAME "Seuil d\'inondation majeure"
 EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in '%ID_REG%')
 GROUP "REG_ADMIN"
 MINSCALEDENOM 11

 STYLE
 SYMBOL 'circle'
 COLOR   255 0 0
 OUTLINECOLOR 0 0 0
 SIZE 14
 END

 LABEL
 WRAP"!"
 ALIGN   CENTER
 COLOR   0 0 0
 OUTLINECOLOR255 255 255
 ANTIALIAS   FALSE
 TYPETRUETYPE
 FONT"ubuntu"
 SIZE14
 FORCE TRUE
 OFFSET  0 12
 END
END

if i understant this meant that for a layer, i must validate all
variables of all class even if i don't use them all.
My include of 'adn_station_max_v.map' contains X substitutions in X
class so i must have X validations even if i don't use all X class.

In my example, i include many class with 'adn_station_max_v.map' but i'm
using only one variable at a time. All class in CLASSGROUP 'REG_ADMIN'
only use 'ID_REG'.


2012/8/21 Stephen Woodbridge mailto:wood...@swoodbridge.com>>

You probably need to quote:

   'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'

   "#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'

And I would be very suspicious that '#ID_REG' is a value identifier
because of the '#' character.

-Steve W


On 8/21/2012 11:38 AM, Marc-André Trottier wrote:

there is my layer's definition :

  LAYER
  VALIDATION
  ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
  #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
  END
  INCLUDE "../layers/bd/adn_station_max___v.map"
  CLASSGROUP "BASSIN"
  NAME "adn_station_bassin"
  END

  LAYER
  VALIDATION
  #ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
  ID_REG '[[a-zA-Z0-9]{0,10},??]*'
  END
  INCLUDE "../layers/bd/adn_station_max___v.map"
  CLASSGROUP "REG_ADMIN"
  NAME "adn_station_reg_admin"
  END

with these commented lines a got this error :
msValidateParameter(): Regular expression error. Parameter pattern
validation failed.

without comment, i got no error.

CLASSGROUP 'BASSIN' contains many class but each class use only
'ID_BASSIN' and
CLASSGROUP 'REG_ADMIN' contains many class but each class use
only 'ID_REG'

is it the right thing to do ? or like i thought, the validation
block
can contains only the variable used by the layer ?



_
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Passing an additional parameter via URL, for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread Humberto Cereser Ibanez

Stef,

I don't know noting about DATAPATTERN, but you can try this:

On 21-08-2012 12:55, mapserver-users-requ...@lists.osgeo.org wrote:

Date: Tue, 21 Aug 2012 16:41:17 +0200
From: Stefan Schwarzer
To:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Passing an additional parameter via URL
for WMS request - doesn't work anymore with new mapserver?
Message-ID:<0db5aeea-5530-4630-b26c-7fcb8678a...@unep.org>
Content-Type: text/plain; charset=windows-1252

Thanks so much for the quick responses!

If I understand it correctly, I need to specify "DATAPATTERN" in the MAP part, 
in order to use the parameter in the DATA request:

Doc is saying: LAYER: DATA (must validate against DATAPATTERN)


which would look like this:

SHAPEPATH '/www/xxx/data'
SHAPEPATH is not taken into account for layers that use database 
connection, however you need this if you have any layer that uses SHAPEFILE.

FONTSET '/www/xxx/htdocs/mod_map/etc/fonts.txt'
SYMBOLSET '/www/xxx/htdocs/mod_map/etc/symbols.sym'
DATAPATTERN '^[0-9]'


with the DATA request like:

DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country<>  
%id_country%) AS foo USING UNIQUE gid USING srid=4326"

Try change "<>" by "!="

DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country != 
%id_country%) AS foo USING UNIQUE gid USING srid=4326"




Hmmm?. But that doesn't work.

msDrawMap(): Image handling error. Failed to draw layer 
named'capitals_mask'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  syntax error 
at or near")"
LINE 1: ...capitals WHERE capitals.id_country<> %id_country%) AS foo w?


Can you shed some light on it? I am not really familiar with the regular 
expressions. I am just passing an integer.

Thanks for any hints!

Stef


Let me know if this was useful for you.

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


Re: [mapserver-users] validation block

2012-08-21 Thread Marc-André Trottier
here is an example of two class in 'adn_station_max_v.map' :

CLASS
NAME "Information non disponible (grande échelle)"
EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%')
GROUP "BASSIN"
MINSCALEDENOM 0
MAXSCALEDENOM 15
STYLE
SYMBOL 'circle'
COLOR 128 128 128
OUTLINECOLOR 0 0 0
SIZE 9
END

LABEL
COLOR   0 0 0
OUTLINECOLOR255 255 255
ANTIALIAS   FALSE
TYPETRUETYPE
FONT"ubuntu"
SIZE14
POSITION auto
FORCE TRUE
END
END

CLASS
NAME "Seuil d\'inondation majeure"
EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in '%ID_REG%')
GROUP "REG_ADMIN"
MINSCALEDENOM 11

STYLE
SYMBOL 'circle'
COLOR   255 0 0
OUTLINECOLOR 0 0 0
SIZE 14
END

LABEL
WRAP"!"
ALIGN   CENTER
COLOR   0 0 0
OUTLINECOLOR255 255 255
ANTIALIAS   FALSE
TYPETRUETYPE
FONT"ubuntu"
SIZE14
FORCE TRUE
OFFSET  0 12
END
END

if i understant this meant that for a layer, i must validate all variables
of all class even if i don't use them all.
My include of 'adn_station_max_v.map' contains X substitutions in X class
so i must have X validations even if i don't use all X class.

In my example, i include many class with 'adn_station_max_v.map' but i'm
using only one variable at a time. All class in CLASSGROUP 'REG_ADMIN' only
use 'ID_REG'.


2012/8/21 Stephen Woodbridge 

> You probably need to quote:
>
>   'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'
>
>   "#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'
>
> And I would be very suspicious that '#ID_REG' is a value identifier
> because of the '#' character.
>
> -Steve W
>
>
> On 8/21/2012 11:38 AM, Marc-André Trottier wrote:
>
>> there is my layer's definition :
>>
>>  LAYER
>>  VALIDATION
>>  ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>>  #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>>  END
>>  INCLUDE "../layers/bd/adn_station_max_**v.map"
>>  CLASSGROUP "BASSIN"
>>  NAME "adn_station_bassin"
>>  END
>>
>>  LAYER
>>  VALIDATION
>>  #ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>>  ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>>  END
>>  INCLUDE "../layers/bd/adn_station_max_**v.map"
>>  CLASSGROUP "REG_ADMIN"
>>  NAME "adn_station_reg_admin"
>>  END
>>
>> with these commented lines a got this error :
>> msValidateParameter(): Regular expression error. Parameter pattern
>> validation failed.
>>
>> without comment, i got no error.
>>
>> CLASSGROUP 'BASSIN' contains many class but each class use only
>> 'ID_BASSIN' and
>> CLASSGROUP 'REG_ADMIN' contains many class but each class use only
>> 'ID_REG'
>>
>> is it the right thing to do ? or like i thought, the validation block
>> can contains only the variable used by the layer ?
>>
>>
>>
>> __**_
>> 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


Re: [mapserver-users] validation block

2012-08-21 Thread Stephen Woodbridge

You probably need to quote:

  'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'
  "#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'

And I would be very suspicious that '#ID_REG' is a value identifier 
because of the '#' character.


-Steve W

On 8/21/2012 11:38 AM, Marc-André Trottier wrote:

there is my layer's definition :

 LAYER
 VALIDATION
 ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
 #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
 END
 INCLUDE "../layers/bd/adn_station_max_v.map"
 CLASSGROUP "BASSIN"
 NAME "adn_station_bassin"
 END

 LAYER
 VALIDATION
 #ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
 ID_REG '[[a-zA-Z0-9]{0,10},??]*'
 END
 INCLUDE "../layers/bd/adn_station_max_v.map"
 CLASSGROUP "REG_ADMIN"
 NAME "adn_station_reg_admin"
 END

with these commented lines a got this error :
msValidateParameter(): Regular expression error. Parameter pattern
validation failed.

without comment, i got no error.

CLASSGROUP 'BASSIN' contains many class but each class use only
'ID_BASSIN' and
CLASSGROUP 'REG_ADMIN' contains many class but each class use only 'ID_REG'

is it the right thing to do ? or like i thought, the validation block
can contains only the variable used by the layer ?



___
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] validation block

2012-08-21 Thread thomas bonfort
On Tue, Aug 21, 2012 at 5:38 PM, Marc-André Trottier
 wrote:
> there is my layer's definition :
>
> LAYER
> VALIDATION
> ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
> #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
> END
> INCLUDE "../layers/bd/adn_station_max_v.map"
> CLASSGROUP "BASSIN"
> NAME "adn_station_bassin"
> END
>
> LAYER
> VALIDATION
> #ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
> ID_REG '[[a-zA-Z0-9]{0,10},??]*'
> END
> INCLUDE "../layers/bd/adn_station_max_v.map"
> CLASSGROUP "REG_ADMIN"
> NAME "adn_station_reg_admin"
> END
>
> with these commented lines a got this error :
> msValidateParameter(): Regular expression error. Parameter pattern
> validation failed.
>
> without comment, i got no error.
>
> CLASSGROUP 'BASSIN' contains many class but each class use only 'ID_BASSIN'
> and
> CLASSGROUP 'REG_ADMIN' contains many class but each class use only 'ID_REG'

Are you certain of that? You are including the same file in both ...

>
> is it the right thing to do ? or like i thought, the validation block can
> contains only the variable used by the layer ?
>
>
> ___
> 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] validation block

2012-08-21 Thread Marc-André Trottier
there is my layer's definition :

LAYER
VALIDATION
ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
#ID_REG '[[a-zA-Z0-9]{0,10},??]*'
END
INCLUDE "../layers/bd/adn_station_max_v.map"
CLASSGROUP "BASSIN"
NAME "adn_station_bassin"
END

LAYER
VALIDATION
#ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
ID_REG '[[a-zA-Z0-9]{0,10},??]*'
END
INCLUDE "../layers/bd/adn_station_max_v.map"
CLASSGROUP "REG_ADMIN"
NAME "adn_station_reg_admin"
END

with these commented lines a got this error :
msValidateParameter(): Regular expression error. Parameter pattern
validation failed.

without comment, i got no error.

CLASSGROUP 'BASSIN' contains many class but each class use only 'ID_BASSIN'
and
CLASSGROUP 'REG_ADMIN' contains many class but each class use only 'ID_REG'

is it the right thing to do ? or like i thought, the validation block can
contains only the variable used by the layer ?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread Till Adams
Stefan,

this is a working example from a layer:

METADATA
  [...]
   'LEVEL_validation_pattern' '1|1,2|1,2,3|1,2,3,4|1,2,3,4,5'
   'default_LEVEL' '1,2'
  [...]

This sets the Keyword LEVEL which is added to your URL to the
Default-Value "1,2" and allows the values defined in the validation
pattern "LEVEL_validation_pattern"

Regards, Till

On 21.08.2012 16:41, Stefan Schwarzer wrote:
> Thanks so much for the quick responses!
> 
> If I understand it correctly, I need to specify "DATAPATTERN" in the MAP 
> part, in order to use the parameter in the DATA request:
> 
>   Doc is saying: LAYER: DATA (must validate against DATAPATTERN)
> 
> 
> which would look like this:
> 
>   SHAPEPATH '/www/xxx/data' 
>   FONTSET '/www/xxx/htdocs/mod_map/etc/fonts.txt' 
>   SYMBOLSET '/www/xxx/htdocs/mod_map/etc/symbols.sym' 
>   DATAPATTERN '^[0-9]'
> 
> 
> with the DATA request like:
> 
>   DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country 
> <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
> 
> 
> Hmmm…. But that doesn't work.
> 
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'capitals_mask'.
> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
> syntax error at or near ")"
> LINE 1: ...capitals WHERE capitals.id_country <> %id_country%) AS foo w…
> 
> 
> Can you shed some light on it? I am not really familiar with the regular 
> expressions. I am just passing an integer.
> 
> Thanks for any hints!
> 
> Stef
> 
> 
> 
> 
> On Aug 21, 2012, at 4:10 PM, Till Adams wrote:
> 
>> Stefan,
>>
>> from mapserver 6 on you must define the default values for the
>> parameters in your metadata-tag and also provide a validation-pattern.
>>
>> You'll find more here:
>> http://mapserver.org/cgi/runsub.html
>>
>> Regards, Till
>>
>>
>>
>> On 21.08.2012 16:07, Stefan Schwarzer wrote:
>>> Hi there,
>>>
>>> I used to pass a parameter in a WMS request in order to specify which 
>>> country should be highlighted. The MAPFILE would read that and, via an 
>>> EXPRESSION, set all country but the selected one to a bit of opacity:
>>>
>>> DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country 
>>> <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
>>>
>>> That doesn't work anymore after upgrading our machine. So, I am not 100% 
>>> sure if this comes from mapserver, or if there is anything else involved. 
>>> But it seems more like a mapserver problem, as the error-message is
>>>
>>> 
>>> msDrawMap(): Image handling error. Failed to draw layer named 
>>> 'capitals_selected'.
>>> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
>>> syntax error at or near "%"
>>> LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
>>> ^
>>>
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> 
>>>
>>>
>>> Thanks for any hints/clarification.
>>>
>>> Stefan
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>> -- 
>>
>> NEWS:
>> -> GO Mobile - jetzt WebGIS auch auf Smartphones
>> -> Bald OpenSource! SHOGun - das JavaBackend für WebGIS Anwendungen
>>
>>
>> 
>> terrestris GmbH & Co. KG
>> Puetzchens Chaussee 56
>> 53227 Bonn
>> Germany
>>
>> Till Adams
>> Geschaeftsfuehrung
>>
>> Tel: +49 (0)228 / 962 899-52
>> Mobile:  +49 (0)151 / 25394429
>> Fax: +49 (0)228 / 962 899-57
>>
>> ad...@terrestris.de
>> http://www.terrestris.de
>> Amtsgericht Bonn, HRA 6835
>> 
>>
>> Komplementaerin:
>>
>> terrestris Verwaltungs GmbH
>>
>> vertreten durch:
>> Hinrich Paulsen, Till Adams
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>

-- 

NEWS:
-> GO Mobile - jetzt WebGIS auch auf Smartphones
-> Bald OpenSource! SHOGun - das JavaBackend für WebGIS Anwendungen



terrestris GmbH & Co. KG
Puetzchens Chaussee 56
53227 Bonn
Germany

Till Adams
Geschaeftsfuehrung

Tel:+49 (0)228 / 962 899-52
Mobile: +49 (0)151 / 25394429
Fax:+49 (0)228 / 962 899-57

ad...@terrestris.de
http://www.terrestris.de
Amtsgericht Bonn, HRA 6835


Komplementaerin:

terrestris Verwaltungs GmbH

vertreten durch:
Hinrich Paulsen, Till Adams
___

Re: [mapserver-users] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread thomas bonfort
You need to validate the substituted variable:

LAYER
  VALIDATION
 "id_country" "^[0-9]+$"
  END
  DATA ...
END


On Tue, Aug 21, 2012 at 4:41 PM, Stefan Schwarzer
 wrote:
> Thanks so much for the quick responses!
>
> If I understand it correctly, I need to specify "DATAPATTERN" in the MAP 
> part, in order to use the parameter in the DATA request:
>
> Doc is saying: LAYER: DATA (must validate against DATAPATTERN)
>
>
> which would look like this:
>
> SHAPEPATH '/www/xxx/data'
> FONTSET '/www/xxx/htdocs/mod_map/etc/fonts.txt'
> SYMBOLSET '/www/xxx/htdocs/mod_map/etc/symbols.sym'
> DATAPATTERN '^[0-9]'
>
>
> with the DATA request like:
>
> DATA "the_geom FROM (SELECT xxx FROM capitals WHERE 
> capitals.id_country <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
>
>
> Hmmm…. But that doesn't work.
>
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'capitals_mask'.
> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
> syntax error at or near ")"
> LINE 1: ...capitals WHERE capitals.id_country <> %id_country%) AS foo w…
>
>
> Can you shed some light on it? I am not really familiar with the regular 
> expressions. I am just passing an integer.
>
> Thanks for any hints!
>
> Stef
>
>
>
>
> On Aug 21, 2012, at 4:10 PM, Till Adams wrote:
>
>> Stefan,
>>
>> from mapserver 6 on you must define the default values for the
>> parameters in your metadata-tag and also provide a validation-pattern.
>>
>> You'll find more here:
>> http://mapserver.org/cgi/runsub.html
>>
>> Regards, Till
>>
>>
>>
>> On 21.08.2012 16:07, Stefan Schwarzer wrote:
>>> Hi there,
>>>
>>> I used to pass a parameter in a WMS request in order to specify which 
>>> country should be highlighted. The MAPFILE would read that and, via an 
>>> EXPRESSION, set all country but the selected one to a bit of opacity:
>>>
>>>  DATA "the_geom FROM (SELECT xxx FROM capitals WHERE 
>>> capitals.id_country <> %id_country%) AS foo USING UNIQUE gid USING 
>>> srid=4326"
>>>
>>> That doesn't work anymore after upgrading our machine. So, I am not 100% 
>>> sure if this comes from mapserver, or if there is anything else involved. 
>>> But it seems more like a mapserver problem, as the error-message is
>>>
>>> 
>>> msDrawMap(): Image handling error. Failed to draw layer named 
>>> 'capitals_selected'.
>>> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
>>> syntax error at or near "%"
>>> LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
>>> ^
>>>
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> msValidateParameter(): Regular expression error. Parameter pattern 
>>> validation failed.
>>> 
>>>
>>>
>>> Thanks for any hints/clarification.
>>>
>>> Stefan
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>> --
>>
>> NEWS:
>> -> GO Mobile - jetzt WebGIS auch auf Smartphones
>> -> Bald OpenSource! SHOGun - das JavaBackend für WebGIS Anwendungen
>>
>>
>> 
>> terrestris GmbH & Co. KG
>> Puetzchens Chaussee 56
>> 53227 Bonn
>> Germany
>>
>> Till Adams
>> Geschaeftsfuehrung
>>
>> Tel:  +49 (0)228 / 962 899-52
>> Mobile:   +49 (0)151 / 25394429
>> Fax:  +49 (0)228 / 962 899-57
>>
>> ad...@terrestris.de
>> http://www.terrestris.de
>> Amtsgericht Bonn, HRA 6835
>> 
>>
>> Komplementaerin:
>>
>> terrestris Verwaltungs GmbH
>>
>> vertreten durch:
>> Hinrich Paulsen, Till Adams
>> ___
>> 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


Re: [mapserver-users] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread Stefan Schwarzer
Thanks so much for the quick responses!

If I understand it correctly, I need to specify "DATAPATTERN" in the MAP part, 
in order to use the parameter in the DATA request:

Doc is saying: LAYER: DATA (must validate against DATAPATTERN)


which would look like this:

SHAPEPATH '/www/xxx/data' 
FONTSET '/www/xxx/htdocs/mod_map/etc/fonts.txt' 
SYMBOLSET '/www/xxx/htdocs/mod_map/etc/symbols.sym' 
DATAPATTERN '^[0-9]'


with the DATA request like:

DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country 
<> %id_country%) AS foo USING UNIQUE gid USING srid=4326"


Hmmm…. But that doesn't work.

msDrawMap(): Image handling error. Failed to draw layer named 
'capitals_mask'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  syntax 
error at or near ")"
LINE 1: ...capitals WHERE capitals.id_country <> %id_country%) AS foo w…


Can you shed some light on it? I am not really familiar with the regular 
expressions. I am just passing an integer.

Thanks for any hints!

Stef




On Aug 21, 2012, at 4:10 PM, Till Adams wrote:

> Stefan,
> 
> from mapserver 6 on you must define the default values for the
> parameters in your metadata-tag and also provide a validation-pattern.
> 
> You'll find more here:
> http://mapserver.org/cgi/runsub.html
> 
> Regards, Till
> 
> 
> 
> On 21.08.2012 16:07, Stefan Schwarzer wrote:
>> Hi there,
>> 
>> I used to pass a parameter in a WMS request in order to specify which 
>> country should be highlighted. The MAPFILE would read that and, via an 
>> EXPRESSION, set all country but the selected one to a bit of opacity:
>> 
>>  DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country 
>> <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
>> 
>> That doesn't work anymore after upgrading our machine. So, I am not 100% 
>> sure if this comes from mapserver, or if there is anything else involved. 
>> But it seems more like a mapserver problem, as the error-message is
>> 
>> 
>> msDrawMap(): Image handling error. Failed to draw layer named 
>> 'capitals_selected'.
>> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
>> syntax error at or near "%"
>> LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
>> ^
>> 
>> msValidateParameter(): Regular expression error. Parameter pattern 
>> validation failed.
>> msValidateParameter(): Regular expression error. Parameter pattern 
>> validation failed.
>> msValidateParameter(): Regular expression error. Parameter pattern 
>> validation failed.
>> msValidateParameter(): Regular expression error. Parameter pattern 
>> validation failed.
>> 
>> 
>> 
>> Thanks for any hints/clarification.
>> 
>> Stefan
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
> 
> -- 
> 
> NEWS:
> -> GO Mobile - jetzt WebGIS auch auf Smartphones
> -> Bald OpenSource! SHOGun - das JavaBackend für WebGIS Anwendungen
> 
> 
> 
> terrestris GmbH & Co. KG
> Puetzchens Chaussee 56
> 53227 Bonn
> Germany
> 
> Till Adams
> Geschaeftsfuehrung
> 
> Tel:  +49 (0)228 / 962 899-52
> Mobile:   +49 (0)151 / 25394429
> Fax:  +49 (0)228 / 962 899-57
> 
> ad...@terrestris.de
> http://www.terrestris.de
> Amtsgericht Bonn, HRA 6835
> 
> 
> Komplementaerin:
> 
> terrestris Verwaltungs GmbH
> 
> vertreten durch:
> Hinrich Paulsen, Till Adams
> ___
> 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] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread Till Adams
Stefan,

from mapserver 6 on you must define the default values for the
parameters in your metadata-tag and also provide a validation-pattern.

You'll find more here:
http://mapserver.org/cgi/runsub.html

Regards, Till



On 21.08.2012 16:07, Stefan Schwarzer wrote:
> Hi there,
> 
> I used to pass a parameter in a WMS request in order to specify which country 
> should be highlighted. The MAPFILE would read that and, via an EXPRESSION, 
> set all country but the selected one to a bit of opacity:
> 
>   DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country 
> <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
> 
> That doesn't work anymore after upgrading our machine. So, I am not 100% sure 
> if this comes from mapserver, or if there is anything else involved. But it 
> seems more like a mapserver problem, as the error-message is
> 
> 
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'capitals_selected'.
> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
> syntax error at or near "%"
> LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
>  ^
>  
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> 
> 
> 
> Thanks for any hints/clarification.
> 
> Stefan
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 

-- 

NEWS:
-> GO Mobile - jetzt WebGIS auch auf Smartphones
-> Bald OpenSource! SHOGun - das JavaBackend für WebGIS Anwendungen



terrestris GmbH & Co. KG
Puetzchens Chaussee 56
53227 Bonn
Germany

Till Adams
Geschaeftsfuehrung

Tel:+49 (0)228 / 962 899-52
Mobile: +49 (0)151 / 25394429
Fax:+49 (0)228 / 962 899-57

ad...@terrestris.de
http://www.terrestris.de
Amtsgericht Bonn, HRA 6835


Komplementaerin:

terrestris Verwaltungs GmbH

vertreten durch:
Hinrich Paulsen, Till Adams
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread thomas bonfort
http://mapserver.org/cgi/runsub.html#validation

On Tue, Aug 21, 2012 at 4:07 PM, Stefan Schwarzer
 wrote:
> Hi there,
>
> I used to pass a parameter in a WMS request in order to specify which country 
> should be highlighted. The MAPFILE would read that and, via an EXPRESSION, 
> set all country but the selected one to a bit of opacity:
>
> DATA "the_geom FROM (SELECT xxx FROM capitals WHERE 
> capitals.id_country <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
>
> That doesn't work anymore after upgrading our machine. So, I am not 100% sure 
> if this comes from mapserver, or if there is anything else involved. But it 
> seems more like a mapserver problem, as the error-message is
>
> 
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'capitals_selected'.
> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  
> syntax error at or near "%"
> LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
>  ^
>
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation 
> failed.
> 
>
>
> Thanks for any hints/clarification.
>
> Stefan
> ___
> 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] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

2012-08-21 Thread Stefan Schwarzer
Hi there,

I used to pass a parameter in a WMS request in order to specify which country 
should be highlighted. The MAPFILE would read that and, via an EXPRESSION, set 
all country but the selected one to a bit of opacity:

DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country 
<> %id_country%) AS foo USING UNIQUE gid USING srid=4326"

That doesn't work anymore after upgrading our machine. So, I am not 100% sure 
if this comes from mapserver, or if there is anything else involved. But it 
seems more like a mapserver problem, as the error-message is


msDrawMap(): Image handling error. Failed to draw layer named 
'capitals_selected'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  syntax 
error at or near "%"
LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
 ^
 
msValidateParameter(): Regular expression error. Parameter pattern validation 
failed.
msValidateParameter(): Regular expression error. Parameter pattern validation 
failed.
msValidateParameter(): Regular expression error. Parameter pattern validation 
failed.
msValidateParameter(): Regular expression error. Parameter pattern validation 
failed.



Thanks for any hints/clarification.

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


[mapserver-users] show label text in class object

2012-08-21 Thread sharad
 I have create dynamic layer in mapObject and set class  properties as
following

mapObj bMap=Session["baseMap"] as mapObj;
//create dynamic layer
layerObj lyrObj = new layerObj(bMap);
lyrObj.status = mapscript.MS_ON;
lyrObj.connectiontype = MS_CONNECTION_TYPE.MS_OGR;
lyrObj.connection = "roadline.shp";
lyrObj.name = "testDynLayer";
lyrObj.type = MS_LAYER_TYPE.MS_LAYER_LINE;
lyrObj.data = "SELECT * FROM roadline LEFT JOIN
'D:\\TEST\\MapFile\\test.csv'.test ON roadline.KMCROAD_ID =
test.SELECTEDCODE";
lyrObj.labelitem = "RESPONDENTNAME";
   
  //create first class
   classObj newclass = new classObj(lyrObj);
newclass.name = "Dynamic Layer"; 
newclass.setText("'[DESCRIPTIO]'");
newclass.label.color = new colorObj(100, 100, 100, 20);

styleObj style = new styleObj(newclass);
colorObj clrObj = new colorObj(255, 0, 255, 20);
style.color = clrObj;

  //create second class using expression
classObj newclass1 = new classObj(lyrObj);
newclass1.name = "Dynamic Layer1";
newclass1.setExpression("[QNRCODE]=137");
newclass1.setText("'[QNRCODE]'"); //this doesnot work
newclass1.label.color = new colorObj(100, 100, 100, 20);   
styleObj style1 = new styleObj(newclass1);  
style1.color = new colorObj(0, 225, 255, 20);

labelObj lablObj1 = newclass1.label;
lablObj1.type = MS_FONT_TYPE.MS_TRUETYPE;
lablObj1.font = "verdana";
lablObj1.color = new colorObj(150, 150, 150, 20);
lablObj1.size = 6;
lablObj1.position = (int)MS_POSITIONS_ENUM.MS_AUTO;
lablObj1.buffer = 4;

imageObj img = bMap.draw();

string session_Id = Session.SessionID;
String loginDateString = (String)Session["LOGINDATE"];

img.save(Server.MapPath("MapImages/" + loginDateString + "/bM_" +
session_Id + ".png"), bMap);
//display maps 
ibMap.ImageUrl = "MapImages/" + loginDateString + "/bM_" +
session_Id + ".png?id=" + DateTime.Now.Ticks;
//legTest.ImageUrl = "MapImages/" + loginDateString + "/lg_" +
session_Id + ".png";

SetLayerSelectionTree(bMap);

Session["baseMap"] = bMap;


this code generates the dynamic layer  and adddt into the base map. all
other setting works perfectly but no layer label is displayed. what is the
problem? please suggest.

regards
sharad



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/show-label-text-in-class-object-tp4996605.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] SDE connection with MS4W

2012-08-21 Thread Michele De Santis
Hello,



I'm trying to connect Mapserver with SDE in MS4W. I followed the 
README-sde.txt to Enable SDE 9.1, 9.2, 9.3 Support in MS4W's MapServer.





This is my Layer:



LAYER

NAME PSITDATA.COMUNI

TYPE POLYGON

CONNECTIONTYPE PLUGIN

CONNECTION "host,port:1521,DBNAME,UN,PW"

PLUGIN "C:/ms4w/Apache/cgi-bin/msplugin_sde_92.dll"

DATA "PSITDATA.COMUNI,SHAPE,sde.DEFAULT"

CLASS

STYLE

OUTLINECOLOR 0 0 0

COLOR 0 128 128

END

END

METADATA

  "wms_title""PSITDATA.COMUNI"

  #"wms_srs" "EPSG:26591"

  "wms_srs"  "EPSG:32633"  

  "wms_name""PSITDATA.COMUNI"

  "wms_server_version"  "1.1.1"

  "wms_format"  "image/png"

  "wms_enable_request" "*"   ##necessary

END

PROJECTION 

  "init=epsg:32633"

END

END





but in the MapServer errors log I can see the following lines:



msGetSymbol(): General error message. Can't load requested dynamic library: 
C:/ms4w/Apache/cgi-bin/msplugin_sde_92.dll

loadCustomLayerDLL: General error message. Failed to load dynamic Layer LIB: 
C:/ms4w/Apache/cgi-bin/msplugin_sde_92.dll



Can anyone help me please!





Thanks in advance.



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