Re: [mapserver-users] Filtering NULL values from Postgis Layer in Mapserver 7

2016-08-16 Thread Eichner, Andreas - SID
Hello Marco,

in MapServer expressions you cannot test for NULL values and the NATIVE_FITLER 
processing key does not support runtime substitutions. You could try to use a 
sub-select directly in the DATA as described in 
http://mapserver.org/input/vector/postgis.html#table-of-contents 

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von deduikertjes
> Gesendet: Dienstag, 16. August 2016 12:54
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] Filtering NULL values from Postgis Layer in
> Mapserver 7
> 
> Hi,
> 
> In mapserver 6 I use the following to filter out records containing NULL
> values in a Postgis layer (I am using runtime substitution for MY_VAR1 and
> MY_VAR2):
> 
> FILTER (NOT (%MY_VAR1% IS NULL OR %MY_VAR2% IS NULL))
> 
> This is working fine, but doesn't work in mapserver 7 anymore as
> documented
> in  http://mapserver.org/MIGRATION_GUIDE.html#mapserver-6-4-to-7-0-
> migration
> 
> According to that page I have to write the FILTER statement in the
> MapServer
> expression syntax.
> 
> So now I'm trying to do so but I am not winning. I cannot find a way to
> properly detect NULL values using MapServer expression syntax. Is there
> any
> way writing such a filter without using a PROCESSING 'NATIVE_FILTER='
> construct?
> 
> Any help greatly appreciated, MArco
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-
> org.1560.x6.nabble.com/Filtering-NULL-values-from-Postgis-Layer-in-
> Mapserver-7-tp5280893.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] problem in wms service

2016-08-16 Thread Jeff McKenna

Hello,

I would first be sure to use the 'shp2img' commandline utility to 
confirm that a valid map image is generated by your mapfile.  Once you 
have that map working through shp2img, then move to test your mapfile 
through WMS, and most importantly generating a GetCapabilities request. 
Be sure to review the GetCapabilities response, and remove any "WARNING" 
messages.  Once you have a GetCapabilities response with no warnings, 
then you can test with a GetMap request.


-jeff

--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-08-16 4:07 AM, Ahmet Temiz wrote:

Hi,

I am testing my wms, postgis layer it works with QUERY_STRING but not
displays anything with curl and QGIS.





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

[mapserver-users] Filtering NULL values from Postgis Layer in Mapserver 7

2016-08-16 Thread deduikertjes
Hi,

In mapserver 6 I use the following to filter out records containing NULL
values in a Postgis layer (I am using runtime substitution for MY_VAR1 and
MY_VAR2):

FILTER (NOT (%MY_VAR1% IS NULL OR %MY_VAR2% IS NULL)) 

This is working fine, but doesn't work in mapserver 7 anymore as documented
in  http://mapserver.org/MIGRATION_GUIDE.html#mapserver-6-4-to-7-0-migration
  
According to that page I have to write the FILTER statement in the MapServer
expression syntax.

So now I'm trying to do so but I am not winning. I cannot find a way to
properly detect NULL values using MapServer expression syntax. Is there any
way writing such a filter without using a PROCESSING 'NATIVE_FILTER='
construct?

Any help greatly appreciated, MArco




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Filtering-NULL-values-from-Postgis-Layer-in-Mapserver-7-tp5280893.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] problem in wms service

2016-08-16 Thread Yves Jacolin
Yes, I think map.extent is used for MapServer CGI Template not for MapServer 
WMS Request which uses BBOX parameter. As you are using WMS service, 
map.extent is useless.

Y.

On Tuesday, August 16, 2016 11:37:00 Ahmet Temiz wrote:
> thank you ,
> 
> I noticed later I have missed specifying host in CONNECTION <  CONNECTION
> "host=localhost  
> Do you say map.extent is redundant code and  BBOX is doing same ?
> 
> regards
> 
> On Tue, Aug 16, 2016 at 10:37 AM, Yves Jacolin 
> wrote:
> > Ok, I suppose that your working test shows something in the picture?
> > 
> > I suggest to enable log in your mapfile and check it after running again
> > your
> > not working example.
> > 
> > "map.extent=2588830.423584977+4061255.6481961836+54
> > 26172.9135307195+5382087.496964029" in your request should not be useful.
> > 
> > Sorry no more idea here. Maybe the log will show you something weird.
> > 
> > Y.
> > 
> > On Tuesday, August 16, 2016 10:20:43 Ahmet Temiz wrote:
> > > thank you
> > > 
> > > it is png file.
> > > $display out.png returns blank image.
> > > 
> > > On Tue, Aug 16, 2016 at 10:10 AM, Yves Jacolin <
> > 
> > yves.jaco...@camptocamp.com>
> > 
> > > wrote:
> > > > On Tuesday, August 16, 2016 10:07:40 Ahmet Temiz wrote:
> > > > > Hi,
> > > > > 
> > > > > I am testing my wms, postgis layer it works with QUERY_STRING but
> > > > > not
> > > > > displays anything with curl and QGIS.
> > > > > 
> > > > > ** It works
> > > > > 
> > > > > mapserv -nh
> > > > > "QUERY_STRING=map=/var/www/ms_map/jeo.map=WMS&
> > > > 
> > > > VERSION=1.1.1=
> > > > 
> > > > > GetMap=2588830.423584977+4061255.6481961836+
> > > > 
> > > > 5426172.9135307195+53
> > > > 
> > > > > 82087.496964029=jeo==EPSG:3857=
> > > > 
> > > > 2588830.423584977,4061
> > > > 
> > > > > 255.6481961836,5426172.9135307195,5382087.496964029&
> > > > 
> > > > WIDTH=1160=540
> > > > 
> > > > > RMAT=image/png"
> > > > > 
> > > > > > out.png
> > > > > 
> > > > > -
> > > > > ** it doesn't work
> > > > > 
> > > > > curl --trace -i -X GET -H "Content-Type: image/png" "
> > > > > http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/
> > > > 
> > > > jeo.map=WMS
> > > > 
> > > > > SION=1.1.1=GetMap=2588830.423584977+
> > > > 
> > > > 4061255.6481961836+54
> > > > 
> > > > > 26172.9135307195+5382087.496964029=jeo=&
> > > > 
> > > > SRS=EPSG:3857=258
> > > > 
> > > > > 8830.423584977,4061255.6481961836,5426172.9135307195,
> > > > 
> > > > 5382087.496964029
> > > > 
> > > > > =1160=540=image/png"
> > > > > 
> > > > > > out.png
> > > > > 
> > > > > Can you tell me what the likely reasons are?
> > > > > regards
> > > > 
> > > > Hello,
> > > > 
> > > > Does out.png is a png file or a text file with an error message in it?
> > 
> > If
> > 
> > > > so,
> > > > what is this message? If it is not a png file, is it the mapserv cgi
> > 
> > file?
> > 
> > > > Y.
> > > > --
> > > > 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
> > 
> > --
> > 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

-- 
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] problem in wms service

2016-08-16 Thread Ahmet Temiz
thank you ,

I noticed later I have missed specifying host in CONNECTION <  CONNECTION
"host=localhost  
Do you say map.extent is redundant code and  BBOX is doing same ?

regards

On Tue, Aug 16, 2016 at 10:37 AM, Yves Jacolin 
wrote:

> Ok, I suppose that your working test shows something in the picture?
>
> I suggest to enable log in your mapfile and check it after running again
> your
> not working example.
>
> "map.extent=2588830.423584977+4061255.6481961836+54
> 26172.9135307195+5382087.496964029" in your request should not be useful.
>
> Sorry no more idea here. Maybe the log will show you something weird.
>
> Y.
> On Tuesday, August 16, 2016 10:20:43 Ahmet Temiz wrote:
> > thank you
> >
> > it is png file.
> > $display out.png returns blank image.
> >
> > On Tue, Aug 16, 2016 at 10:10 AM, Yves Jacolin <
> yves.jaco...@camptocamp.com>
> > wrote:
> > > On Tuesday, August 16, 2016 10:07:40 Ahmet Temiz wrote:
> > > > Hi,
> > > >
> > > > I am testing my wms, postgis layer it works with QUERY_STRING but not
> > > > displays anything with curl and QGIS.
> > > >
> > > > ** It works
> > > >
> > > > mapserv -nh
> > > > "QUERY_STRING=map=/var/www/ms_map/jeo.map=WMS&
> > >
> > > VERSION=1.1.1=
> > >
> > > > GetMap=2588830.423584977+4061255.6481961836+
> > >
> > > 5426172.9135307195+53
> > >
> > > > 82087.496964029=jeo==EPSG:3857=
> > >
> > > 2588830.423584977,4061
> > >
> > > > 255.6481961836,5426172.9135307195,5382087.496964029&
> > >
> > > WIDTH=1160=540
> > >
> > > > RMAT=image/png"
> > > >
> > > > > out.png
> > > >
> > > > -
> > > > ** it doesn't work
> > > >
> > > > curl --trace -i -X GET -H "Content-Type: image/png" "
> > > > http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/
> > >
> > > jeo.map=WMS
> > >
> > > > SION=1.1.1=GetMap=2588830.423584977+
> > >
> > > 4061255.6481961836+54
> > >
> > > > 26172.9135307195+5382087.496964029=jeo=&
> > >
> > > SRS=EPSG:3857=258
> > >
> > > > 8830.423584977,4061255.6481961836,5426172.9135307195,
> > >
> > > 5382087.496964029
> > >
> > > > =1160=540=image/png"
> > > >
> > > > > out.png
> > > >
> > > > Can you tell me what the likely reasons are?
> > > > regards
> > >
> > > Hello,
> > >
> > > Does out.png is a png file or a text file with an error message in it?
> If
> > > so,
> > > what is this message? If it is not a png file, is it the mapserv cgi
> file?
> > >
> > > Y.
> > > --
> > > 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
>
> --
> 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
>



-- 
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu




Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] problem in wms service

2016-08-16 Thread Yves Jacolin
Ok, I suppose that your working test shows something in the picture?

I suggest to enable log in your mapfile and check it after running again your 
not working example.

"map.extent=2588830.423584977+4061255.6481961836+54 
26172.9135307195+5382087.496964029" in your request should not be useful.

Sorry no more idea here. Maybe the log will show you something weird.

Y.
On Tuesday, August 16, 2016 10:20:43 Ahmet Temiz wrote:
> thank you
> 
> it is png file.
> $display out.png returns blank image.
> 
> On Tue, Aug 16, 2016 at 10:10 AM, Yves Jacolin 
> wrote:
> > On Tuesday, August 16, 2016 10:07:40 Ahmet Temiz wrote:
> > > Hi,
> > > 
> > > I am testing my wms, postgis layer it works with QUERY_STRING but not
> > > displays anything with curl and QGIS.
> > > 
> > > ** It works
> > > 
> > > mapserv -nh
> > > "QUERY_STRING=map=/var/www/ms_map/jeo.map=WMS&
> > 
> > VERSION=1.1.1=
> > 
> > > GetMap=2588830.423584977+4061255.6481961836+
> > 
> > 5426172.9135307195+53
> > 
> > > 82087.496964029=jeo==EPSG:3857=
> > 
> > 2588830.423584977,4061
> > 
> > > 255.6481961836,5426172.9135307195,5382087.496964029&
> > 
> > WIDTH=1160=540
> > 
> > > RMAT=image/png"
> > > 
> > > > out.png
> > > 
> > > -
> > > ** it doesn't work
> > > 
> > > curl --trace -i -X GET -H "Content-Type: image/png" "
> > > http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/
> > 
> > jeo.map=WMS
> > 
> > > SION=1.1.1=GetMap=2588830.423584977+
> > 
> > 4061255.6481961836+54
> > 
> > > 26172.9135307195+5382087.496964029=jeo=&
> > 
> > SRS=EPSG:3857=258
> > 
> > > 8830.423584977,4061255.6481961836,5426172.9135307195,
> > 
> > 5382087.496964029
> > 
> > > =1160=540=image/png"
> > > 
> > > > out.png
> > > 
> > > Can you tell me what the likely reasons are?
> > > regards
> > 
> > Hello,
> > 
> > Does out.png is a png file or a text file with an error message in it? If
> > so,
> > what is this message? If it is not a png file, is it the mapserv cgi file?
> > 
> > Y.
> > --
> > 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

-- 
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] problem in wms service

2016-08-16 Thread Ahmet Temiz
thank you

it is png file.
$display out.png returns blank image.

On Tue, Aug 16, 2016 at 10:10 AM, Yves Jacolin 
wrote:

> On Tuesday, August 16, 2016 10:07:40 Ahmet Temiz wrote:
> > Hi,
> >
> > I am testing my wms, postgis layer it works with QUERY_STRING but not
> > displays anything with curl and QGIS.
> >
> > ** It works
> >
> > mapserv -nh
> > "QUERY_STRING=map=/var/www/ms_map/jeo.map=WMS&
> VERSION=1.1.1=
> > GetMap=2588830.423584977+4061255.6481961836+
> 5426172.9135307195+53
> > 82087.496964029=jeo==EPSG:3857=
> 2588830.423584977,4061
> > 255.6481961836,5426172.9135307195,5382087.496964029&
> WIDTH=1160=540
> > RMAT=image/png"
> > > out.png
> >
> > -
> > ** it doesn't work
> >
> > curl --trace -i -X GET -H "Content-Type: image/png" "
> > http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/
> jeo.map=WMS
> > SION=1.1.1=GetMap=2588830.423584977+
> 4061255.6481961836+54
> > 26172.9135307195+5382087.496964029=jeo=&
> SRS=EPSG:3857=258
> > 8830.423584977,4061255.6481961836,5426172.9135307195,
> 5382087.496964029
> > =1160=540=image/png"
> > > out.png
> >
> > Can you tell me what the likely reasons are?
> > regards
>
> Hello,
>
> Does out.png is a png file or a text file with an error message in it? If
> so,
> what is this message? If it is not a png file, is it the mapserv cgi file?
>
> Y.
> --
> 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
>



-- 
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu




Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] problem in wms service

2016-08-16 Thread Yves Jacolin
On Tuesday, August 16, 2016 10:07:40 Ahmet Temiz wrote:
> Hi,
> 
> I am testing my wms, postgis layer it works with QUERY_STRING but not
> displays anything with curl and QGIS.
> 
> ** It works
> 
> mapserv -nh
> "QUERY_STRING=map=/var/www/ms_map/jeo.map=WMS=1.1.1=
> GetMap=2588830.423584977+4061255.6481961836+5426172.9135307195+53
> 82087.496964029=jeo==EPSG:3857=2588830.423584977,4061
> 255.6481961836,5426172.9135307195,5382087.496964029=1160=540
> RMAT=image/png"
> > out.png
> 
> -
> ** it doesn't work
> 
> curl --trace -i -X GET -H "Content-Type: image/png" "
> http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/jeo.map=WMS
> SION=1.1.1=GetMap=2588830.423584977+4061255.6481961836+54
> 26172.9135307195+5382087.496964029=jeo==EPSG:3857=258
> 8830.423584977,4061255.6481961836,5426172.9135307195,5382087.496964029
> =1160=540=image/png"
> > out.png
> 
> Can you tell me what the likely reasons are?
> regards

Hello,

Does out.png is a png file or a text file with an error message in it? If so, 
what is this message? If it is not a png file, is it the mapserv cgi file?

Y.
-- 
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

[mapserver-users] problem in wms service

2016-08-16 Thread Ahmet Temiz
Hi,

I am testing my wms, postgis layer it works with QUERY_STRING but not
displays anything with curl and QGIS.

** It works

mapserv -nh
"QUERY_STRING=map=/var/www/ms_map/jeo.map=WMS=1.1.1=GetMap=2588830.423584977+4061255.6481961836+5426172.9135307195+5382087.496964029=jeo==EPSG:3857=2588830.423584977,4061255.6481961836,5426172.9135307195,5382087.496964029=1160=540=image/png"
> out.png

-
** it doesn't work

curl --trace -i -X GET -H "Content-Type: image/png" "
http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/jeo.map=WMS=1.1.1=GetMap=2588830.423584977+4061255.6481961836+5426172.9135307195+5382087.496964029=jeo==EPSG:3857=2588830.423584977,4061255.6481961836,5426172.9135307195,5382087.496964029=1160=540=image/png;
> out.png

Can you tell me what the likely reasons are?
regards


-- 
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu




Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users