[mapserver-users] FILTER and multi STYLE tags

2020-01-24 Thread Kalbermatten Michaël


I will try out a newer version on Monday. I will keep you updated.



I detected the problem using a 7.2 version and then updated to 7.4.2, but the 
problem was still occurring.



Thanks for your reply !



Michael


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

Re: [mapserver-users] FILTER and multi STYLE tags

2020-01-24 Thread Steve Lime
You have to get a little more recent... Those changes didn't appear until
7.4.3. --Steve

On Fri, Jan 24, 2020 at 2:27 AM Kalbermatten Michaël <
michael.kalbermat...@ne.ch> wrote:

> Hi Steve,
>
>
>
> Thanks for the quick answer and sorry for my late reply.
>
>
>
> I downloaded the latest stable release which can be found on the
> gisinternals website. On the 17th January 2020, that would have been
> release-1900-x64-gdal-3-0-2-mapserver-7-4-2, which I think is the latest
> release. Should I try out a daily release ? or where the changes you are
> talking about already included in release 7.4.2?
>
>
>
> Michael
>
>
>
>
>
> > Hi Michaël: What version are you using? There were some fixes related to
>
> > rendering queries in the latest 7.4 release.
>
> >
>
> > —Steve
>
> >
>
> > On Friday, January 17, 2020, Kalbermatten Michaël <
>
> > Michael.Kalbermatten at ne.ch>> wrote:
>
> >
>
> >> Dear all,
>
> >>
>
> >>
>
> >>
>
> >> We have quite a strange filter behavior.
>
> >>
>
> >>
>
> >>
>
> >> We have a layer (relying on PostGIS data and  with multine geometries)
>
> >> containing several classes with some of them having multiple STYLE tags.
>
> >> Something like:
>
> >>
>
> >>
>
> >>
>
> >> CLASS
>
> >>
>
> >> NAME "Ouvrages d'art"
>
> >>
>
> >> EXPRESSION "Ouvrages d'art"
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 255 141 0
>
> >>
>
> >> WIDTH 8
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> END
>
> >>
>
> >> CLASS
>
> >>
>
> >> NAME "OFROU"
>
> >>
>
> >> EXPRESSION "OFROU"
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 255 0 0
>
> >>
>
> >> WIDTH 8
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 255 141 0
>
> >>
>
> >> WIDTH 2
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> END
>
> >>
>
> >> CLASS
>
> >>
>
> >> NAME "CFF"
>
> >>
>
> >> EXPRESSION "CFF"
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 35 35 35
>
> >>
>
> >> WIDTH 3
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 35 35 35
>
> >>
>
> >> SYMBOL "barre"
>
> >>
>
> >> SIZE 12
>
> >>
>
> >> GAP -10
>
> >>
>
> >> END
>
> >>
>
> >> END
>
> >>
>
> >>
>
> >>
>
> >> A WMS request on this layer will renderer all objects regarding their
>
> >> class, which is the expected behavior.
>
> >>
>
> >>
>
> >>
>
> >> Now, a FILTER tag is applied on this layer, a request which would look
>
> >> like:
>
> >>
>
> >>
>
> >>
>
> >> http://myserver.com/my_mapserver_cgi?SERVICE=WMS
>
> >>
>
> >> =1.3.0
>
> >>
>
> >> =GetMap
>
> >>
>
> >> =image/png
>
> >>
>
> >> =true
>
> >>
>
> >> =rt55_chantiers_futurs
>
> >>
>
> >> =
>
> >>
>
> >> =(http://www.opengis.net/ogc
> ">>><
>
> >> PropertyName>>annee_debut>><
>
> >> Literal>>2021>>><
>
> >>
> Literal>>2021)
>
> >>
>
> >> =EPSG:2056
>
> >>
>
> >> =1925
>
> >>
>
> >> =936
>
> >>
>
> >> =2503325,1194925,2599575,1222975
>
> >>
>
> >>
>
> >>
>
> >> (I removed the URL escaping and made it multiline for readability)
>
> >>
>
> >>
>
> >>
>
> >> This request generates something really strange. Returned features from
>
> >> the server are rendered until Mapserver encounters the first feature
> which
>
> >> corresponds to a class having more than one STYLE tag. All other
> features
>
> >> (coming next regarding the request sent to the PostGIS server) are not
>
> >> rendered any more. Mapserver does not trigger any error, nor does the
>
> >> database. In the mapserver logs:
>
> >>
>
> >>
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].64 CGI Request 1 on process 4228
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].649000 FLTLayerApplyPlainFilterToLayer():
>
> >> ("[annee_debut]" ~* ".*2021.*"), rect=2503325,1194925,2599575,1222975
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): rendering using
>
> >> outputformat named png (AGG/PNG).
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): WMS/WFS set-up and query,
>
> >> 0.000s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Layer 917
>
> >> (rt55_chantiers_futurs), 0.000s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Drawing Label Cache,
> 0.000s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap() total time: 0.003s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].709000 msSaveImage(stdout) total time: 0.051s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].709000 mapserv request processing time
>
> >> (msLoadMap not incl.): 0.069s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].709000 msFreeMap(): freeing map at
>
> >> 0258E99A8030.
>
> >>
>
> >>
>
> >>
>
> >> After playing with the Mapfile and related data for a few hours, we
>
> >> discovered that because we analyzed  the following elements :
>
> >>
>
> >>
>
> >>
>
> >> - The feature order in the database
>
> >>
>
> >> - The STYLE tags in the mapfile classes: making all classes having
>
> >> only one STYLE tag
>
> >>
>
> >>
>
> 

Re: [mapserver-users] multilabelitem

2020-01-24 Thread lars . schylberg
You can do multiple labels in a layer like this, since Mapserver 6.2

https://image.slidesharecdn.com/nouveautesdemapserver6-2-121119075750-phpapp02/95/nouveauts-de-mapserver-62-9-638.jpg

You work with offset for each label.

/Lars S.


24 januari 2020 kl. 10:27, "DESCHAMPS Olivier - DDT 67/STIC/SIG"
 skrev:

> Hello
> 
> I use geomoose 2 and mapserver code
> i want to have 2 labelling on one layer, it is possible ?
> 
> TY
> 
> Oliv
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-24 Thread Johannes Paul
Ok i finally get it !
The error was associated with the layers using the symbol font "park" used
by NPSPICT3.ttf
I changed the symbol font used by these layers and it's working ok now.
It's a shame i couldn't get it clearly from the ms error file...
Thanks a lot to everybody for your precious help !
Jo

Le ven. 24 janv. 2020 à 09:49, Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> a écrit :

> Did you make the test that I suggested to run the same request for
> individual layers instead of the root layer “default”?
>
>
>
> -Jukka-
>
>
>
> *Lähettäjä:* mapserver-users  
> *Puolesta
> *Johannes Paul
> *Lähetetty:* torstai 23. tammikuuta 2020 21.56
> *Vastaanottaja:* Brian 
> *Kopio:* mapserver-users@lists.osgeo.org
> *Aihe:* Re: [mapserver-users] cgi-error: End of script output before
> headers mapserv
>
>
>
> Hi Brian,
>
> I'm not usinage fcgi on my side, and it is not related to file permission
> or bad cgi script.
>
> I've tried to work on my Osm postgis tables, and made the geom valid, like
> Jukka said, but it didn't change anything...
>
> I'm thinking it might be related with Apache MPM prefork module and the
> MaxRequestWorker ?
>
> Keep in touch
>
>
>
>
>
> Le jeu. 23 janv. 2020 à 20:27, Brian  a écrit :
>
> So I have this error as well. I mostly see it when a connection times out.
> Like you mapserver shows no errors but apache has the script ended before
> headers error. Do you have fcgi enabled? If I disable fcgi I don't get that
> error, so It could be related to connection a user has to mapserver. Maybe
> FcgidMaxRequestsPerProcess, FcgidMinProcessesPerClass,
> FcgidMaxProcessesPerClass  need to be tweaked?
>
>
>
> If you do a google search on this error most of the responses says it is
> either due to a bad cgi script or bad file/dir permissions which in our
> case I doubt that is the reason. If you figure it out let me know.
>
>
>
> On Wed, Jan 22, 2020 at 12:31 PM Rahkonen Jukka (MML) <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
> Hi,
>
>
>
> I would suspect data, especially because it seems to be OSM data. Perhaps
> some invalid polygon again.
>
>
>
> You use =default and I suppose that it means all the layers from
> your mapfile together. In that case I would try to catch the failing layer
> by adding layers one by one and in groups (first =layer1, then
> =layer2, then =layer1,layer2).
>
>
>
> Hopefully that way you can find the failing layer, and then because you
> know the BBOX you may find the nasty geometry from the database. Without
> your data and mapfile it is rather useless to make very much guesswork, but
> a small change in bbox may select/not select a bad geometry, of change of
> bbox may change scale so much that source data come from a different table
> if you have a scale dependent layer group in the mapfile etc.
>
>
>
> If the issue is due to bad geometry and you use PostGIS you may find it
> with ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* mapserver-users  
> *Puolesta
> *Johannes Paul
> *Lähetetty:* keskiviikko 22. tammikuuta 2020 13.02
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [mapserver-users] cgi-error: End of script output before headers
> mapserv
>
>
>
> Hello,
>
> my mapserver is having a very strange behaviour, which I can't explain,
> nor debug.
>
> I'm using mapserver 7.0.0 along with apache http server 2.4.6.
>
>
>
> Most of the time, the server is working just fine, i.e. when I request a
> typical URL, I get my image back:
>
>
>
>
> http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.143,38.746,-9.140,38.748=256=256=default=image/png=EPSG:4326=true
>
>
>
> but then, when I slightly change bbox values, I get an internal server
> error (500):
>
>
>
>
> http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.1433,38.7460,-9.1406,38.7487=256=256=default=image/png=EPSG:4326=true
>
>
>
> I don't get any mapserver error log, but I do get an apache error log
> saying:
>
> [cgi:error] End of script output before headers: mapserv
>
>
>
> This is really an strange behaviour which I can't explain.
>
> Did anyone already experienced a similar situation ?
>
> Thanks
>
> Jo
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] multilabelitem

2020-01-24 Thread Géomaticien

Hello

I use geomoose 2 and mapserver code
i want to have 2 labelling on one layer, it is possible ?

TY

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

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-24 Thread Rahkonen Jukka (MML)
Did you make the test that I suggested to run the same request for individual 
layers instead of the root layer “default”?

-Jukka-

Lähettäjä: mapserver-users  Puolesta 
Johannes Paul
Lähetetty: torstai 23. tammikuuta 2020 21.56
Vastaanottaja: Brian 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] cgi-error: End of script output before headers 
mapserv

Hi Brian,
I'm not usinage fcgi on my side, and it is not related to file permission or 
bad cgi script.
I've tried to work on my Osm postgis tables, and made the geom valid, like 
Jukka said, but it didn't change anything...
I'm thinking it might be related with Apache MPM prefork module and the 
MaxRequestWorker ?
Keep in touch


Le jeu. 23 janv. 2020 à 20:27, Brian 
mailto:mulcahy.bri...@gmail.com>> a écrit :
So I have this error as well. I mostly see it when a connection times out. Like 
you mapserver shows no errors but apache has the script ended before headers 
error. Do you have fcgi enabled? If I disable fcgi I don't get that error, so 
It could be related to connection a user has to mapserver. Maybe 
FcgidMaxRequestsPerProcess, FcgidMinProcessesPerClass, 
FcgidMaxProcessesPerClass  need to be tweaked?

If you do a google search on this error most of the responses says it is either 
due to a bad cgi script or bad file/dir permissions which in our case I doubt 
that is the reason. If you figure it out let me know.

On Wed, Jan 22, 2020 at 12:31 PM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

I would suspect data, especially because it seems to be OSM data. Perhaps some 
invalid polygon again.

You use =default and I suppose that it means all the layers from your 
mapfile together. In that case I would try to catch the failing layer by adding 
layers one by one and in groups (first =layer1, then =layer2, 
then =layer1,layer2).

Hopefully that way you can find the failing layer, and then because you know 
the BBOX you may find the nasty geometry from the database. Without your data 
and mapfile it is rather useless to make very much guesswork, but a small 
change in bbox may select/not select a bad geometry, of change of bbox may 
change scale so much that source data come from a different table if you have a 
scale dependent layer group in the mapfile etc.

If the issue is due to bad geometry and you use PostGIS you may find it with 
ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Johannes Paul
Lähetetty: keskiviikko 22. tammikuuta 2020 13.02
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] cgi-error: End of script output before headers mapserv

Hello,
my mapserver is having a very strange behaviour, which I can't explain, nor 
debug.
I'm using mapserver 7.0.0 along with apache http server 2.4.6.

Most of the time, the server is working just fine, i.e. when I request a 
typical URL, I get my image back:

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.143,38.746,-9.140,38.748=256=256=default=image/png=EPSG:4326=true

but then, when I slightly change bbox values, I get an internal server error 
(500):

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.1433,38.7460,-9.1406,38.7487=256=256=default=image/png=EPSG:4326=true

I don't get any mapserver error log, but I do get an apache error log saying:
[cgi:error] End of script output before headers: mapserv

This is really an strange behaviour which I can't explain.
Did anyone already experienced a similar situation ?
Thanks
Jo
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] FILTER and multi STYLE tags

2020-01-24 Thread Kalbermatten Michaël
Hi Steve,

Thanks for the quick answer and sorry for my late reply.

I downloaded the latest stable release which can be found on the gisinternals 
website. On the 17th January 2020, that would have been 
release-1900-x64-gdal-3-0-2-mapserver-7-4-2, which I think is the latest 
release. Should I try out a daily release ? or where the changes you are 
talking about already included in release 7.4.2?

Michael


> Hi Michaël: What version are you using? There were some fixes related to
> rendering queries in the latest 7.4 release.
>
> -Steve
>
> On Friday, January 17, 2020, Kalbermatten Michaël <
> Michael.Kalbermatten at ne.ch>> wrote:
>
>> Dear all,
>>
>>
>>
>> We have quite a strange filter behavior.
>>
>>
>>
>> We have a layer (relying on PostGIS data and  with multine geometries)
>> containing several classes with some of them having multiple STYLE tags.
>> Something like:
>>
>>
>>
>> CLASS
>>
>> NAME "Ouvrages d'art"
>>
>> EXPRESSION "Ouvrages d'art"
>>
>> STYLE
>>
>> COLOR 255 141 0
>>
>> WIDTH 8
>>
>> LINECAP butt
>>
>> END
>>
>> END
>>
>> CLASS
>>
>> NAME "OFROU"
>>
>> EXPRESSION "OFROU"
>>
>> STYLE
>>
>> COLOR 255 0 0
>>
>> WIDTH 8
>>
>> LINECAP butt
>>
>> END
>>
>> STYLE
>>
>> COLOR 255 141 0
>>
>> WIDTH 2
>>
>> LINECAP butt
>>
>> END
>>
>> END
>>
>> CLASS
>>
>> NAME "CFF"
>>
>> EXPRESSION "CFF"
>>
>> STYLE
>>
>> COLOR 35 35 35
>>
>> WIDTH 3
>>
>> LINECAP butt
>>
>> END
>>
>> STYLE
>>
>> COLOR 35 35 35
>>
>> SYMBOL "barre"
>>
>> SIZE 12
>>
>> GAP -10
>>
>> END
>>
>> END
>>
>>
>>
>> A WMS request on this layer will renderer all objects regarding their
>> class, which is the expected behavior.
>>
>>
>>
>> Now, a FILTER tag is applied on this layer, a request which would look
>> like:
>>
>>
>>
>> http://myserver.com/my_mapserver_cgi?SERVICE=WMS
>>
>> =1.3.0
>>
>> =GetMap
>>
>> =image/png
>>
>> =true
>>
>> =rt55_chantiers_futurs
>>
>> =
>>
>> =(http://www.opengis.net/ogc;>>><
>> PropertyName>>annee_debut>><
>> Literal>>2021>>><
>> Literal>>2021)
>>
>> =EPSG:2056
>>
>> =1925
>>
>> =936
>>
>> =2503325,1194925,2599575,1222975
>>
>>
>>
>> (I removed the URL escaping and made it multiline for readability)
>>
>>
>>
>> This request generates something really strange. Returned features from
>> the server are rendered until Mapserver encounters the first feature which
>> corresponds to a class having more than one STYLE tag. All other features
>> (coming next regarding the request sent to the PostGIS server) are not
>> rendered any more. Mapserver does not trigger any error, nor does the
>> database. In the mapserver logs:
>>
>>
>>
>> [Wed Jan 15 08:03:11 2020].64 CGI Request 1 on process 4228
>>
>> [Wed Jan 15 08:03:11 2020].649000 FLTLayerApplyPlainFilterToLayer():
>> ("[annee_debut]" ~* ".*2021.*"), rect=2503325,1194925,2599575,1222975
>>
>> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): rendering using
>> outputformat named png (AGG/PNG).
>>
>> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): WMS/WFS set-up and query,
>> 0.000s
>>
>> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Layer 917
>> (rt55_chantiers_futurs), 0.000s
>>
>> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Drawing Label Cache, 0.000s
>>
>> [Wed Jan 15 08:03:11 2020].658000 msDrawMap() total time: 0.003s
>>
>> [Wed Jan 15 08:03:11 2020].709000 msSaveImage(stdout) total time: 0.051s
>>
>> [Wed Jan 15 08:03:11 2020].709000 mapserv request processing time
>> (msLoadMap not incl.): 0.069s
>>
>> [Wed Jan 15 08:03:11 2020].709000 msFreeMap(): freeing map at
>> 0258E99A8030.
>>
>>
>>
>> After playing with the Mapfile and related data for a few hours, we
>> discovered that because we analyzed  the following elements :
>>
>>
>>
>> - The feature order in the database
>>
>> - The STYLE tags in the mapfile classes: making all classes having
>> only one STYLE tag
>>
>>
>>
>> Thus, if a use these classes:
>>
>>
>>
>> CLASS
>>
>> NAME "Ouvrages d'art"
>>
>> EXPRESSION "Ouvrages d'art"
>>
>> STYLE
>>
>> COLOR 255 141 0
>>
>> WIDTH 8
>>
>> LINECAP butt
>>
>> END
>>
>> END
>>
>> CLASS
>>
>> NAME "OFROU"
>>
>> EXPRESSION "OFROU"
>>
>> STYLE
>>
>> COLOR 255 0 0
>>
>> WIDTH 8
>>
>> LINECAP butt
>>
>> END
>>
>> END
>>
>> CLASS
>>
>> NAME "CFF"
>>
>> EXPRESSION "CFF"
>>
>> STYLE
>>
>> COLOR 35 35 35
>>
>> WIDTH 3
>>
>> LINECAP butt
>>
>> END
>>
>> END
>>
>>
>>
>> Then everything works as expected (using a filter tag in the request), and
>> all features are rendered by Mapserver.
>>
>>
>>
>> Moreover it is not a DB issue, because if you send a WFS request using
>> exactly the same layer definition and the same filter to Mapserver, then
>> everything is working as expected (all expected features are returned).
>>
>>
>>
>> This really