Re: [mapserver-users] Remove CLUSTER definition

2016-02-16 Thread Moretti Edmar
I solved the problem of CLUSTER removal with the following code :

$layer->updatefromstring("LAYER CLUSTER END END");

Here is an example of the operation :

https://youtu.be/UtlvTWyoH2M

2016-02-03 23:14 GMT-02:00 Moretti Edmar :

> I used your suggestion but did not work as expected.
> I used PHP to create the cluster on a Layer. After creation, the mapfile
> contains the code:
>
> CLUSTER
>   MAXDISTANCE 5
>   REGION "rectangle"
>   GROUP ('[TIPO]')
> END # CLUSTER
>
> After applying your sugestion, the mapfile looks like
>
> CLUSTER
>   REGION ""
> END # CLUSTER
>
> but the Cluster still remains, now with the default values
>
> My PHP to remove cluster:
>
> $cluster->setFilter(NULL);
> $cluster->setGroup(NULL);
> $cluster->maxdistance = 10;
> $cluster->region = NULL;
>
> Any idea?
>
> Thank you for your help.
>
> 2016-02-02 13:30 GMT-02:00 Tamas Szekeres :
>
>> Looks like you need to set the following default parameters to prevent
>> from writing to the mapfile:
>>
>>   cluster->maxdistance == 10 &&
>>   cluster->buffer == 0.0 &&
>>   cluster->region == NULL &&
>>   cluster->group.string == NULL &&
>>   cluster->filter.string == NULL
>>
>> Best regards,
>>
>> Tamas
>>
>>
>>
>> 2016-02-02 13:48 GMT+01:00 Moretti Edmar :
>>
>>> How do I remove the CLUSTER definition of a mapfile using PHP-MapScript?
>>> I try to use the code below, but without success
>>>
>>> $cluster = $layer->cluster;
>>> $cluster->updateFromString("GROUP END");
>>>
>>> --
>>> Para tirar dúvidas sobre o i3Geo utilize a lista:
>>> https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo
>>>
>>> Edmar Moretti
>>> http://www.edmarmoretti.com.br
>>> Skype: edmar.moretti
>>> gTalk: edmar.moretti
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>
>
> --
> Para tirar dúvidas sobre o i3Geo utilize a lista:
> https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo
>
> Edmar Moretti
> http://www.edmarmoretti.com.br
> Skype: edmar.moretti
> gTalk: edmar.moretti
>



-- 
Para tirar dúvidas sobre o i3Geo utilize a lista:
https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo

Edmar Moretti
http://www.edmarmoretti.com.br
Skype: edmar.moretti
gTalk: edmar.moretti
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Inconsistance between display and data

2016-02-16 Thread jeansomers
Hi,
I'm one of two base map administrators for a MapServer web-based
application.

We're regularly integrating new base map data, from reception through
quality check to real integration.

A while ago, I noticed a base map inconsistance: the map displayed a railway
following the coast in a small peninsula.

I can tell there is no railway there, I already went to the place. That's
the beginning.

So I asked for a correction from the regional administrator, which delivered
me a new version of the local data.

I checked a last time and discovered that the railway was still on the
MapServer application.

I loaded the original data in QGIS,  applied the usual symbology : no
railway.
I checked the attributes: no railway values in the symbology field.

My colleague suggested it came from an overlapping data: we checked the tile
indexes of neighbouring data; none was overlapping on the railway tracks.

There we are, without a clue about the origin of this inconsistance.

I forgot to mention that we repeatedly deleted application and client caches
inbetween.

So if you have any idea where it can com from, your suggestions are
welcomed.

For your notice, here is the print screen of the issue

 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Inconsistance-between-display-and-data-tp5250812.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 Inconsistance between display and data

2016-02-16 Thread Steve . Toutant
Maybe bad layer projection parameters ...
This railway might no be in the projection you think it is





jeansomers @lists.osgeo.org 
Envoyé par : "mapserver-users" 
2016-02-16 08:15

A
mapserver-users@lists.osgeo.org
cc

Objet
[mapserver-users] Inconsistance between display and data








Hi,
I'm one of two base map administrators for a MapServer web-based
application.

We're regularly integrating new base map data, from reception through
quality check to real integration.

A while ago, I noticed a base map inconsistance: the map displayed a 
railway
following the coast in a small peninsula.

I can tell there is no railway there, I already went to the place. That's
the beginning.

So I asked for a correction from the regional administrator, which 
delivered
me a new version of the local data.

I checked a last time and discovered that the railway was still on the
MapServer application.

I loaded the original data in QGIS,  applied the usual symbology : no
railway.
I checked the attributes: no railway values in the symbology field.

My colleague suggested it came from an overlapping data: we checked the 
tile
indexes of neighbouring data; none was overlapping on the railway tracks.

There we are, without a clue about the origin of this inconsistance.

I forgot to mention that we repeatedly deleted application and client 
caches
inbetween.

So if you have any idea where it can com from, your suggestions are
welcomed.

For your notice, here is the print screen of the issue

 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Inconsistance-between-display-and-data-tp5250812.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 Inconsistance between display and data

2016-02-16 Thread jeansomers
I'm actually beyond projection, I don't even know which data this railway
refers to!

On Tue, 16 Feb 2016 at 14:36 Steve.Toutant [via OSGeo.org] <
ml-node+s1560n525081...@n6.nabble.com> wrote:

> Maybe bad layer projection parameters ...
> This railway might no be in the projection you think it is
>
>
>
>
> *jeansomers <[hidden email]
> >@lists.osgeo.org
> *
> Envoyé par : "mapserver-users" <[hidden email]
> >
>
> 2016-02-16 08:15
>
> A
> [hidden email] 
>
> cc
> Objet
> [mapserver-users] Inconsistance between display and data
>
>
>
>
>
>
> Hi,
> I'm one of two base map administrators for a MapServer web-based
> application.
>
> We're regularly integrating new base map data, from reception through
> quality check to real integration.
>
> A while ago, I noticed a base map inconsistance: the map displayed a
> railway
> following the coast in a small peninsula.
>
> I can tell there is no railway there, I already went to the place. That's
> the beginning.
>
> So I asked for a correction from the regional administrator, which
> delivered
> me a new version of the local data.
>
> I checked a last time and discovered that the railway was still on the
> MapServer application.
>
> I loaded the original data in QGIS,  applied the usual symbology : no
> railway.
> I checked the attributes: no railway values in the symbology field.
>
> My colleague suggested it came from an overlapping data: we checked the
> tile
> indexes of neighbouring data; none was overlapping on the railway tracks.
>
> There we are, without a clue about the origin of this inconsistance.
>
> I forgot to mention that we repeatedly deleted application and client
> caches
> inbetween.
>
> So if you have any idea where it can com from, your suggestions are
> welcomed.
>
> For your notice, here is the print screen of the issue
>
> 
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Inconsistance-between-display-and-data-tp5250812.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> [hidden email] 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> ___
> mapserver-users mailing list
> [hidden email] 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.x6.nabble.com/Inconsistance-between-display-and-data-tp5250812p5250815.html
> To unsubscribe from Inconsistance between display and data, click here
> 
> .
> NAML
> 
>
-- 
*SOMERS Jean*

jean.somers@gmailcom
+33 6 26 34 59 96

*Skype:* jeansomers
*LinkedIn:* https://fr.linkedin.com/pub/*jean*-*somers*/4b/9b2/42b




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Re-RE-Inconsistance-between-display-and-data-tp5250817.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] How Interval is defined for WMS-T

2016-02-16 Thread Yves Jacolin
Hello,

I have a WMS-T layer. The datasource is in a postgis layer. The SQL request
send by MapServer is something like this:

("timestamp" between date_trunc('second',timestamp
'2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp
'2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1 second')

I understand the + interval '1 second' - interval '1second', but I can't
understand how the first interval resolution come from, see [1].

I guess this is calculated from wms_timedefault or wms_timeextent. Here my
METADATA LAYER of my mapfile:

"wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"
"wms_timeitem" "timestamp"
"wms_timedefault" "2016-02-16T23:20"

Any idea how I can "force" the interval resolution to minute?

Thanks,

Y.
[1]
https://github.com/mapserver/mapserver/blob/branch-7-0/mappostgis.c#L3389
-- 
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel (France) : +33 4 58 48 20 43 (new !)
Tel (Suisse) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81

Mail : yves.jaco...@camptocamp.com
http://www.camptocamp.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] How Interval is defined for WMS-T

2016-02-16 Thread Even Rouault
Le mardi 16 février 2016 15:21:17, Yves Jacolin a écrit :
> Hello,
> 
> I have a WMS-T layer. The datasource is in a postgis layer. The SQL request
> send by MapServer is something like this:
> 
> ("timestamp" between date_trunc('second',timestamp
> '2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp
> '2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1 second')
> 
> I understand the + interval '1 second' - interval '1second', but I can't
> understand how the first interval resolution come from, see [1].
> 
> I guess this is calculated from wms_timedefault or wms_timeextent. Here my
> METADATA LAYER of my mapfile:
> 
> "wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"
> "wms_timeitem" "timestamp"
> "wms_timedefault" "2016-02-16T23:20"
> 
> Any idea how I can "force" the interval resolution to minute?

Yves,

The resolution comes from the value of time parameter passed in the WMS 
request (or the timedefault value if time is not specified). To get a one 
minute resolution, the time parameter must be expressed in minutes. This is 
actually explained in http://mapserver.org/ogc/wms_time.html ( "Interpreting 
Time Values", "Exceptions to this rule")

AFAICS there's no way to override that currently (although it might 
potentially be desirable, for example by taking into account the resolution in 
the timeextent syntax)

One workaround to indicate the intent to the client is to specify 
"wms_timeformat". Although it doesn't seem to work properly currently, ie if 
you specify "-MM-DDTHH:MM", a value with seconds will be accepted as 
validating the beginning of the pattern. Hum looks like a bug.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] How Interval is defined for WMS-T

2016-02-16 Thread thomas bonfort
Even,
I'm not sure I agree with your conclusion.

I think the intention would be to write

timecol between time0 and time0+resolution

which translates to:

time0<=timecol<=time0+resolution

whereas we want:

time0<=timecol
wrote:

> Le mardi 16 février 2016 15:21:17, Yves Jacolin a écrit :
> > Hello,
> >
> > I have a WMS-T layer. The datasource is in a postgis layer. The SQL
> request
> > send by MapServer is something like this:
> >
> > ("timestamp" between date_trunc('second',timestamp
> > '2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp
> > '2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1 second')
> >
> > I understand the + interval '1 second' - interval '1second', but I can't
> > understand how the first interval resolution come from, see [1].
> >
> > I guess this is calculated from wms_timedefault or wms_timeextent. Here
> my
> > METADATA LAYER of my mapfile:
> >
> > "wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"
> > "wms_timeitem" "timestamp"
> > "wms_timedefault" "2016-02-16T23:20"
> >
> > Any idea how I can "force" the interval resolution to minute?
>
> Yves,
>
> The resolution comes from the value of time parameter passed in the WMS
> request (or the timedefault value if time is not specified). To get a one
> minute resolution, the time parameter must be expressed in minutes.
>  This is
> actually explained in http://mapserver.org/ogc/wms_time.html (
> "Interpreting
> Time Values", "Exceptions to this rule")
>
> AFAICS there's no way to override that currently (although it might
> potentially be desirable, for example by taking into account the
> resolution in
> the timeextent syntax)
>
> One workaround to indicate the intent to the client is to specify
> "wms_timeformat". Although it doesn't seem to work properly currently, ie
> if
> you specify "-MM-DDTHH:MM", a value with seconds will be accepted as
> validating the beginning of the pattern. Hum looks like a bug.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.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] How Interval is defined for WMS-T

2016-02-16 Thread Even Rouault
Le mardi 16 février 2016 15:54:20, thomas bonfort a écrit :
> Even,
> I'm not sure I agree with your conclusion.

Which one ;-) ? 
I agree with your below analysis that there's a bug for resolution=second but 
my points were a bit different :
- the resolution selected is derived from the value of user specified time 
parameter
- there is apparently a bug in the way wms_timeformat enforces the specified 
formats (I've tried to set it to "-MM-DD HH:MM", but values matching 
"-MM-DD HH:MM:SS" are also accepted)

> 
> I think the intention would be to write
> 
> timecol between time0 and time0+resolution
> 
> which translates to:
> 
> time0<=timecol<=time0+resolution
> 
> whereas we want:
> 
> time0<=timecol 
> thus the hack to use time0+resolution-1second which is clearly incorrect
> when the desired resolution is the second (and somewhat incorrect for the
> other resolutions)
> 
> 
> I'd say this is a bug.


> 
> --
> thomas
> 
> On 16 February 2016 at 15:43, Even Rouault 
> 
> wrote:
> > Le mardi 16 février 2016 15:21:17, Yves Jacolin a écrit :
> > > Hello,
> > > 
> > > I have a WMS-T layer. The datasource is in a postgis layer. The SQL
> > 
> > request
> > 
> > > send by MapServer is something like this:
> > > 
> > > ("timestamp" between date_trunc('second',timestamp
> > > '2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp
> > > '2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1
> > > second')
> > > 
> > > I understand the + interval '1 second' - interval '1second', but I
> > > can't understand how the first interval resolution come from, see [1].
> > > 
> > > I guess this is calculated from wms_timedefault or wms_timeextent. Here
> > 
> > my
> > 
> > > METADATA LAYER of my mapfile:
> > > "wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"
> > > "wms_timeitem" "timestamp"
> > > "wms_timedefault" "2016-02-16T23:20"
> > > 
> > > Any idea how I can "force" the interval resolution to minute?
> > 
> > Yves,
> > 
> > The resolution comes from the value of time parameter passed in the WMS
> > request (or the timedefault value if time is not specified). To get a one
> > minute resolution, the time parameter must be expressed in minutes.
> > 
> >  This is
> > 
> > actually explained in http://mapserver.org/ogc/wms_time.html (
> > "Interpreting
> > Time Values", "Exceptions to this rule")
> > 
> > AFAICS there's no way to override that currently (although it might
> > potentially be desirable, for example by taking into account the
> > resolution in
> > the timeextent syntax)
> > 
> > One workaround to indicate the intent to the client is to specify
> > "wms_timeformat". Although it doesn't seem to work properly currently, ie
> > if
> > you specify "-MM-DDTHH:MM", a value with seconds will be accepted as
> > validating the beginning of the pattern. Hum looks like a bug.
> > 
> > Even
> > 
> > --
> > Spatialys - Geospatial professional services
> > http://www.spatialys.com
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] How Interval is defined for WMS-T

2016-02-16 Thread Yves Jacolin
Hello,

Thanks both of you. It seems that, finally, the client request was incorrect as 
it uses TIME value with second resolution.

I agree with Thomas about the bug for those who want to get second time 
resolution this won't work.

Y.
On Tuesday, February 16, 2016 15:54:20 thomas bonfort wrote:
> Even,
> I'm not sure I agree with your conclusion.
> 
> I think the intention would be to write
> 
> timecol between time0 and time0+resolution
> 
> which translates to:
> 
> time0<=timecol<=time0+resolution
> 
> whereas we want:
> 
> time0<=timecol 
> thus the hack to use time0+resolution-1second which is clearly incorrect
> when the desired resolution is the second (and somewhat incorrect for the
> other resolutions)
> 
> 
> I'd say this is a bug.
> 
> --
> thomas
> 
> On 16 February 2016 at 15:43, Even Rouault 
> 
> wrote:
> > Le mardi 16 février 2016 15:21:17, Yves Jacolin a écrit :
> > > Hello,
> > > 
> > > I have a WMS-T layer. The datasource is in a postgis layer. The SQL
> > 
> > request
> > 
> > > send by MapServer is something like this:
> > > 
> > > ("timestamp" between date_trunc('second',timestamp
> > > '2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp
> > > '2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1 second')
> > > 
> > > I understand the + interval '1 second' - interval '1second', but I can't
> > > understand how the first interval resolution come from, see [1].
> > > 
> > > I guess this is calculated from wms_timedefault or wms_timeextent. Here
> > 
> > my
> > 
> > > METADATA LAYER of my mapfile:
> > > "wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"
> > > "wms_timeitem" "timestamp"
> > > "wms_timedefault" "2016-02-16T23:20"
> > > 
> > > Any idea how I can "force" the interval resolution to minute?
> > 
> > Yves,
> > 
> > The resolution comes from the value of time parameter passed in the WMS
> > request (or the timedefault value if time is not specified). To get a one
> > minute resolution, the time parameter must be expressed in minutes.
> > 
> >  This is
> > 
> > actually explained in http://mapserver.org/ogc/wms_time.html (
> > "Interpreting
> > Time Values", "Exceptions to this rule")
> > 
> > AFAICS there's no way to override that currently (although it might
> > potentially be desirable, for example by taking into account the
> > resolution in
> > the timeextent syntax)
> > 
> > One workaround to indicate the intent to the client is to specify
> > "wms_timeformat". Although it doesn't seem to work properly currently, ie
> > if
> > you specify "-MM-DDTHH:MM", a value with seconds will be accepted as
> > validating the beginning of the pattern. Hum looks like a bug.
> > 
> > Even
> > 
> > --
> > Spatialys - Geospatial professional services
> > http://www.spatialys.com
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users

-- 
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel (France) : +33 4 58 48 20 43 (new !)
Tel (Suisse) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81
Mail : yves.jaco...@camptocamp.com
http://www.camptocamp.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] RE Inconsistance between display and data

2016-02-16 Thread Brent Fraser

Perhaps the data is mis-classified?  How is the symbol assigned to the data?

Best Regards,
Brent Fraser

On 2/16/2016 6:38 AM, jeansomers wrote:
I'm actually beyond projection, I don't even know which data this 
railway refers to!


On Tue, 16 Feb 2016 at 14:36 Steve.Toutant [via OSGeo.org] <[hidden 
email] > wrote:


Maybe bad layer projection parameters ...
This railway might no be in the projection you think it is




*jeansomers <[hidden email]
>@lists.osgeo.org
*
Envoyé par : "mapserver-users" <[hidden email]
>

2016-02-16 08:15


A
[hidden email]

cc

Objet
[mapserver-users] Inconsistance between display and data











Hi,
I'm one of two base map administrators for a MapServer web-based
application.

We're regularly integrating new base map data, from reception through
quality check to real integration.

A while ago, I noticed a base map inconsistance: the map displayed
a railway
following the coast in a small peninsula.

I can tell there is no railway there, I already went to the place.
That's
the beginning.

So I asked for a correction from the regional administrator, which
delivered
me a new version of the local data.

I checked a last time and discovered that the railway was still on the
MapServer application.

I loaded the original data in QGIS,  applied the usual symbology : no
railway.
I checked the attributes: no railway values in the symbology field.

My colleague suggested it came from an overlapping data: we
checked the tile
indexes of neighbouring data; none was overlapping on the railway
tracks.

There we are, without a clue about the origin of this inconsistance.

I forgot to mention that we repeatedly deleted application and
client caches
inbetween.

So if you have any idea where it can com from, your suggestions are
welcomed.

For your notice, here is the print screen of the issue





--
View this message in context:

http://osgeo-org.1560.x6.nabble.com/Inconsistance-between-display-and-data-tp5250812.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
[hidden email] 
http://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
[hidden email]

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


If you reply to this email, your message will be added to the
discussion below:

http://osgeo-org.1560.x6.nabble.com/Inconsistance-between-display-and-data-tp5250812p5250815.html

To unsubscribe from Inconsistance between display and data, click
here.
NAML




--
*SOMERS Jean*

jean.somers@gmailcom
+33 6 26 34 59 96

_Skype:_ jeansomers
_LinkedIn:_ https://fr.linkedin.com/pub/*jean*-*somers*/4b/9b2/42b


View this message in context: Re: RE Inconsistance between display and 
data 

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] Mapserver 7 expression

2016-02-16 Thread Steve . Toutant
Following this documentation 
http://mapserver.org/fr/mapfile/expressions.html#list-expressions
I created the class expression
EXPRESSION {pluie,bruine verglacante }

My problem is that this expression return true when the string attribute 
is "pluie verglacante"

I would expect only "pluie" and "bruine verglacante" to be catched by this 
expression...
How does list expressions work?
thanks


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

[mapserver-users] RE Mapserver 7 expression

2016-02-16 Thread Steve . Toutant
And this EXPRESSION {pluie,bruine}
will be true for this string attribute "pluie verglaçante"

It seems that there is a problem when there is a space in the string 
attribute





steve.tout...@inspq.qc.ca@lists.osgeo.org 
Envoyé par : "mapserver-users" 
2016-02-16 14:57

A
mapserver-users@lists.osgeo.org
cc

Objet
[mapserver-users] Mapserver 7 expression








Following this documentation 
http://mapserver.org/fr/mapfile/expressions.html#list-expressions 
I created the class expression 
EXPRESSION {pluie,bruine verglacante } 

My problem is that this expression return true when the string attribute 
is "pluie verglacante" 

I would expect only "pluie" and "bruine verglacante" to be catched by this 
expression... 
How does list expressions work? 
thanks 
___
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 Mapserver 7 expression

2016-02-16 Thread Stephen Woodbridge


Use EXPRESION ("column" ~* "^(pluie|bruine)$")

instead

~  case sensitive
~* case insensitive
^  start of string
$  end of string

So this matches exactly: "pluie" or "bruine" but not "pluie ..."

-Steve W

On 2/16/2016 3:01 PM, steve.tout...@inspq.qc.ca wrote:

And this EXPRESSION {pluie,bruine}
will be true for this string attribute "pluie verglaçante"

It seems that there is a problem when there is a space in the string
attribute




*steve.tout...@inspq.qc.ca@lists.osgeo.org*
Envoyé par : "mapserver-users" 

2016-02-16 14:57


A
mapserver-users@lists.osgeo.org
cc

Objet
[mapserver-users] Mapserver 7 expression










Following this documentation
_http://mapserver.org/fr/mapfile/expressions.html#list-expressions_
I created the class expression
EXPRESSION {pluie,bruine verglacante }

My problem is that this expression return true when the string attribute
is "pluie verglacante"

I would expect only "pluie" and "bruine verglacante" to be catched by
this expression...
How does list expressions work?
thanks
___
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




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

Re: [mapserver-users] RE Mapserver 7 expression

2016-02-16 Thread Eichner, Andreas - SID
This seems to be a bug. Each list item is compared to the filter item using 
strncmp() but it is not checked if it is the whole string. (see 
https://github.com/mapserver/mapserver/blob/157fa474ff8748ec42652f49dc4e2be4ca89042e/maputil.c#L490)
 So the result of the list expression is true if any item in the list is a 
_prefix_ of the filter item. 

So line 490 should probably read:
if(!strncmp(start,shape->values[itemindex],end-start) && 
shape->values[itemindex][end-start] == '\0') return MS_TRUE;

You might file a bug report for this.

HTH


> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von steve.tout...@inspq.qc.ca
> Gesendet: Dienstag, 16. Februar 2016 21:02
> An: mapserver-users@lists.osgeo.org; mapserver-users
> Betreff: [mapserver-users] RE Mapserver 7 expression
> 
> And this EXPRESSION {pluie,bruine}
> will be true for this string attribute "pluie verglaçante"
> 
> It seems that there is a problem when there is a space in the string
> attribute
> 
> 
> 
> 
> 
> 
> steve.tout...@inspq.qc.ca@lists.osgeo.org
> Envoyé par : "mapserver-users" 
> 
> 2016-02-16 14:57 A
> mapserver-users@lists.osgeo.org
> cc
> Objet
> [mapserver-users] Mapserver 7 expression
> 
> 
> 
> 
> 
> 
> 
> 
> Following this documentation
> http://mapserver.org/fr/mapfile/expressions.html#list-expressions
> 
> I created the class expression
> EXPRESSION {pluie,bruine verglacante }
> 
> My problem is that this expression return true when the string attribute
> is "pluie verglacante"
> 
> I would expect only "pluie" and "bruine verglacante" to be catched by this
> expression...
> How does list expressions work?
> thanks
> ___
> 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