Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-13 Thread Alessandro Pasotti
2014/1/12 Marco Hugentobler marco.hugentob...@sourcepole.ch

  Hi Alessandro


 in WFS we have the standard OGC FILTER plus the  QGIS custom
 EXP_FILTER
 in WMS we have QGIS custom FILTER
 
  IMHO the best solution would be to have the same parameters also in
 WMS, so:
  
  rename WMS QGIS custom  FILTER to EXP_FILTER and
 implement OGC  FILTER even if it's not in the standard

  Oh, so we have even three filter possibilities:

 1. OGC Filter (done via QgsExpression )
 2. Filter with QGIS custom syntax (done via QgsExpression)
 3. Filter with provider subset with syntax of data provider (e.g. SQL).
 Done on provider (DB) side for very fast searches, therefore needs careful
 parsing against SQL injections

 WFS server implements 1+2, WMS server implements 3. There are pros and
 cons for all of them, so it would be nice to have three parameter name to
 call all of them for WMS servers.


 Do you think that we can re-use the WFS OGC FILTER code for the WMS OGC
 FILTER implementation?

 QgsOgcUtils::expressionFromOgcFilter


Thanks Marco, now I hope I've got the whole picture.

Can we agree on the parameter names to use for those calls?

The only one which is in the official specs is WFS FILTER, then we have
implementations for


OGC Filter  WFS=FILTER
QGS Exp. filter WFS=EXP_FILTER
QGS provider filter  WMS=FILTER

I'm proposing this:

OGC Filter  WFS=FILTER, WMS=FILTER (to be implemented)
QGS Exp. filter WFS=EXP_FILTER, WMS=EXP_FILTER (to be implemented)
QGS provider filter  WFS=PRO_FILTER   (to be implemented),
 WMS=PRO_FILTER (to be renamed)


... I don't have any better idea for  PRO_FILTER but still don't like it,
any hint?


Note that this will break existing apps, if we are renaming the WMS FILTER
to PRO_FILTER (or something else)


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-12 Thread Marco Hugentobler

Hi Alessandro

in WFS we have the standard OGC FILTER plus the  QGIS custom 
EXP_FILTER

in WMS we have QGIS custom FILTER

IMHO the best solution would be to have the same parameters also in 
WMS, so:


rename WMS QGIS custom  FILTER to EXP_FILTER and
implement OGC  FILTER even if it's not in the standard

Oh, so we have even three filter possibilities:

1. OGC Filter (done via QgsExpression )
2. Filter with QGIS custom syntax (done via QgsExpression)
3. Filter with provider subset with syntax of data provider (e.g. SQL). 
Done on provider (DB) side for very fast searches, therefore needs 
careful parsing against SQL injections


WFS server implements 1+2, WMS server implements 3. There are pros and 
cons for all of them, so it would be nice to have three parameter name 
to call all of them for WMS servers.


Do you think that we can re-use the WFS OGC FILTER code for the WMS 
OGC FILTER implementation?


QgsOgcUtils::expressionFromOgcFilter

Regards,
Marco

On 11.01.2014 09:47, Alessandro Pasotti wrote:
2014/1/9 Alessandro Pasotti apaso...@gmail.com 
mailto:apaso...@gmail.com


2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch
mailto:marco.hugentob...@sourcepole.ch

I thought this OGC filtering stuff was already implemented
for WFS server isn't it?

Ok, summarizing:

in WFS we have the standard OGC FILTER plus the  QGIS custom
EXP_FILTER
in WMS we have QGIS custom FILTER

IMHO the best solution would be to have the same parameters also
in WMS, so:

rename WMS QGIS custom  FILTER to EXP_FILTER and
implement OGC  FILTER even if it's not in the standard

Do you think that we can re-use the WFS OGC FILTER code for the
WMS OGC FILTER implementation?


Any comment on this?

Should I file a [Feature] ticket?

--
Alessandro Pasotti
w3: www.itopen.it http://www.itopen.it



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-11 Thread Alessandro Pasotti
2014/1/9 Alessandro Pasotti apaso...@gmail.com

 2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch

  I thought this OGC filtering stuff was already implemented for WFS
 server isn't it?

 Ok, summarizing:

 in WFS we have the standard OGC FILTER plus the  QGIS custom EXP_FILTER
 in WMS we have QGIS custom FILTER

 IMHO the best solution would be to have the same parameters also in WMS,
 so:

 rename WMS QGIS custom  FILTER to EXP_FILTER and
 implement OGC  FILTER even if it's not in the standard

 Do you think that we can re-use the WFS OGC FILTER code for the WMS OGC
 FILTER implementation?


Any comment on this?

Should I file a [Feature] ticket?


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-09 Thread G. Allegri
+1 from me, Anyway I would keep the custom mode too, which is simpler to
manage in most cases...

giovanni



2014/1/9 Alessandro Pasotti apaso...@gmail.com

 Hi,

 I'm trying to build an improved legend for QWC as explained in my previous
 email.

 The idea was to create an helper script (like those already existing for
 search) that returns json data and base64-encoded images to allow building
 of the legend on the client. The script currently query GetStyles to get
 the classes and get the image for each RULE with GetLegendGraphic, so far
 so good.

 The legend is then cached on the file system for speed.

 The important missing point is that I would be able to build an
 interactive legend, so that the user can for example click on individual
 classes and change visibility or maybe highlight or zoom to extent, this is
 why I need FILTERS.

 The work is almost done, but I've come to a stop with filter generation. I
 can easily obtain ogc filters for each rule (they are in the SLD) but it
 seems like the FILTER parameter in QGIS mapserver WMS follows its own
 syntax.

 The only option I see now is to convert OGC FILTER to the custom QGIS
 FILTER syntax. This is easy for simpler rules but can become difficult when
 rules have complex conditions.

 Any idea or suggestion ?

 Since OGC FILTER parsing is already implemented in QGIS, would it be
 possible make the WMS understand OGG FILTER encoding in addition to the
 custom syntax?


 --
 Alessandro Pasotti
 w3:   www.itopen.it

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Giovanni Allegri
http://about.me/giovanniallegri
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-09 Thread Marco Hugentobler

Hi Alessandro

Since OGC FILTER parsing is already implemented in QGIS, would it be 
possible make the WMS understand OGG FILTER encoding in addition to the 
custom syntax?


The problem is that the filter has the subset syntax of the data 
provider. So it would need translation OGC syntax - provider syntax (or 
the possibility to choose between db server side filtering or QGIS side 
filtering with unified syntax).


Regards,
Marco


On 09.01.2014 15:13, Alessandro Pasotti wrote:

Hi,

I'm trying to build an improved legend for QWC as explained in my 
previous email.


The idea was to create an helper script (like those already existing 
for search) that returns json data and base64-encoded images to allow 
building of the legend on the client. The script currently query 
GetStyles to get the classes and get the image for each RULE with 
GetLegendGraphic, so far so good.


The legend is then cached on the file system for speed.

The important missing point is that I would be able to build an 
interactive legend, so that the user can for example click on 
individual classes and change visibility or maybe highlight or zoom to 
extent, this is why I need FILTERS.


The work is almost done, but I've come to a stop with filter 
generation. I can easily obtain ogc filters for each rule (they are in 
the SLD) but it seems like the FILTER parameter in QGIS mapserver WMS 
follows its own syntax.


The only option I see now is to convert OGC FILTER to the custom QGIS 
FILTER syntax. This is easy for simpler rules but can become difficult 
when rules have complex conditions.


Any idea or suggestion ?

Since OGC FILTER parsing is already implemented in QGIS, would it be 
possible make the WMS understand OGG FILTER encoding in addition to 
the custom syntax?



--
Alessandro Pasotti
w3: www.itopen.it http://www.itopen.it


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-09 Thread Alessandro Pasotti
2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch

  Hi Alessandro


 Since OGC FILTER parsing is already implemented in QGIS, would it be
 possible make the WMS understand OGG FILTER encoding in addition to the
 custom syntax?

 The problem is that the filter has the subset syntax of the data provider.
 So it would need translation OGC syntax - provider syntax (or the
 possibility to choose between db server side filtering or QGIS side
 filtering with unified syntax).



I thought this OGC filtering stuff was already implemented for WFS server
isn't it?


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-09 Thread rldhont

Hi all,

In the WFS standard FILTER parameter is defined to be an OGC FILTER 
encoding.

In the WMS standard there is no FILTER parameter if I remember correctly.

In the WFS QGIS-Server implementation, I have added the EXP_FILTER 
parameter which is used to filter features with a QGIS expression.


Regards,
René-Luc D'Hont
3liz

Le 09/01/2014 17:41, Alessandro Pasotti a écrit :
2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch 
mailto:marco.hugentob...@sourcepole.ch


Hi Alessandro


Since OGC FILTER parsing is already implemented in QGIS, would it
be possible make the WMS understand OGG FILTER encoding in
addition to the custom syntax?

The problem is that the filter has the subset syntax of the data
provider. So it would need translation OGC syntax - provider
syntax (or the possibility to choose between db server side
filtering or QGIS side filtering with unified syntax).



I thought this OGC filtering stuff was already implemented for WFS 
server isn't it?



--
Alessandro Pasotti
w3: www.itopen.it http://www.itopen.it


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-09 Thread Marco Hugentobler
I thought this OGC filtering stuff was already implemented for WFS 
server isn't it?


Yes, that's what I meant with data provider filtering vs. QGIS 
filtering. WFS server uses QgsExpression (QGIS side filtering) while WMS 
takes the filter and sets the subset to the provider (db side filtering).
So it could be done by switching to QgsExpression depending on the 
filter format (pull requests welcome). Data provider syntax still needs 
to be supported because this kind of filtering is more powerfull and 
more performant.


Regards,
Marco

On 09.01.2014 17:41, Alessandro Pasotti wrote:
2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch 
mailto:marco.hugentob...@sourcepole.ch


Hi Alessandro


Since OGC FILTER parsing is already implemented in QGIS, would it
be possible make the WMS understand OGG FILTER encoding in
addition to the custom syntax?

The problem is that the filter has the subset syntax of the data
provider. So it would need translation OGC syntax - provider
syntax (or the possibility to choose between db server side
filtering or QGIS side filtering with unified syntax).



I thought this OGC filtering stuff was already implemented for WFS 
server isn't it?



--
Alessandro Pasotti
w3: www.itopen.it http://www.itopen.it



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QWC and WMS FILTER in qgis mapserver

2014-01-09 Thread Alessandro Pasotti
2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch

  I thought this OGC filtering stuff was already implemented for WFS
 server isn't it?

 Yes, that's what I meant with data provider filtering vs. QGIS filtering.
 WFS server uses QgsExpression (QGIS side filtering) while WMS takes the
 filter and sets the subset to the provider (db side filtering).
 So it could be done by switching to QgsExpression depending on the filter
 format (pull requests welcome). Data provider syntax still needs to be
 supported because this kind of filtering is more powerfull and more
 performant.

 Regards,
 Marco


 On 09.01.2014 17:41, Alessandro Pasotti wrote:

  2014/1/9 Marco Hugentobler marco.hugentob...@sourcepole.ch

  Hi Alessandro


 Since OGC FILTER parsing is already implemented in QGIS, would it be
 possible make the WMS understand OGG FILTER encoding in addition to the
 custom syntax?

  The problem is that the filter has the subset syntax of the data
 provider. So it would need translation OGC syntax - provider syntax (or
 the possibility to choose between db server side filtering or QGIS side
 filtering with unified syntax).



  I thought this OGC filtering stuff was already implemented for WFS
 server isn't it?


  --
 Alessandro Pasotti
 w3:   www.itopen.it


Ok, summarizing:

in WFS we have the standard OGC FILTER plus the  QGIS custom EXP_FILTER
in WMS we have QGIS custom FILTER

IMHO the best solution would be to have the same parameters also in WMS, so:

rename WMS QGIS custom  FILTER to EXP_FILTER and
implement OGC  FILTER even if it's not in the standard

Do you think that we can re-use the WFS OGC FILTER code for the WMS OGC
FILTER implementation?


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer