[QGIS-Developer] Missing html template files for Qgis server landing page

2024-09-30 Thread David Marteau via QGIS-Developer

Hi,

If we install the Qgis server from the Qgis repositories: 
https://qgis.org/resources/installation-guide/?highlight=ubuntu#linux,
trying to access the landinpage '/catalog', then the request fail with 
the log error:


```Template not found error: 
/usr/share/qgis/resources/server/api/ogc/static/landingpage/index.html```


And, indeed,  no 'landingpage' directory exists at the above location.

The resources files existed in the 3.22 packaging, but are gone since 3.28

Is this a packaging error or do I missing something ?


Thanks

David Marteau

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] QGIS Server and OGC API - Processes

2023-05-12 Thread David Marteau via QGIS-Developer

Hi,

There is an implementation of OGC API processes on top of Qgis 
Processing here: https://github.com/3liz/py-qgis-wps that supports Qgis 
algorithms as processes out of the box.



Le 12/05/2023 à 11:44, Alessandro Pasotti via QGIS-Developer a écrit :

Hi,

Is anybody working or planning to work on an implementation of OGC API
- Processes [1] for QGIS Server?

[1] https://ogcapi.ogc.org/processes/overview.html


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Compile QGIS in docker

2022-10-22 Thread David Marteau via QGIS-Developer

Hi,

I use and compile Qgis desktop and server on Docker on a daily basis.

Docker on Windows or Osx relies on linux vm, so basically, you should do 
- almost - anything that
you can do on Linux but  my expérience has taught me that the processe 
is much smoother on Linux.


However, as Richard said, WSL on Windows works rather well with Docker 
and should provide you wih real linux

experience

About qgis ready to use docker image you may find several up to date 
flavors:


- https://hub.docker.com/r/qgis/qgis
- https://hub.docker.com/r/3liz/qgis-platform (no desktop - server only)

If your goal is to compile Qgis, you should go with multi-stage building 
process

and I can tell more about this if you want.

You will find ready made images with build dependencies: 
https://hub.docker.com/r/qgis/qgis3-build-deps


Or some recipies for achieving this on latest Debian/Ubuntu: 
https://github.com/3liz/docker-qgis-build


Regards,
David


Le 22/10/2022 à 16:49, Richard Duivenvoorde via QGIS-Developer a écrit :


On 10/22/22 16:25, Paul N via QGIS-Developer wrote:

Is it possible to compile QGIS in docker on windows system.

Any clue.


What is your use-case?
- Desktop or Server?
- Host = Windows, but container = ?

There are ready to use QGIS-Server images, others know better which 
one is most up to date (@others..)


If you just want to compile in a Debian/Ubuntu/whatever, off course 
you can: a container is/can be a full fledged Linux machine.


We also experimented with Running QGIS-Desktop on a container on a 
Linux host running X.
Not sure if that is possible on a Windows host though, and you will 
probably have some container/permission issues... though I've been 
flabbergasted with the recent capabilities of the Linux sub system on 
Windows... ( but to be clear: just use Linux :-) ).


Anyway: what is it that you want to try?

Regards,

Richard Duivenvoorde
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] QGIS Server WMS Advertised extent and layers / groups bounding box in GetCapabilities

2022-10-04 Thread David Marteau via QGIS-Developer

Hi,

Does that mean that is not playing any authoritative rôle  ?

David

Le 04/10/2022 à 13:43, Jürgen E. Fischer via QGIS-Developer a écrit :

Hi René-Luc,

On Tue, 04. Oct 2022 at 13:37:54 +0200, René-Luc Dhont via QGIS-Developer wrote:

So I wonder what the role of the WMS Advertised extent is.
* Is it only the root layer / group extent ?
* Is it a restricted extent (no data available outside this extent) ?
* Is it the minimum extent of all WMS layers ?

   * an (suggested) area of interest for clients.


Jürgen


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-28 Thread David Marteau via QGIS-Developer

Hi,

From bisect-like analysis, I have found the commit that introduces the 
loss of loading performance:


https://github.com/qgis/QGIS/commit/c6beb62216fcfbfe3ca64283c09117da53800a98

We need more investigation to understand exactly what is causing that 
regression.


David Marteau
www.3liz.com <http://www.3liz.com>

Le 21/06/2022 à 14:45, David Marteau via QGIS-Developer a écrit :


Hi,

Here is a first analysis using QgsRuntimeProfiler outputs

The project is the same in all tests and has been saved with Qgis 3.26.
This is a first load in each case just after qgis init, so there 
should be no caching involved.


Output has been filtered to `projectload` profiler group and rows with 
elapsed time > 0


All builds are official builds and installed from qgis.org packages.
Tests are run in Docker container with ubuntu 21.04

Total time show a variance of +/- 25% on multiple runs.

## Qgis 3.26

### Flags
* Qgis.ProjectReadFlag.TrustLayerMetadata
* Qgis.ProjectReadFlag.DontLoad3DViews
* Qgis.ProjectReadFlag.DontLoadProjectStyles

projectload, Reading project file: 21.0 ms
projectload, Creating auxiliary storage: 65.0 ms
projectload, Reading properties: 19.0 ms
projectload, Reading map layers: 14.0 ms
-projectload, france_parts: 6.0 ms
--projectload, Load layer source: 5.0 ms
---projectload, Create ogr provider: 3.0 ms
-projectload, france_parts bordure: 4.0 ms
--projectload, Load layer source: 4.0 ms
---projectload, Create ogr provider: 2.0 ms
-projectload, france_parts tuilé en cache: 3.0 ms
--projectload, Load layer source: 3.0 ms
---projectload, Create ogr provider: 1.0 ms
projectload, Storing original layer properties: 2.0 ms

Total time: 152.0 ms

## Qgis 3.24

### Flags
* QgsProject.FlagTrustLayerMetadata

projectload, Reading project file: 5.0 ms
projectload, Reading properties: 4.0 ms
projectload, Reading map layers: 4.0 ms
-projectload, france_parts: 1.0 ms
--projectload, Load layer source: 1.0 ms
-projectload, france_parts bordure: 1.0 ms
--projectload, Load layer source: 1.0 ms
-projectload, france_parts tuilé en cache: 1.0 ms
--projectload, Load layer source: 1.0 ms
projectload, Storing original layer properties: 1.0 ms
projectload, Updating interface: 1.0 ms

Total time: 21.0 ms

Some remarks:

I Wonder why we have `Creating auxiliary storage` that takes 65.0 ms 
in Qgis 3.26 and it does not appears in Qgis 3.24:
I need to figure how auxiliary layers are loaded in Qgis 3.24 (are 
they loaded lazily ?).


The `Reading project file`, `Reading properties` and `Reading map 
layers` sections are almost 3 to 4 times slower in Qgis 3.26.


The loading of layers ares also slower in Qgis 3.26 compared to Qgis 3.24.


Le 21/06/2022 à 12:27, David Marteau a écrit :



May be I could use QgsRuntimeProfiler output in first place ?

Le 20/06/2022 à 18:55, Even Rouault a écrit :


Use sysprof or just run under a debugger and interrupt regularly 
should help you spot in which method(s) most time is spent


Le 20/06/2022 à 18:48, David Marteau via QGIS-Developer a écrit :


I used the following test:

readflags = Qgis.ProjectReadFlags() readflags |= 
Qgis.ProjectReadFlag.TrustLayerMetadata|Qgis.ProjectReadFlag.DontLoad3DViews|Qgis.ProjectReadFlag.DontLoadProjectStyles 
prj = QgsProject()%timeit -n 1 
prj.read(f"{datapath}/france_parts3_26.qgs",readflags)


105 ms ± 18.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

This improve the result  but we are still much higher that the 
loading time of 3.24: 15ms compared to 105ms



Le 20/06/2022 à 18:38, Nyall Dawson a écrit :



On Mon, 20 June 2022, 11:42 pm David Marteau,  
wrote:


Hi,

> You should set the other new read optimisation flags here --
see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

These are already available also in 3.24 and we use the  
`TrustLayerMetadata` in the above test. For server,  the other
flags are not applicable (Getprint requests need print layouts ).

So that mean we are comparing 3.24 to 3.26 with same level of
read optimisation and that does not change the fact that, for
that very same level of read optimisation, project's loading
is incredibly slower in 3.26.


You'll need to set the new flags relating to skipping the 3d views 
and project style loading in order to compare properly. Neither of 
those things were occurring in 3.24, and both have an associated 
cost. And neither are relevant for server.


Nyall



Le 20/06/2022 à 15:10, Nyall Dawson a écrit :



    On Mon, 20 June 2022, 9:37 pm David Marteau via
QGIS-Developer,  wrote:

Hi,

I have noticed a huge drop of performance while testing
Qgis server with Qgis 3.26, from 10x to 30x slower as usual.

Trying to reduce the problem I have found a huge increase
of time spend reading the project in 3.26 compared to 3.24.

Here some benchmark with very simple project from the
test

Re: [QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-21 Thread David Marteau via QGIS-Developer
I Wonder why we have `Creating auxiliary storage` that takes 65.0 ms in 
Qgis 3.26 and it does not appears in Qgis 3.24:
I need to figure how auxiliary layers are loaded in Qgis 3.24 (are they 
loaded lazily ?).


I happends that loading auxiliary layer is negligible in 3.24 :

>> projectload, Creating auxiliary storage: 0.0 ms

I do not understand the difference because it appears that it looks like 
the same code in 3.24 and 3.26.


Does compile/optimize options could have changed between release 3.24 
and 3.26 ?



Le 21/06/2022 à 14:45, David Marteau a écrit :


Hi,

Here is a first analysis using QgsRuntimeProfiler outputs

The project is the same in all tests and has been saved with Qgis 3.26.
This is a first load in each case just after qgis init, so there 
should be no caching involved.


Output has been filtered to `projectload` profiler group and rows with 
elapsed time > 0


All builds are official builds and installed from qgis.org packages.
Tests are run in Docker container with ubuntu 21.04

Total time show a variance of +/- 25% on multiple runs.

## Qgis 3.26

### Flags
* Qgis.ProjectReadFlag.TrustLayerMetadata
* Qgis.ProjectReadFlag.DontLoad3DViews
* Qgis.ProjectReadFlag.DontLoadProjectStyles

projectload, Reading project file: 21.0 ms
projectload, Creating auxiliary storage: 65.0 ms
projectload, Reading properties: 19.0 ms
projectload, Reading map layers: 14.0 ms
-projectload, france_parts: 6.0 ms
--projectload, Load layer source: 5.0 ms
---projectload, Create ogr provider: 3.0 ms
-projectload, france_parts bordure: 4.0 ms
--projectload, Load layer source: 4.0 ms
---projectload, Create ogr provider: 2.0 ms
-projectload, france_parts tuilé en cache: 3.0 ms
--projectload, Load layer source: 3.0 ms
---projectload, Create ogr provider: 1.0 ms
projectload, Storing original layer properties: 2.0 ms

Total time: 152.0 ms

## Qgis 3.24

### Flags
* QgsProject.FlagTrustLayerMetadata

projectload, Reading project file: 5.0 ms
projectload, Reading properties: 4.0 ms
projectload, Reading map layers: 4.0 ms
-projectload, france_parts: 1.0 ms
--projectload, Load layer source: 1.0 ms
-projectload, france_parts bordure: 1.0 ms
--projectload, Load layer source: 1.0 ms
-projectload, france_parts tuilé en cache: 1.0 ms
--projectload, Load layer source: 1.0 ms
projectload, Storing original layer properties: 1.0 ms
projectload, Updating interface: 1.0 ms

Total time: 21.0 ms

Some remarks:

I Wonder why we have `Creating auxiliary storage` that takes 65.0 ms 
in Qgis 3.26 and it does not appears in Qgis 3.24:
I need to figure how auxiliary layers are loaded in Qgis 3.24 (are 
they loaded lazily ?).


The `Reading project file`, `Reading properties` and `Reading map 
layers` sections are almost 3 to 4 times slower in Qgis 3.26.


The loading of layers ares also slower in Qgis 3.26 compared to Qgis 3.24.


Le 21/06/2022 à 12:27, David Marteau a écrit :



May be I could use QgsRuntimeProfiler output in first place ?

Le 20/06/2022 à 18:55, Even Rouault a écrit :


Use sysprof or just run under a debugger and interrupt regularly 
should help you spot in which method(s) most time is spent


Le 20/06/2022 à 18:48, David Marteau via QGIS-Developer a écrit :


I used the following test:

readflags = Qgis.ProjectReadFlags() readflags |= 
Qgis.ProjectReadFlag.TrustLayerMetadata|Qgis.ProjectReadFlag.DontLoad3DViews|Qgis.ProjectReadFlag.DontLoadProjectStyles 
prj = QgsProject()%timeit -n 1 
prj.read(f"{datapath}/france_parts3_26.qgs",readflags)


105 ms ± 18.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

This improve the result  but we are still much higher that the 
loading time of 3.24: 15ms compared to 105ms



Le 20/06/2022 à 18:38, Nyall Dawson a écrit :



On Mon, 20 June 2022, 11:42 pm David Marteau,  
wrote:


Hi,

> You should set the other new read optimisation flags here --
see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

These are already available also in 3.24 and we use the  
`TrustLayerMetadata` in the above test. For server,  the other
flags are not applicable (Getprint requests need print layouts ).

So that mean we are comparing 3.24 to 3.26 with same level of
read optimisation and that does not change the fact that, for
that very same level of read optimisation, project's loading
is incredibly slower in 3.26.


You'll need to set the new flags relating to skipping the 3d views 
and project style loading in order to compare properly. Neither of 
those things were occurring in 3.24, and both have an associated 
cost. And neither are relevant for server.


Nyall



Le 20/06/2022 à 15:10, Nyall Dawson a écrit :



    On Mon, 20 June 2022, 9:37 pm David Marteau via
QGIS-Developer,  wrote:

Hi,

I have noticed a huge drop of performance while testing
Qgis server with Qgis 3.26, from 10x to 30x slower as usual.

Trying to reduce

Re: [QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-21 Thread David Marteau via QGIS-Developer

Hi,

Here is a first analysis using QgsRuntimeProfiler outputs

The project is the same in all tests and has been saved with Qgis 3.26.
This is a first load in each case just after qgis init, so there should 
be no caching involved.


Output has been filtered to `projectload` profiler group and rows with 
elapsed time > 0


All builds are official builds and installed from qgis.org packages.
Tests are run in Docker container with ubuntu 21.04

Total time show a variance of +/- 25% on multiple runs.

## Qgis 3.26

### Flags
* Qgis.ProjectReadFlag.TrustLayerMetadata
* Qgis.ProjectReadFlag.DontLoad3DViews
* Qgis.ProjectReadFlag.DontLoadProjectStyles

projectload, Reading project file: 21.0 ms
projectload, Creating auxiliary storage: 65.0 ms
projectload, Reading properties: 19.0 ms
projectload, Reading map layers: 14.0 ms
-projectload, france_parts: 6.0 ms
--projectload, Load layer source: 5.0 ms
---projectload, Create ogr provider: 3.0 ms
-projectload, france_parts bordure: 4.0 ms
--projectload, Load layer source: 4.0 ms
---projectload, Create ogr provider: 2.0 ms
-projectload, france_parts tuilé en cache: 3.0 ms
--projectload, Load layer source: 3.0 ms
---projectload, Create ogr provider: 1.0 ms
projectload, Storing original layer properties: 2.0 ms

Total time: 152.0 ms

## Qgis 3.24

### Flags
* QgsProject.FlagTrustLayerMetadata

projectload, Reading project file: 5.0 ms
projectload, Reading properties: 4.0 ms
projectload, Reading map layers: 4.0 ms
-projectload, france_parts: 1.0 ms
--projectload, Load layer source: 1.0 ms
-projectload, france_parts bordure: 1.0 ms
--projectload, Load layer source: 1.0 ms
-projectload, france_parts tuilé en cache: 1.0 ms
--projectload, Load layer source: 1.0 ms
projectload, Storing original layer properties: 1.0 ms
projectload, Updating interface: 1.0 ms

Total time: 21.0 ms

Some remarks:

I Wonder why we have `Creating auxiliary storage` that takes 65.0 ms in 
Qgis 3.26 and it does not appears in Qgis 3.24:
I need to figure how auxiliary layers are loaded in Qgis 3.24 (are they 
loaded lazily ?).


The `Reading project file`, `Reading properties` and `Reading map 
layers` sections are almost 3 to 4 times slower in Qgis 3.26.


The loading of layers ares also slower in Qgis 3.26 compared to Qgis 3.24.


Le 21/06/2022 à 12:27, David Marteau a écrit :



May be I could use QgsRuntimeProfiler output in first place ?

Le 20/06/2022 à 18:55, Even Rouault a écrit :


Use sysprof or just run under a debugger and interrupt regularly 
should help you spot in which method(s) most time is spent


Le 20/06/2022 à 18:48, David Marteau via QGIS-Developer a écrit :


I used the following test:

readflags = Qgis.ProjectReadFlags() readflags |= 
Qgis.ProjectReadFlag.TrustLayerMetadata|Qgis.ProjectReadFlag.DontLoad3DViews|Qgis.ProjectReadFlag.DontLoadProjectStyles 
prj = QgsProject()%timeit -n 1 
prj.read(f"{datapath}/france_parts3_26.qgs",readflags)


105 ms ± 18.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

This improve the result  but we are still much higher that the 
loading time of 3.24: 15ms compared to 105ms



Le 20/06/2022 à 18:38, Nyall Dawson a écrit :



On Mon, 20 June 2022, 11:42 pm David Marteau,  
wrote:


Hi,

> You should set the other new read optimisation flags here --
see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

These are already available also in 3.24 and we use the  
`TrustLayerMetadata` in the above test. For server,  the other
flags are not applicable (Getprint requests need print layouts ).

So that mean we are comparing 3.24 to 3.26 with same level of
read optimisation and that does not change the fact that, for
that very same level of read optimisation, project's loading is
incredibly  slower in 3.26.


You'll need to set the new flags relating to skipping the 3d views 
and project style loading in order to compare properly. Neither of 
those things were occurring in 3.24, and both have an associated 
cost. And neither are relevant for server.


Nyall



Le 20/06/2022 à 15:10, Nyall Dawson a écrit :



On Mon, 20 June 2022, 9:37 pm David Marteau via
QGIS-Developer,  wrote:

Hi,

I have noticed a huge drop of performance while testing
Qgis server with Qgis 3.26, from 10x to 30x slower as usual.

Trying to reduce the problem I have found a huge increase
of time spend reading the project in 3.26 compared to 3.24.

Here some benchmark with very simple project from the test
data set. Note: the project has been updated with qgis 3.26:

Qgis 3.24:
==

readflags = QgsProject.ReadFlags()readflags |=
QgsProject.FlagTrustLayerMetadata

prj = QgsProject()

%timeit -n 1
prj.read(f"{datapath}/france_parts.qgs",readflags)

> 15.7 ms ± 205 µs per loop (mean ± std. dev. of 

Re: [QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-21 Thread David Marteau via QGIS-Developer


May be I could use QgsRuntimeProfiler output in first place ?

Le 20/06/2022 à 18:55, Even Rouault a écrit :


Use sysprof or just run under a debugger and interrupt regularly 
should help you spot in which method(s) most time is spent


Le 20/06/2022 à 18:48, David Marteau via QGIS-Developer a écrit :


I used the following test:

readflags = Qgis.ProjectReadFlags() readflags |= 
Qgis.ProjectReadFlag.TrustLayerMetadata|Qgis.ProjectReadFlag.DontLoad3DViews|Qgis.ProjectReadFlag.DontLoadProjectStyles 
prj = QgsProject()%timeit -n 1 
prj.read(f"{datapath}/france_parts3_26.qgs",readflags)


105 ms ± 18.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

This improve the result  but we are still much higher that the 
loading time of 3.24: 15ms compared to 105ms



Le 20/06/2022 à 18:38, Nyall Dawson a écrit :



On Mon, 20 June 2022, 11:42 pm David Marteau,  wrote:

Hi,

> You should set the other new read optimisation flags here --
see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

These are already available also in 3.24 and we use the  
`TrustLayerMetadata` in the above test. For server,  the other
flags are not applicable (Getprint requests need print layouts ).

So that mean we are comparing 3.24 to 3.26 with same level of
read optimisation and that does not change the fact that, for
that very same level of read optimisation, project's loading is
incredibly  slower in 3.26.


You'll need to set the new flags relating to skipping the 3d views 
and project style loading in order to compare properly. Neither of 
those things were occurring in 3.24, and both have an associated 
cost. And neither are relevant for server.


Nyall



Le 20/06/2022 à 15:10, Nyall Dawson a écrit :



On Mon, 20 June 2022, 9:37 pm David Marteau via QGIS-Developer,
 wrote:

Hi,

I have noticed a huge drop of performance while testing
Qgis server with Qgis 3.26, from 10x to 30x slower as usual.

Trying to reduce the problem I have found a huge increase
of time spend reading the project in 3.26 compared to 3.24.

Here some benchmark with very simple project from the test
data set. Note: the project has been updated with qgis 3.26:

Qgis 3.24:
==

readflags = QgsProject.ReadFlags()readflags |=
QgsProject.FlagTrustLayerMetadata

prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

> 15.7 ms ± 205 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)

Qgis 3.26:
==

readflags = QgsProject.ReadFlags() readflags |=
QgsProject.FlagTrustLayerMetadata


You should set the other new read optimisation flags here --
see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

Nyall

​prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

195 ms ± 44 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

There is a factor x10 between Qgis 3.24 et Qgis 3.26 for
the exact same project.
This has serious impact on requests: landing page catalog
request time increased from approximatevely 110ms to more
    than 3.0s with our test data set.


David Marteau
www.3liz.com <http://www.3liz.com>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer

--
http://www.spatialys.com
My software is free, but my time generally not.___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-20 Thread David Marteau via QGIS-Developer

I used the following test:

readflags = Qgis.ProjectReadFlags() readflags |= 
Qgis.ProjectReadFlag.TrustLayerMetadata|Qgis.ProjectReadFlag.DontLoad3DViews|Qgis.ProjectReadFlag.DontLoadProjectStyles 
prj = QgsProject()%timeit -n 1 
prj.read(f"{datapath}/france_parts3_26.qgs",readflags)


105 ms ± 18.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

This improve the result  but we are still much higher that the loading 
time of 3.24: 15ms compared to 105ms



Le 20/06/2022 à 18:38, Nyall Dawson a écrit :



On Mon, 20 June 2022, 11:42 pm David Marteau,  wrote:

Hi,

> You should set the other new read optimisation flags here -- see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

These are already available also in 3.24 and we use the  
`TrustLayerMetadata` in the above test. For server,  the other
flags are not applicable (Getprint requests need print layouts ).

So that mean we are comparing 3.24 to 3.26 with same level of read
optimisation and that does not change the fact that, for that very
same level of read optimisation, project's loading is incredibly 
slower in 3.26.


You'll need to set the new flags relating to skipping the 3d views and 
project style loading in order to compare properly. Neither of those 
things were occurring in 3.24, and both have an associated cost. And 
neither are relevant for server.


Nyall



Le 20/06/2022 à 15:10, Nyall Dawson a écrit :



On Mon, 20 June 2022, 9:37 pm David Marteau via QGIS-Developer,
 wrote:

Hi,

I have noticed a huge drop of performance while testing Qgis
server with Qgis 3.26, from 10x to 30x slower as usual.

Trying to reduce the problem I have found a huge increase of
time spend reading the project in 3.26 compared to 3.24.

Here some benchmark with very simple project from the test
data set. Note: the project has been updated with qgis 3.26:

Qgis 3.24:
==

readflags = QgsProject.ReadFlags()readflags |=
QgsProject.FlagTrustLayerMetadata

prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

> 15.7 ms ± 205 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)

Qgis 3.26:
==

readflags = QgsProject.ReadFlags() readflags |=
QgsProject.FlagTrustLayerMetadata


You should set the other new read optimisation flags here -- see

https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962

Nyall

​prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

195 ms ± 44 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

There is a factor x10 between Qgis 3.24 et Qgis 3.26 for the
exact same project.
This has serious impact on requests: landing page catalog
request time increased from approximatevely 110ms to more
    than 3.0s with our test data set.


David Marteau
www.3liz.com <http://www.3liz.com>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-20 Thread David Marteau via QGIS-Developer

Hi,

> You should set the other new read optimisation flags here -- see 
https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962


These are already available also in 3.24 and we use the   
`TrustLayerMetadata` in the above test. For server,  the other flags are 
not applicable (Getprint requests need print layouts ).


So that mean we are comparing 3.24 to 3.26 with same level of read 
optimisation and that does not change the fact that, for that very same 
level of read optimisation, project's loading is incredibly  slower in 3.26.



Le 20/06/2022 à 15:10, Nyall Dawson a écrit :



On Mon, 20 June 2022, 9:37 pm David Marteau via QGIS-Developer, 
 wrote:


Hi,

I have noticed a huge drop of performance while testing Qgis
server with Qgis 3.26, from 10x to 30x slower as usual.

Trying to reduce the problem I have found a huge increase of time
spend reading the project in 3.26 compared to 3.24.

Here some benchmark with very simple project from the test data
set. Note: the project has been updated with qgis 3.26:

Qgis 3.24:
==

readflags = QgsProject.ReadFlags()readflags |=
QgsProject.FlagTrustLayerMetadata

prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

> 15.7 ms ± 205 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)

Qgis 3.26:
==

readflags = QgsProject.ReadFlags() readflags |=
QgsProject.FlagTrustLayerMetadata


You should set the other new read optimisation flags here -- see 
https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962


Nyall

​prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

195 ms ± 44 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

There is a factor x10 between Qgis 3.24 et Qgis 3.26 for the exact
same project.
This has serious impact on requests: landing page catalog request
time increased from approximatevely 110ms to more than 3.0s with
    our test data set.


David Marteau
www.3liz.com <http://www.3liz.com>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Qgis server: terrible performance with Qgis 3.26

2022-06-20 Thread David Marteau via QGIS-Developer

Hi,

I have noticed a huge drop of performance while testing Qgis server with 
Qgis 3.26, from 10x to 30x slower as usual.


Trying to reduce the problem I have found a huge increase of time spend 
reading the project in 3.26 compared to 3.24.


Here some benchmark with very simple project from the test data set. 
Note: the project has been updated with qgis 3.26:


Qgis 3.24:
==

readflags = QgsProject.ReadFlags()readflags |= 
QgsProject.FlagTrustLayerMetadata


prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)


15.7 ms ± 205 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)


Qgis 3.26:
==

readflags = QgsProject.ReadFlags() readflags |= 
QgsProject.FlagTrustLayerMetadata


​prj = QgsProject()

%timeit -n 1 prj.read(f"{datapath}/france_parts.qgs",readflags)

195 ms ± 44 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

There is a factor x10 between Qgis 3.24 et Qgis 3.26 for the exact same 
project.
This has serious impact on requests: landing page catalog request time 
increased from approximatevely 110ms to more than 3.0s with our test 
data set.



David Marteau
www.3liz.com <http://www.3liz.com>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Minimal docker image for qgis_process/processing

2021-11-24 Thread David Marteau


FYI, the image at https://hub.docker.com/r/3liz/qgis-platform is 
perfectly suited for using processing with python


(we use it as base image for our wps/processing server)


Le 24/11/2021 à 18:21, Denis Rouzaud a écrit :

I didn't pay attention but replied privately to David.

After discussing, it appears that qgis_process is only available under 
the qgis package.

It would make sense to make it available under it own package, no?

Le mer. 24 nov. 2021 à 09:58, David Marteau  a écrit :

Hi Nyall

I don't know if this is what you are seeking for but you will find at
https://hub.docker.com/r/3liz/qgis-platform a simple
image that embed the official version (release/ltr) of Qgis
library (no
desktop support).

That image do nothing except having a Qgis install. We use it as a
base
image for all other docker images that require Qgis libraries.

Sincerely

David

Le 24/11/2021 à 07:31, Nyall Dawson a écrit :
> Hi lists,
>
> Is anyone aware of any minimal QGIS dockers which are designed just
> for using the processing tools (either via Python or qgis_process)?
>
> (Ideally I'm hoping to find one which has no
> GUI/server/application/etc components, but does have all the
desirable
> libraries for a full-featured processing experience!)
>
> Nyall
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Minimal docker image for qgis_process/processing

2021-11-24 Thread David Marteau

Hi Nyall

I don't know if this is what you are seeking for but you will find at 
https://hub.docker.com/r/3liz/qgis-platform a simple
image that embed the official version (release/ltr) of Qgis library (no 
desktop support).


That image do nothing except having a Qgis install. We use it as a base 
image for all other docker images that require Qgis libraries.


Sincerely

David

Le 24/11/2021 à 07:31, Nyall Dawson a écrit :

Hi lists,

Is anyone aware of any minimal QGIS dockers which are designed just
for using the processing tools (either via Python or qgis_process)?

(Ideally I'm hoping to find one which has no
GUI/server/application/etc components, but does have all the desirable
libraries for a full-featured processing experience!)

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Latest qgis release version not available on Debian

2021-06-01 Thread David Marteau

Hi,

It seems that debian packages   for the latest release Qgis version 
(3.18.3 atm) are stucks to 3.18.1:



Result of `apt-cache policy qgis-server-common`

On Debian buster from from 'https://qgis.org/debian'

```
qgis-server-common:
  Installed: 1:3.18.1+15buster
  Candidate: 1:3.18.1+15buster
  Version table:
 *** 1:3.18.1+15buster 500
    500 https://qgis.org/debian buster/main amd64 Packages
```

It's ok on Ubuntu 20.04 from 'https://qgis.org/ubuntu'

```
qgis-server-common:
  Installed: 1:3.18.2+32focal
  Candidate: 1:3.18.3+32focal
  Version table:
 1:3.18.3+32focal 500
    500 https://qgis.org/ubuntu focal/main amd64 Packages
```

Is there any reason for that or is this a bug or did I missed something ?


David

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Multiprocessing QGIS

2021-03-26 Thread David Marteau

I am not entirely sure what QGIS' (intended) behavior is in a case like
this. From the top of my head, having read the relevant portion of its
source code, I'd expect at least a second application window likely
followed by non-deterministic behavior (again, depending on the
use-case, likely resulting in a crash). Can someone elaborate?


I can confirm that the result is non-deterministic even with headless 
PyQgis programs.


For programs relying heavily on multiprocessing the best strategy is to 
use a `fork-server` process
started at the very beginning (before initializing Qgis) managing the 
pool of child processes, so that each forked

process starts in the same state.

David,

Le 23/03/2021 à 19:22, Sebastian M. Ernst a écrit :

Hi João, all,

really interesting question.


however when i run the plugin a new instance of application is open
and give me an error.

I assume that you are using `multiprocessing` [1] from Python's standard
library. Its default behavior is to use process-based parallelism (as
the title in the documentation says). I am assuming that you have not
altered its default behavior (e.g. by configuring it to use threads
instead). This is why you get at least another "worker" process if you
e.g. create a process pool. I have successfully used this method with
QGIS before, but always on Linux and OS X. I am just guessing that you
are doing this on Windows, right?

Depending on the operating system, `multiprocessing` uses different
methods to create worker processes. On Linux and OS X, it simply forks
[2] the main process. This way, you do not see a second application
window popping up. You "simply" get a second, third, fourth, ... process
"in the background". On Windows, the `fork` syscall does not exist,
neither does something similar [3]. `multiprocessing` therefore starts a
complete new process from scratch. If it was pure Python, it would
simply start a new Python interpreter process. Because it is QGIS, it
opens another instance of QGIS.

I am not entirely sure what QGIS' (intended) behavior is in a case like
this. From the top of my head, having read the relevant portion of its
source code, I'd expect at least a second application window likely
followed by non-deterministic behavior (again, depending on the
use-case, likely resulting in a crash). Can someone elaborate?

Best regards,
Sebastian


1: https://docs.python.org/3/library/multiprocessing.html
2: https://en.wikipedia.org/wiki/Fork_(system_call)
3: https://stackoverflow.com/q/985281/1672565


Am 23.03.21 um 13:08 schrieb Joao Folgado:

Hi everyone,

I had created  a plugin for Qgis and I trying to optimize it. So i use
in my code the library python that have Queue whit multiprocessing
however when i run the plugin a new instance of application is open and
give me an error.
I had early use this type of multiprocessing before in simple projects
in university and it works ok.
Can someone help ? I researched in many forums, i see people whit the
same question but not with the answer.
Thank you very much.

Best regards,
João Folgado
Portugal
--
JOÃO FOLGADO

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] asyncio in plugins?

2021-03-23 Thread David Marteau


You should be aware that call to Qgis C/C++ api from Python hold the GIL 
and may prevent custom python threads  to run.


Le 23/03/2021 à 21:06, Sebastian M. Ernst a écrit :


Hi David,

I suspected this much. In theory, I can move the event loop into a
separate thread [1, 2] - this should allow QGIS' event loop to continue
running and accepting input etc. I am *guessing* that this can be made
work. Question: Has someone around here actually tried it before?

Best regards,
Sebastian


1: https://gist.github.com/lars-tiede/01e5f5a551f29a5f300e
2:
https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools


Am 23.03.21 um 20:47 schrieb David Marteau:

Hi,

Asynchronous python code with asyncio assume that you have an ioloop
running in a blocking way in your python code:
that means that no other code (in the same thread) cannot run
concurrently with your async tasks while your loop is running.

David


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] REST API for QGIS processing tool

2021-03-23 Thread David Marteau

Juste a few things:

- py-qgis-wps does not require pyProj directly, you have to check which 
dependency needs it and eventually install it for your platform.


- You should always install custom python package in a venv otherwise 
you may break your installation.


Please open an issue on https://github.com/3liz/py-qgis-wps to continue 
this discussion as it is not related to qgis directly.


Le 23/03/2021 à 20:47, Prem Kumar a écrit :


Hi David,

While installing the service from source code files using given 
instructions, further details of the exception I have encountered.

image.png

 Complete output from command python setup.py egg_info:
    ERROR: Minimum supported PROJ version is 7.2.0, installed version 
is 4.9.3. For more information see: https://pyproj4.github.io/py 
<https://pyproj4.github.io/py>  proj/stable/installation.html


    
Command "python setup.py egg_info" failed with error code 1 in 
/tmp/pip-build-qejkjny8/pyproj/

image.png

After several attempts of troubleshooting, I could bypass this issue 
with "*pip3 install pyproj==1.9.6 -e ." * . not sure this is the 
correct way or not. However, after installation from source files 
directory, I could not either run the runwps.sh 
<https://github.com/3liz/py-qgis-wps/blob/master/runwps.sh> file or 
*wpsserver *from command line as the terminal unable to recognize 
wpsserver command.


*./runwps.sh: line 15: exec: wpsserver: not found*
*
*
Please suggest. Thanks.

-Prem

On Mon, Mar 22, 2021 at 11:19 PM David Marteau <mailto:dmart...@3liz.com>> wrote:



Le 22/03/2021 à 18:26, Prem Kumar a écrit :

Hi Team,

Im afraid to make a comment but the installation instructions in
the github are not specifically referring the integration of
service and the qgis installation and its modules. I have tried
installing py-qgs-wps on linux machine using archive tar file and
ended up incompatibility issue between python version - qgis
installation and the service.

If it’s not more of an effort, can you please guide me to any
installation instructions? Thanks

Can you be more specific about the error your are facing ? if
that's about py-qgs-wps then you should open an issue on github.


-Prem

On Thu, 25 Feb 2021 at 7:44 PM, Prem Kumar mailto:prem.net...@gmail.com>> wrote:

HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks
to me, a lot to learn some good stuff. Will let you know how
it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont
mailto:rldh...@gmail.com>> wrote:


Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing
server for
> this: https://github.com/3liz/py-qgis-wps
<https://github.com/3liz/py-qgis-wps>

Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing
the OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/
<https://github.com/opengeospatial/ogcapi-processes/>
* https://ogcapi.ogc.org/processes/
<https://ogcapi.ogc.org/processes/>

py-qgis-wps is based on Tornado and any contributions are
welcome.
https://github.com/3liz/py-qgis-wps
<https://github.com/3liz/py-qgis-wps>

René-Luc

>
> Nyall
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
<mailto:QGIS-Developer@lists.osgeo.org>
> List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
<mailto:QGIS-Developer@lists.osgeo.org>
List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>
Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org  <mailto:QGIS-Developer

Re: [QGIS-Developer] asyncio in plugins?

2021-03-23 Thread David Marteau

Hi,

Asynchronous python code with asyncio assume that you have an ioloop 
running in a blocking way in your python code:
that means that no other code (in the same thread) cannot run 
concurrently with your async tasks while your loop is running.


David

Le 23/03/2021 à 20:28, Sebastian M. Ernst a écrit :


Hi all,

has anyone made any (positive or negative) experiences with using
`asyncio`-enabled [1] code in QGIS plugins?

Best regards,
Sebastian


1: https://docs.python.org/3/library/asyncio.html
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] REST API for QGIS processing tool

2021-03-22 Thread David Marteau


Le 22/03/2021 à 18:26, Prem Kumar a écrit :

Hi Team,

Im afraid to make a comment but the installation instructions in the 
github are not specifically referring the integration of service and 
the qgis installation and its modules. I have tried installing 
py-qgs-wps on linux machine using archive tar file and ended up 
incompatibility issue between python version - qgis installation and 
the service.


If it’s not more of an effort, can you please guide me to any 
installation instructions? Thanks
Can you be more specific about the error your are facing ? if that's 
about py-qgs-wps then you should open an issue on github.


-Prem

On Thu, 25 Feb 2021 at 7:44 PM, Prem Kumar > wrote:


HI Nyall and René-Luc,

Thank you very much for the pointers, much appreciated. Looks to
me, a lot to learn some good stuff. Will let you know how it goes.

-Prem

On Thu, Feb 25, 2021 at 6:59 PM René-Luc Dhont mailto:rldh...@gmail.com>> wrote:


Le 24/02/2021 à 23:27, Nyall Dawson a écrit :
>
> Look into the "WPS" standard. There's even an existing
server for
> this: https://github.com/3liz/py-qgis-wps


Thanks Nyall to pointing it.

Prem, If you are interested in a REST API, implementing the
OGC API
Processes standard is  being considered for py-qgis-wps
* https://github.com/opengeospatial/ogcapi-processes/

* https://ogcapi.ogc.org/processes/


py-qgis-wps is based on Tornado and any contributions are welcome.
https://github.com/3liz/py-qgis-wps


René-Luc

>
> Nyall
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org

> List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer

> Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org

List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer

Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] QGIS Server now install a full DE?

2020-05-20 Thread David Marteau

Hi,

Qgis server is built on top of the Qgis codebase. Qgis  require Qt. Qt 
packages come with all the dependencies, needed or not, to run Qt 
applications in the large.


The problem is mainly Qt packaging, and there is not much you can do 
about this (you may ask why Qgis desktop need gstreamer on linux !)


Le 20/05/2020 à 07:49, Uros Preloznik a écrit :

Hi,

Maybe I did open different question with Python support, but I still 
think default setup of QGIS Server should be as light as possible for 
running standard OGC requests. If you have demand for specific tasks 
then you will know what to do to enable Python support and go with 
plugins. It used to be like that before.


So then we have this issue with installing bunch of unneeded packages. 
I would open issue about that for start.


best regards
Uroš

V V tor., 19. maj 2020 ob 18:35 je oseba Marco Bernasocchi 
mailto:ma...@opengis.ch>> napisala:


Hi Uros

On 19.05.20 11:03, Uros Preloznik wrote:

I think main question is does QGIS Server needs dependency to
python?


Unless you want to kill server plugins. Maybe it could be a
separated qgis-server-python package. but as Bas said, it seems a
different issue.

Cheers

Marco

-- 
Marco Bernasocchi

OPENGIS.ch CEO
QGIS.org Chair
ma...@opengis.ch <mailto:ma...@opengis.ch>
+41 (0)79 467 24 70 

OPENGIS.ch Logo <https://www.opengis.ch>


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

--

David Marteau
Responsable Infrastructure
www.3liz.com <http://www.3liz.com>

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Processing algorithms in Qgis serveur

2020-04-23 Thread David Marteau

Hi Patrick,

If you want to run processing algorithm in qgis server you will need to 
write a dedicated server plugin for that, if may fullfill your


needs if you are not too much demanding. If you intend to run Qgis 
processing as a service then I strongly suggest to look at the WPS 
protocol in a dedicated


server.


Le 23/04/2020 à 14:02, Jorge Gustavo Rocha a écrit :

Hi Patrick,

David Marteau did a presentation in FOSS4G related with QGIS Server and
server side processing. Please check
https://www.youtube.com/watch?v=YL1tdcJwimA

Regards,

Jorge Gustavo

On 23/04/20 06:26, PALMIER Patrick (Responsable de groupe) -
CEREMA/DTerNP/DATHa/MT wrote:

Hello,

Is there any documentation, tutorial or examples to show how to run
processing algorithms in Qqis server?


Thanks


Patrick Palmier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


J. Gustavo

--

David Marteau
Responsable Infrastructure
www.3liz.com <http://www.3liz.com>

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Server manual

2020-04-17 Thread David Marteau


Le 17/04/2020 à 13:44, Alessandro Pasotti a écrit :

Should we also add the new standalone development server to the manual?


IMHO we should document the various ways to setup a server: fcgi, 
development, python...






On Fri, Apr 17, 2020 at 1:23 PM Etienne Trimaille
 wrote:

Hi,

Yes it's not easy, between what is the minimum to do, what is highly 
recommended, between Apache/NGinx etc.
So I think you can go ahead, we will follow your PR.

I'm also keeping some notes, I will try to make a PR next week to incorporate 
them.

Le ven. 17 avr. 2020 à 13:17, David Marteau  a écrit :

Hi Paolo

No problem for helping you on this task, take the lead.

David

Le 17/04/2020 à 11:17, Paolo Cavallini a écrit :

Hi all,
I'm working ont he server section of the manual:
https://docs.qgis.org/3.10/en/docs/user_manual/working_with_ogc/server/getting_started.html
and I'm finding a number of inconsistencies which I'm fixing. More
generally, I find it rather confusing. I'd suggest to reorganize it by
first showing the very basic setup, with a minimal set of
configurations, and adding more sophisticated configs after that. I
found this approach very effective in our training.
Is there an agreement on that? Anyone interested in cooperating?
Thanks in advance.
All the best.

--

David Marteau
Responsable Infrastructure
www.3liz.com

Tel. 06 63 02 89 83
Bureau
31, rue de l'Argenterie
34000 Montpellier
Siège social
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




--

David Marteau
Responsable Infrastructure
www.3liz.com <http://www.3liz.com>

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Server manual

2020-04-17 Thread David Marteau

Hi Paolo

No problem for helping you on this task, take the lead.

David

Le 17/04/2020 à 11:17, Paolo Cavallini a écrit :

Hi all,
I'm working ont he server section of the manual:
https://docs.qgis.org/3.10/en/docs/user_manual/working_with_ogc/server/getting_started.html
and I'm finding a number of inconsistencies which I'm fixing. More
generally, I find it rather confusing. I'd suggest to reorganize it by
first showing the very basic setup, with a minimal set of
configurations, and adding more sophisticated configs after that. I
found this approach very effective in our training.
Is there an agreement on that? Anyone interested in cooperating?
Thanks in advance.
All the best.

--

David Marteau
Responsable Infrastructure
www.3liz.com <http://www.3liz.com>

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Reporting security related issues ?

2020-02-12 Thread David Marteau

Hi Richard,

I would like to be added to the list, please .

Thank you

David.


Le 12/02/2020 à 13:19, Richard Duivenvoorde a écrit :

FYI: I've just created an email(group) address for this:

secur...@qgis.org

Emails to that address will be forwarded to PSC members and members of
admin-group.

If individuals/core-members want to be added, please let me know so I
can add you to that group.

Regards,

Richard Duivenvoorde

On 12/02/2020 09.00, Paolo Cavallini wrote:

Hi,
generally here. If you think it is a grave vulnerability you can send it
privately to any PSC member or major QGIS developer (you can check on
GitHub for recent activity).
Thanks!

Il 11/02/20 19:56, security minded ha scritto:

Hello,

What is the best way to report security issues affecting QGIS ?

Thanks

OSSSecurityMinded

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

--

David Marteau
Responsable Infrastructure
www.3liz.com <http://www.3liz.com>

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server: warnings vs info

2020-02-04 Thread David Marteau

Hi,

Yes, there is some log messages that are not output with the correct log 
level, should be fixed in near future.


Le 03/02/2020 à 19:26, Tomas Straupis a écrit :

Hello

   While reading QGIS Server logs I wonder if this has some idea or is an error.

   After QGIS Server starts running ok I assume it is normal to change
QGIS_SERVER_LOG_LEVEL to 1 - do not show INFO type messages which
quickly go into hundreds of megs of text on a busy server.
   But if I understand correctly, some messages go into incorrect
levels thus both adding unnecessary info messages as well as hiding
important info.

   For example:
   1. Excessive warning level messages include:
   * formatString is: image/png (server/qgsrequesthandler.cpp)
   * Adding service SampleService 1.0, WCS 1.0.0 etc. etc.
(servce/qgsserviceregistry.cpp)

   2. Missing important info message:
   * The layer 'ABC' does not
exist. (services/wms/qgswmsserviceexception.h)

   Am I missing something?

   Thank you


--

David Marteau
Responsable Infrastructure
www.3liz.com <http://www.3liz.com>

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server Dev on osgeo4w

2019-12-12 Thread David Marteau
Hi Matthias,

Is this only Windows related or do you have the same issue on Linux ?
-- 
David Marteau 
Responsable Infrastructure
www.3liz.com <http://www.3liz.com/> 

Tel. 06 63 02 89 83 
Bureau 
31, rue de l'Argenterie 
34000 Montpellier 
Siège social 
73, allée Kleber 
Boulevard de Strasbourg 
34000 Montpellier

> Le 12 déc. 2019 à 17:29, Matthias Kuhn  a écrit :
> 
> Hi,
> 
> I wanted to test qgis server nightly build on a windows machine. The 3.10 
> version runs fine on the same machine, but as soon as in the apache conf all 
> occurrences of "app\qgis" are replaced with "app\qgis-dev" in all paths, qgis 
> server dies upon each request (apparently before being able to log anything).
> 
> - Did someone else manage to run this version and should I therefore assume a 
> local problem?
> 
> Interestingly, it seems qgis server is shipped in the qgis-dev package 
> whereas there are separate qgis-server and qgis-ltr-server packages for 3.4 
> and 3.10. Is this a difference of nightly builds compared to regular builds 
> or a recent restructuring of the packages?
> 
> Thanks for any hints
> 
> -- 
> Matthias Kuhn
> matth...@opengis.ch  <mailto:matth...@opengis.ch>
> +41 (0)76 435 67 63 
>  
> <http://www.opengis.ch/>___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Why packaging python-gdal with Qgis3 ?

2019-11-18 Thread David Marteau
Hi,

Just a question: why python-gdal is still required for installing Qgis3 debian 
packages ? It adds a lot of unnecessary packages.

From 'apt show python3-qgis-common':
===
Package: python3-qgis-common
Version: 1:3.4.13+14stretch
Priority: optional
Section: python
Source: qgis
Maintainer: QGIS developers 
Installed-Size: 14.8 MB
Depends: gdal-bin, python-gdal, python3-gdal, python3-matplotlib, 
libqgis-customwidgets (>= 1:3.4.13+14stretch), python3:any (>= 3.3.2-2~)
…
===

Thx,

David
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QgsLogger in standalone app

2019-10-16 Thread David Marteau

Yes, you have to connect a hook to the messageReceived slot: see 
https://github.com/3liz/py-qgis-server/blob/master/pyqgisserver/utils/qgis.py#L106
 

 for an example.

> Le 16 oct. 2019 à 09:38, VOLPES-EXT, Jacky 
>  a écrit :
> 
> Hi,
> Is it possible to get the output of QgsLogger from a pyqgis standalone app ?
>  
> I would like to have the warnings and everything sent by QgsLogger in my 
> console while running the app, but when I set the environment variable 
> QGIS_DEBUG to 1, 2, or 3 nothing is printed on the console, although I’m sure 
> that a message should be printed (a layer form not found).
>  
> If I instanciate a QgsLogger in my pyqgis app it works, but I want to see 
> messages from QgisApplication logger (C++).
>  
> Thanks, 
> BR
>  
> Jacky Volpes
> HR Team pour la Société du Canal de Provence | 2SI - QGIS
> Le Tholonet, CS70064
> jacky.volpes-...@canal-de-provence.com 
> 
>  
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] nightly-release not available

2019-08-01 Thread David Marteau
Hi,

It seems that nightly-release is broken for Debian buster: packages files 
https://qgis.org/debian-nightly-release/dists/buster/main/binary-i386/Packages 

 is empty and installation from this repo gives 
'E: Unable to locate package' errors.

David,___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server and native Processing algorithms

2019-07-10 Thread David Marteau


> Le 10 juil. 2019 à 08:44, Alessandro Pasotti  a écrit :
> 
> 
> did you call 
> QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms()) ?

You may need to call the above, before calling  'Processing.initialize()'  

> 
> On Wed, Jul 10, 2019 at 8:42 AM Alexander Bruy  > wrote:
> Hi,
> 
> I need to access Processing algorithms from the QGIS Server plugin.
> But any attempt to call any Processing algorithm failed with following
> error message in
> the logs
> 
> CRITICAL Processing[2960]: Error: Algorithm native:clip not found
> 
> In the same time I can access analysis classes like QgsHillshadeFilter
> or QgsZonalStatistics.
> 
> Is it possible to access Processing algorithms from server plugins?
> 
> Thanks
> -- 
> Alexander Bruy
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Bug in QgsPathResolver ?

2019-04-23 Thread David Marteau


> Le 23 avr. 2019 à 23:35, Nyall Dawson  a écrit :
> 
> On Fri, 19 Apr 2019 at 23:24, David Marteau  <mailto:dmart...@3liz.com>> wrote:
>> 
>> Hi devs,
>> 
>> I have  a strange behavior with QgsPathResolver that prevent layer to be 
>> loaded if a QgsProject read config file from relative path:
>> 
>> The problem has been reduced to the following behavior (pyQgis):
>> 
>> ```
>> # Init a QgsPathResolver as with a relative path
>> pr = QgsPathResolver('./geography/data/france_parts.qgs')
> 
> Isn't this an odd/dangerous/fragile situation to begin with? I'd be in
> favour of requiring QgsPathResolver to accept only absolute paths in
> the constructor.

Hi,

That would mean that only absolute may be passed to QgsProjet::read(), why not, 
it's  a decision to make; I cannot
tell it there would be side effects or not.

but IMHO, in all case,  I think we should have explicite error/warnings and not 
end with 
meaningless path (see below) and ' unavailable layers found' errors which is 
confusing.

Regards
David,

> 
> Nyall
> 
> 
>> 
>> pr.readPath('./france_parts/france_parts.shp')
>> # Output -> '/geography/data/france_parts/france_parts.shp'
>> # Note the leading '/'
>> ```
>> 
>> Worst:
>> ```
>> pr = QgsPathResolver('../geography/data/france_parts.qgs')
>> 
>> pr.readPath('./france_parts/france_parts.shp')
>> # Output -> '/../geography/data/france_parts/france_parts.shp'
>> # which is a meaningless path
>> ```
>> 
>> The side effect is that if you do:
>> ```
>> prj = QgsProject()
>> prj.read("./geography/data/france_parts.qgs")
>> ```
>> then you get the error:
>> ```
>> 
>> Qgis OGR: Cannot open /geography/data/france_parts/france_parts.shp.()
>> Qgis : 1 unavailable layers found:
>> Qgis :  * ./france_parts/france_parts.shp
>> 
>> ```
>> 
>> This is with Qgis 3.6.1
>> 
>> Can anybody confirm that this behavior is a bug ? I will submit a PR  if 
>> this is the case.
>> Thanks,
>> 
>> Cheers
>> David
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Bug in QgsPathResolver ?

2019-04-19 Thread David Marteau
Hi devs,

I have  a strange behavior with QgsPathResolver that prevent layer to be loaded 
if a QgsProject read config file from relative path:

The problem has been reduced to the following behavior (pyQgis):

```
# Init a QgsPathResolver as with a relative path
pr = QgsPathResolver('./geography/data/france_parts.qgs')

pr.readPath('./france_parts/france_parts.shp')
# Output -> '/geography/data/france_parts/france_parts.shp' 
# Note the leading '/'
```

Worst:
```
pr = QgsPathResolver('../geography/data/france_parts.qgs')

pr.readPath('./france_parts/france_parts.shp')
# Output -> '/../geography/data/france_parts/france_parts.shp' 
# which is a meaningless path
```

The side effect is that if you do:
```
prj = QgsProject()
prj.read("./geography/data/france_parts.qgs")
```
then you get the error:
```
Qgis OGR: Cannot open /geography/data/france_parts/france_parts.shp.()
Qgis : 1 unavailable layers found:
Qgis :  * ./france_parts/france_parts.shp
```

This is with Qgis 3.6.1

Can anybody confirm that this behavior is a bug ? I will submit a PR  if this 
is the case.
Thanks,

Cheers
David

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Which Docker do you use?

2019-04-18 Thread David Marteau
Hi,

We (at 3liz) publish a qgis docker platform to be used as base image for 
running  qgis server or other qgis based application:

The docker file is on github: https://github.com/3liz/docker-qgis-platform 
 and you can pull images from 
dockerhub: https://hub.docker.com/r/3liz/qgis-platform 


We have images from release (buster), nigtly-release (buster),  ltr (stretch),  
nightly-ltr (stretch)

You will find a full-featured/ready-to-run qgis-server here: 
https://hub.docker.com/r/3liz/qgis-map-server 
 (Dockerfile at: 
https://github.com/3liz/docker-qgis-server 
) 

These images are based on the qgis.org  debian packages and 
not from a custom build.   

If you plan to run qgis server, you may need to start a frame-buffered X server 
with Xvfb, if not, fonts are not found by Qt and no labels are rendered.

See here for an example a starting an Xvfb server before running a qgis server: 
https://github.com/3liz/docker-qgis-server/blob/master/docker-entrypoint.sh#L33

David,



> Le 18 avr. 2019 à 15:52, Luca Manganelli  a 
> écrit :
> 
> Hi,
> 
> I'm testing the Dockerhub's camptocamp qgis-server running on docker, but it 
> seems that it has some problems (i.e. not rendering labels).
> Furthermore, it seems strange that I cannot find any repository about this 
> Dockerfile.
> I see that there another, like openquake.
> 
> Which one do you use? I'm trying to use the one that supports QGIS 3 LTR (at 
> moment 3.4.6).
> 
> Thank you in advance :-)
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Globally setting FI_POINT_TOLERANCE on QGIS server

2019-04-16 Thread David Marteau
Updated for qgis3: 
https://github.com/3liz/qgis-wmsGetFeatureInfoPrecision/blob/master/wmsGetFeatureInfoPrecision.py

Warning, because of https://github.com/qgis/QGIS/pull/9773 
 configuration located at the project 
path is not fully supported yet.


David

> Le 16 avr. 2019 à 16:01, René-Luc Dhont  a écrit :
> 
> Hi Andreas,
> 
> We have build a plugin for doing so.
> It is available for QGIS 2 and we are working on proting it to QGIS 3.
> https://github.com/3liz/qgis-wmsGetFeatureInfoPrecision 
> 
> 
> Regards,
> René-Luc
> 
> Le 16/04/2019 à 15:53, Alessandro Pasotti a écrit :
>> 
>> On Tue, Apr 16, 2019 at 3:46 PM Andreas Neumann > > wrote:
>> Hi,
>> 
>> I wonder if it is possible to globally set/influence the FI_POINT_TOLERANCE 
>> in QGIS server?
>> 
>> We'd like to configure QGIS server such, that by default it is a bit more 
>> tolerant (using a larger search radius) for point features.
>> 
>> I know that the client can set the FI_POINT_TOLERANCE on GetFeatureInfo 
>> request, but what if the client doesn't know about QGIS and these special 
>> parameters?
>> 
>> Could this be set globally in QGIS server by an environment variable?
>> 
>> 
>> No, that's not possible.
>> 
>> 
>> Thanks for your reply and greetings,
>> 
>> Andreas
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> 
>> -- 
>> Alessandro Pasotti
>> w3:   www.itopen.it 
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] FOSS4G CFP proposals around QGIS

2019-04-15 Thread David Marteau
Hi Andreas,

We have submitted (at least) 2 Talks:

- WPS with Qgis Processing - From desktop to server.
- QGIS: No more plugins only processings.

David


> Le 15 avr. 2019 à 12:17, Andreas Neumann  a écrit :
> 
> Hi,
> 
> Today is the last day submitting workshop and presentation proposals.
> 
> I wonder who/what was already submitted, so I could potentially help to fill 
> in gaps?
> 
> I could submit something around "tips&tricks with layouts/atlas/reports" 
> (including usage of variables and expressions).
> 
> How about
> 
> QGIS server improvements (OGC validation, etc.)
> Behind the scenes of QGIS.ORG (it was presented in Dresden at FOSSGIS by 
> Anita and in A Coruna by myself; but I think not yet at a FOSS4G conf)
> QGIS 3D (Lutra-guys - are you participating?)
> How about doing a workshop around 3D and mesh rendering?
> 
> Thanks for your replies and greetings,
> 
> Andreas
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Inconsistency in QgsServerRequest parameter handling ?

2019-04-10 Thread David Marteau

> Le 10 avr. 2019 à 23:21, pblottiere  a écrit :
> 
> Hi David,
> 
> 
>> If you try:
>> 
>> request.setParameter('FOOBAR','foobar')
>> 
>> then
>> 
>> request.parameter('FOOBAR')
>> 
>> then you get an empty string,
>>> Even if I add  an 'allowed' parameter by hand:
>>> 
>>>> request.setParameter('FI_POINT_TOLERANCE','25')
> 
> Actually, QgsServerRequest and QgsServerParameters are high level
> classes which are not aware of valid parameters defined in services. For
> example, FI_POINT_TOLERANCE is a valid parameter in WMS service, and
> defined within the WMS module. But it's totally encapsulated within the
> module (a shared library so), and considered as unknown from
> QgsServerParameters. The only valid parameters from the
> QgsServerParameters point of view are those which are common for all
> services (WMS, WFS, and so on) like SERVICE, VERSION, REQUEST, ...
> 
> If you want to retrieve the full query from the request without any
> filter on valid parameters, you may use request.url(). However, I think
> we could probably add a fallback on the `parameter()` method to return
> invalid parameters too. I'll do a PR tomorrow and I'll ping you to check
> if the behaviour suits you.
> 
> 

Yes, this is what I was thinking about Looking at the code: maybe adding a 
lookup to the 'unmanaged' parameters if the code is not found should restore 
the symmetry setParameter/parameter.

I'm standing from the python plugin's point of view - services and filters: 
plugins are expecting some behavior when setting/getting parameters. If a 
plugin override a parameter it can only doing it using the requestHandler which 
is aware
only of the  base QgsServerParameters owned by the  QgsServerRequest instance, 
so they should be able to set/get parameters in a transparent way.

Regards

David.

> Regards,
> 
> Paul
> 
> 
> On 4/10/19 10:37 PM, David Marteau wrote:
>> To add some precision:
>> 
>> Even if I add  an 'allowed' parameter by hand:
>> 
>>> request.setParameter('FI_POINT_TOLERANCE','25')
>> then
>> 
>>> request.parameter('FI_POINT_TOLERANCE')
>> return an empty string
>> 
>>> Le 10 avr. 2019 à 19:46, David Marteau  a écrit :
>>> 
>>> 
>>> Hi devs,
>>> 
>>> I found a strange and seemingly inconsistent behavior when accessing 
>>> QgsServerRequest parameters:
>>> 
>>> If you try:
>>> 
>>> request.setParameter('FOOBAR','foobar')
>>> 
>>> then
>>> 
>>> request.parameter('FOOBAR')
>>> 
>>> then you get an empty string,
>>> 
>>> If you call
>>> 
>>> request.parameters() 
>>> 
>>> Then your get a dictionary with all the values previously set.
>>> 
>>> At first glance it seems that request.setParameter enforce use of a limited 
>>> set of keys (SERVICE…..
>>> 
>>> This does not seem very consistent with the fact parameter() should return 
>>> any value previously set with setParameter and also the fact that
>>> request.parameters()  return all previously defined  parameters key/values .
>>> 
>>> Furthemore this may be  problematic with plugins that define services in 
>>> python and thus may define any other set of allowed parameters.
>>> 
>>> Should I open an issue ?
>>> 
>>> David
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Inconsistency in QgsServerRequest parameter handling ?

2019-04-10 Thread David Marteau
To add some precision:

Even if I add  an 'allowed' parameter by hand:

> request.setParameter('FI_POINT_TOLERANCE','25')

then

> request.parameter('FI_POINT_TOLERANCE')

return an empty string

> Le 10 avr. 2019 à 19:46, David Marteau  a écrit :
> 
> 
> Hi devs,
> 
> I found a strange and seemingly inconsistent behavior when accessing 
> QgsServerRequest parameters:
> 
> If you try:
> 
> request.setParameter('FOOBAR','foobar')
> 
> then
> 
> request.parameter('FOOBAR')
> 
> then you get an empty string,
> 
> If you call
> 
> request.parameters() 
> 
> Then your get a dictionary with all the values previously set.
> 
> At first glance it seems that request.setParameter enforce use of a limited 
> set of keys (SERVICE…..
> 
> This does not seem very consistent with the fact parameter() should return 
> any value previously set with setParameter and also the fact that
> request.parameters()  return all previously defined  parameters key/values .
> 
> Furthemore this may be  problematic with plugins that define services in 
> python and thus may define any other set of allowed parameters.
> 
> Should I open an issue ?
> 
> David

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Inconsistency in QgsServerRequest parameter handling ?

2019-04-10 Thread David Marteau

Hi devs,

I found a strange and seemingly inconsistent behavior when accessing 
QgsServerRequest parameters:

If you try:

request.setParameter('FOOBAR','foobar')

then

request.parameter('FOOBAR')

then you get an empty string,

If you call

request.parameters() 

Then your get a dictionary with all the values previously set.

At first glance it seems that request.setParameter enforce use of a limited set 
of keys (SERVICE…..

This does not seem very consistent with the fact parameter() should return any 
value previously set with setParameter and also the fact that
request.parameters()  return all previously defined  parameters key/values .

Furthemore this may be  problematic with plugins that define services in python 
and thus may define any other set of allowed parameters.

Should I open an issue ?

David
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-29 Thread David Marteau
Hi,

You need also to install the qgis-server package because libraires for the 
services are provided by this package: 

/usr/lib/qgis/server
/usr/lib/qgis/server/libdummy.so
/usr/lib/qgis/server/libwcs.so
/usr/lib/qgis/server/libwfs.so
/usr/lib/qgis/server/libwms.so
/usr/lib/qgis/server/libwmts.so

Without these libraries the server  api is not working as expected, may be 
these libs should be part of libqgis-serverX.Y.Z ?

So, If I summarize, in order to have a functional server API on buster, one 
need to install

- python3-qgis
- qgis-server (which depends on qgis-providers)

Is that a transitional scheme ? 

Thanks,


> Le 29 mars 2019 à 09:13, David Marteau  a écrit :
> 
> Hi Jürgen,
> 
> Thanks. Installing only  python3-qgis leads to a better situation:
> 
> ii  libqgis-3d3.6.1 1:3.6.1+15busteramd64 
>QGIS - shared 3d library
> ii  libqgis-analysis3.6.1   1:3.6.1+15busteramd64 
>QGIS - shared analysis library
> ii  libqgis-core3.6.1   1:3.6.1+15busteramd64 
>QGIS - shared core library
> ii  libqgis-customwidgets   1:3.6.1+15busteramd64 
>QGIS custom widgets for Qt Designer
> ii  libqgis-gui3.6.11:3.6.1+15busteramd64 
>QGIS - shared gui library
> ii  libqgis-native3.6.1 1:3.6.1+15busteramd64 
>QGIS - shared native gui library
> ii  libqgis-server3.6.1 1:3.6.1+15busteramd64 
>QGIS - shared server library
> ii  libqgispython3.6.1  1:3.6.1+15busteramd64 
>QGIS - shared Python library
> ii  python3-qgis1:3.6.1+15busteramd64 
>Python bindings to QGIS
> ii  python3-qgis-common 1:3.6.1+15busterall   
>Python bindings to QGIS - architectu
> 
> But the providers  are missing: you need also to install the 'qgis-providers' 
> package which, fortunately, has dependencies 
> only on 3.6.1 package version.
> 
> David
> 
> 
>> Le 28 mars 2019 à 23:45, Jürgen E. Fischer > <mailto:j...@norbit.de>> a écrit :
>> 
>> Hi David,
>> 
>> On Thu, 28. Mar 2019 at 19:25:15 +0100, David Marteau wrote:
>>> I have found the problem, qgis packaging on buster is totally broken: it 
>>> mixes 3.6.0 and 3.6.1 dependencies
>> 
>>> If you try to install  python-qgis you get the following packages installed:
>> 
>> You should install python3-qgis.
>> 
>> 
>> Jürgen
>> 
>> -- 
>> Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
>> Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
>> Software Engineer   D-26506 Nordenhttps://www.norbit.de 
>> <https://www.norbit.de/>
>> QGIS release manager (PSC)  GermanyIRC: jef on FreeNode
>> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
>> Rheinstrasse 13, 26506 Norden
>> GF: Juergen Fischer, Nils Kutscher HR: Amtsgericht Aurich HRB 100827
>> Datenschutzerklaerung: https://www.norbit.de/83/ <https://www.norbit.de/83/>
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-29 Thread David Marteau
Hi Jürgen,

Thanks. Installing only  python3-qgis leads to a better situation:

ii  libqgis-3d3.6.1 1:3.6.1+15busteramd64   
 QGIS - shared 3d library
ii  libqgis-analysis3.6.1   1:3.6.1+15busteramd64   
 QGIS - shared analysis library
ii  libqgis-core3.6.1   1:3.6.1+15busteramd64   
 QGIS - shared core library
ii  libqgis-customwidgets   1:3.6.1+15busteramd64   
 QGIS custom widgets for Qt Designer
ii  libqgis-gui3.6.11:3.6.1+15busteramd64   
 QGIS - shared gui library
ii  libqgis-native3.6.1 1:3.6.1+15busteramd64   
 QGIS - shared native gui library
ii  libqgis-server3.6.1 1:3.6.1+15busteramd64   
 QGIS - shared server library
ii  libqgispython3.6.1  1:3.6.1+15busteramd64   
 QGIS - shared Python library
ii  python3-qgis1:3.6.1+15busteramd64   
 Python bindings to QGIS
ii  python3-qgis-common 1:3.6.1+15busterall 
 Python bindings to QGIS - architectu

But the providers  are missing: you need also to install the 'qgis-providers' 
package which, fortunately, has dependencies 
only on 3.6.1 package version.

David


> Le 28 mars 2019 à 23:45, Jürgen E. Fischer  a écrit :
> 
> Hi David,
> 
> On Thu, 28. Mar 2019 at 19:25:15 +0100, David Marteau wrote:
>> I have found the problem, qgis packaging on buster is totally broken: it 
>> mixes 3.6.0 and 3.6.1 dependencies
> 
>> If you try to install  python-qgis you get the following packages installed:
> 
> You should install python3-qgis.
> 
> 
> Jürgen
> 
> -- 
> Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
> Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
> Software Engineer   D-26506 Nordenhttps://www.norbit.de
> QGIS release manager (PSC)  GermanyIRC: jef on FreeNode
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Juergen Fischer, Nils Kutscher HR: Amtsgericht Aurich HRB 100827
> Datenschutzerklaerung: https://www.norbit.de/83/
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-28 Thread David Marteau
I Forgot to mention that they are the packages from the 
https://qgis.org/debian/ <https://qgis.org/debian/> repository and not the the 
packages from the debian distro.

> Le 28 mars 2019 à 19:25, David Marteau  a écrit :
> 
> Hi Alessandro
> 
> I have found the problem, qgis packaging on buster is totally broken: it 
> mixes 3.6.0 and 3.6.1 dependencies
> 
> If you try to install  python-qgis you get the following packages installed:
> 
> ii  libqgis-3d3.6.0 1:3.6.0+15busteramd64 
>QGIS - shared 3d library
> ii  libqgis-analysis3.6.0   1:3.6.0+15busteramd64 
>QGIS - shared analysis library
> ii  libqgis-core3.6.0   1:3.6.0+15busteramd64 
>QGIS - shared core library 
> ii  libqgis-core3.6.1   1:3.6.1+15busteramd64 
>QGIS - shared core library
> ii  libqgis-customwidgets   1:3.6.1+15busteramd64 
>QGIS custom widgets for Qt Designer
> ii  libqgis-gui3.6.01:3.6.0+15busteramd64 
>QGIS - shared gui library
> ii  libqgis-gui3.6.11:3.6.1+15busteramd64 
>QGIS - shared gui library
> ii  libqgis-native3.6.0 1:3.6.0+15busteramd64 
>QGIS - shared native gui library
> ii  libqgis-native3.6.1 1:3.6.1+15busteramd64 
>QGIS - shared native gui library
> ii  libqgis-server3.6.0 1:3.6.0+15busteramd64 
>QGIS - shared server library
> ii  libqgispython3.6.0  1:3.6.0+15busteramd64 
>QGIS - shared Python library
> ii  python-qgis 1:3.6.0+15busteramd64 
>Python bindings to QGIS
> ii  python-qgis-common  1:3.6.0+15busterall   
>Python bindings to QGIS - architecture-independent files
> 
> Packages are installed twice in both version 3.6.0 and 3.6.1 !
> 
> This lead to very unpredictible behavior when using qgis in python (simply 
> not working or crashing randomly)
> 
> 
> David,
> 
>> Le 26 mars 2019 à 18:38, David Marteau > <mailto:dmart...@3liz.com>> a écrit :
>> 
>> 
>> Hi Alessandro
>> 
>> No there is nothing at all in the logs.
>> 
>> I have used the same reduced snippet on qgis 3.4.5 (ltr) on Stretch and qgis 
>> 3.6.0 (release) on buster, using the same datasource:
>> 
>> ```
>> import os
>> from qgis.core import QgsApplication, QgsVectorLayer
>> 
>> # prevent display not found error
>> os.environ['QT_QPA_PLATFORM'] = 'offscreen'
>> 
>> qgis_application = QgsApplication([], False )
>> layer = QgsVectorLayer('path/to/data')
>> 
>> layer.isValid() # Return True on 3.4.5/stretch, False on 3.6.0/buster 
>> whatever the data
>> ```
>> 
>> If the release package has not been updated in the previous  24 h, I suspect 
>> that something has been broken on the buster distro.
>> 
>> Note that I'm able to load shapefile in python with ogr (gdal-python).
>> 
>> 
>>> Le 26 mars 2019 à 17:47, Alessandro Pasotti >> <mailto:apaso...@gmail.com>> a écrit :
>>> 
>>> 
>>> On Tue, Mar 26, 2019 at 5:45 PM David Marteau >> <mailto:dmart...@3liz.com>> wrote:
>>> 
>>> The situation seems to be worst: it seems that no layers can be read from 
>>> python whatever the format.
>>> 
>>> 
>>>> Le 26 mars 2019 à 17:38, David Marteau >>> <mailto:dmart...@3liz.com>> a écrit :
>>>> 
>>>> Hi devs,
>>>> 
>>>> We use to build docker images of the latest qgis releases and we have a 
>>>> regression  affecting version 3.6.0 official release on buster
>>>> 
>>>> Qgis: 3.6.0 on Debian
>>>> 
>>>> If we read a layer with python:
>>>> 
>>>>> layer = QgsVectorLayer('./mydata.shp')
>>>> 
>>>> Then the layer is invalid (no warning, no errors)
>>>> 
>>>> Doing the same thing on stretch + Qgis 3.4.5 (ltr) with same data work 
>>>> flawlessly and lead to a valid layer.
>>>> 
>>>> This was not affecting previous build 24 h ago (release end 
>>>> nightly-release)
>>>> 
>>>> The tests were based with shapefiles from testdata in qgis sources.
>>>> 
>>>> We are not sure it that come from Qgis itself or from a change on the 
>>>> distribution.
>>>> 
>>>> David,
>>>> 
>>> 
>>> 
>>> Hi David,
>>> 
>>> anything in the logs?
>>> 
>>> I would check QGIS_PREFIX_PATH env var, and make sure the provider 
>>> libraries are found and loaded.
>>> 
>>> 
>>> -- 
>>> Alessandro Pasotti
>>> w3:   www.itopen.it <http://www.itopen.it/>
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-28 Thread David Marteau
Hi Alessandro

I have found the problem, qgis packaging on buster is totally broken: it mixes 
3.6.0 and 3.6.1 dependencies

If you try to install  python-qgis you get the following packages installed:

ii  libqgis-3d3.6.0 1:3.6.0+15busteramd64   
 QGIS - shared 3d library
ii  libqgis-analysis3.6.0   1:3.6.0+15busteramd64   
 QGIS - shared analysis library
ii  libqgis-core3.6.0   1:3.6.0+15busteramd64   
 QGIS - shared core library 
ii  libqgis-core3.6.1   1:3.6.1+15busteramd64   
 QGIS - shared core library
ii  libqgis-customwidgets   1:3.6.1+15busteramd64   
 QGIS custom widgets for Qt Designer
ii  libqgis-gui3.6.01:3.6.0+15busteramd64   
 QGIS - shared gui library
ii  libqgis-gui3.6.11:3.6.1+15busteramd64   
 QGIS - shared gui library
ii  libqgis-native3.6.0 1:3.6.0+15busteramd64   
 QGIS - shared native gui library
ii  libqgis-native3.6.1 1:3.6.1+15busteramd64   
 QGIS - shared native gui library
ii  libqgis-server3.6.0 1:3.6.0+15busteramd64   
 QGIS - shared server library
ii  libqgispython3.6.0  1:3.6.0+15busteramd64   
 QGIS - shared Python library
ii  python-qgis 1:3.6.0+15busteramd64   
 Python bindings to QGIS
ii  python-qgis-common  1:3.6.0+15busterall 
 Python bindings to QGIS - architecture-independent files

Packages are installed twice in both version 3.6.0 and 3.6.1 !

This lead to very unpredictible behavior when using qgis in python (simply not 
working or crashing randomly)


David,

> Le 26 mars 2019 à 18:38, David Marteau  a écrit :
> 
> 
> Hi Alessandro
> 
> No there is nothing at all in the logs.
> 
> I have used the same reduced snippet on qgis 3.4.5 (ltr) on Stretch and qgis 
> 3.6.0 (release) on buster, using the same datasource:
> 
> ```
> import os
> from qgis.core import QgsApplication, QgsVectorLayer
> 
> # prevent display not found error
> os.environ['QT_QPA_PLATFORM'] = 'offscreen'
> 
> qgis_application = QgsApplication([], False )
> layer = QgsVectorLayer('path/to/data')
> 
> layer.isValid() # Return True on 3.4.5/stretch, False on 3.6.0/buster 
> whatever the data
> ```
> 
> If the release package has not been updated in the previous  24 h, I suspect 
> that something has been broken on the buster distro.
> 
> Note that I'm able to load shapefile in python with ogr (gdal-python).
> 
> 
>> Le 26 mars 2019 à 17:47, Alessandro Pasotti > <mailto:apaso...@gmail.com>> a écrit :
>> 
>> 
>> On Tue, Mar 26, 2019 at 5:45 PM David Marteau > <mailto:dmart...@3liz.com>> wrote:
>> 
>> The situation seems to be worst: it seems that no layers can be read from 
>> python whatever the format.
>> 
>> 
>>> Le 26 mars 2019 à 17:38, David Marteau >> <mailto:dmart...@3liz.com>> a écrit :
>>> 
>>> Hi devs,
>>> 
>>> We use to build docker images of the latest qgis releases and we have a 
>>> regression  affecting version 3.6.0 official release on buster
>>> 
>>> Qgis: 3.6.0 on Debian
>>> 
>>> If we read a layer with python:
>>> 
>>>> layer = QgsVectorLayer('./mydata.shp')
>>> 
>>> Then the layer is invalid (no warning, no errors)
>>> 
>>> Doing the same thing on stretch + Qgis 3.4.5 (ltr) with same data work 
>>> flawlessly and lead to a valid layer.
>>> 
>>> This was not affecting previous build 24 h ago (release end nightly-release)
>>> 
>>> The tests were based with shapefiles from testdata in qgis sources.
>>> 
>>> We are not sure it that come from Qgis itself or from a change on the 
>>> distribution.
>>> 
>>> David,
>>> 
>> 
>> 
>> Hi David,
>> 
>> anything in the logs?
>> 
>> I would check QGIS_PREFIX_PATH env var, and make sure the provider libraries 
>> are found and loaded.
>> 
>> 
>> -- 
>> Alessandro Pasotti
>> w3:   www.itopen.it <http://www.itopen.it/>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-26 Thread David Marteau

Hi Alessandro

No there is nothing at all in the logs.

I have used the same reduced snippet on qgis 3.4.5 (ltr) on Stretch and qgis 
3.6.0 (release) on buster, using the same datasource:

```
import os
from qgis.core import QgsApplication, QgsVectorLayer

# prevent display not found error
os.environ['QT_QPA_PLATFORM'] = 'offscreen'

qgis_application = QgsApplication([], False )
layer = QgsVectorLayer('path/to/data')

layer.isValid() # Return True on 3.4.5/stretch, False on 3.6.0/buster whatever 
the data
```

If the release package has not been updated in the previous  24 h, I suspect 
that something has been broken on the buster distro.

Note that I'm able to load shapefile in python with ogr (gdal-python).


> Le 26 mars 2019 à 17:47, Alessandro Pasotti  a écrit :
> 
> 
> On Tue, Mar 26, 2019 at 5:45 PM David Marteau  <mailto:dmart...@3liz.com>> wrote:
> 
> The situation seems to be worst: it seems that no layers can be read from 
> python whatever the format.
> 
> 
>> Le 26 mars 2019 à 17:38, David Marteau > <mailto:dmart...@3liz.com>> a écrit :
>> 
>> Hi devs,
>> 
>> We use to build docker images of the latest qgis releases and we have a 
>> regression  affecting version 3.6.0 official release on buster
>> 
>> Qgis: 3.6.0 on Debian
>> 
>> If we read a layer with python:
>> 
>>> layer = QgsVectorLayer('./mydata.shp')
>> 
>> Then the layer is invalid (no warning, no errors)
>> 
>> Doing the same thing on stretch + Qgis 3.4.5 (ltr) with same data work 
>> flawlessly and lead to a valid layer.
>> 
>> This was not affecting previous build 24 h ago (release end nightly-release)
>> 
>> The tests were based with shapefiles from testdata in qgis sources.
>> 
>> We are not sure it that come from Qgis itself or from a change on the 
>> distribution.
>> 
>> David,
>> 
> 
> 
> Hi David,
> 
> anything in the logs?
> 
> I would check QGIS_PREFIX_PATH env var, and make sure the provider libraries 
> are found and loaded.
> 
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it <http://www.itopen.it/>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-26 Thread David Marteau

The situation seems to be worst: it seems that no layers can be read from 
python whatever the format.


> Le 26 mars 2019 à 17:38, David Marteau  a écrit :
> 
> Hi devs,
> 
> We use to build docker images of the latest qgis releases and we have a 
> regression  affecting version 3.6.0 official release on buster
> 
> Qgis: 3.6.0 on Debian
> 
> If we read a layer with python:
> 
>> layer = QgsVectorLayer('./mydata.shp')
> 
> Then the layer is invalid (no warning, no errors)
> 
> Doing the same thing on stretch + Qgis 3.4.5 (ltr) with same data work 
> flawlessly and lead to a valid layer.
> 
> This was not affecting previous build 24 h ago (release end nightly-release)
> 
> The tests were based with shapefiles from testdata in qgis sources.
> 
> We are not sure it that come from Qgis itself or from a change on the 
> distribution.
> 
> David,
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Qgis 3.6.0 fail to read shapefile with python on buster

2019-03-26 Thread David Marteau
Hi devs,

We use to build docker images of the latest qgis releases and we have a 
regression  affecting version 3.6.0 official release on buster

Qgis: 3.6.0 on Debian

If we read a layer with python:

> layer = QgsVectorLayer('./mydata.shp')

Then the layer is invalid (no warning, no errors)

Doing the same thing on stretch + Qgis 3.4.5 (ltr) with same data work 
flawlessly and lead to a valid layer.

This was not affecting previous build 24 h ago (release end nightly-release)

The tests were based with shapefiles from testdata in qgis sources.

We are not sure it that come from Qgis itself or from a change on the 
distribution.

David,

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Question about debian packages version policy on https://qgis.org/

2019-03-01 Thread David Marteau
Hi all,

On https://www.qgis.org  it is said that the version 
available on https://qgis.org/debian  is the 3.6.x but 
actually only the 3.4.4 is the latest  available on debian stretch. 

The 3.6.x is available only on 'buster' which is the next debian release.   

Is that on purpose ?

Furthemore, the ltr has been updated to 3.4.5 but the 3.4.5  has not been made 
available as 'release' (i.e  available on https://qgis.org/debian 
), is there a reason for that ?

Thx,

David___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QEP 140: QGIS Processing standalone executable

2019-02-27 Thread David Marteau
Hi Nyall

You may be interested in some work already done for running qgis processing 
algorithms at server side with no gui and direct calls to "createAlgorithms":

https://github.com/3liz/py-qgis-wps 

Development of embedding the processing machinery has raised some interesting 
questions about using processing in stand alone programs. 

David 

> Le 27 févr. 2019 à 04:36, Nyall Dawson  a écrit :
> 
> Hi all,
> 
> Just a heads up for a newly filed QEP regarding a standalone tool for
> executing QGIS Processing algorithms outside of the desktop GUI
> application. Read the full details and comment here:
> 
> https://github.com/qgis/QGIS-Enhancement-Proposals/issues/140
> 
> Nyall
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server WFS 2.18 unreliable?

2018-11-13 Thread David Marteau

Hi,

Looking at the response, I would say that the response output is streamed and 
there is an exception raised during the streaming of the response. What the 
logs says ?

> Le 13 nov. 2018 à 14:32, Andreas Neumann  a écrit :
> 
> Hi,
> 
> I am trying to publish a WFS Service through QGIS Server 2.18.
> 
> However, the result I get back from GetFeature errors out.
> 
> The XML stream starts correctly and after a while there is an HTML error 
> snipped and as a result a non-wellformed XML response.
> 
> this is my URL:
> 
> https://services.geo.zg.ch/ows/Gewaessernetz?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&TYPENAME=zg.gewaessernetz&SRSNAME=EPSG:2056&OUTPUTFORMAT=GML3
>  
> 
> Sometimes it works, but most of the time it fails.
> 
> Any ideas of what might be wrong?
> 
> Is QGIS Server 3.x more reliable regarding serving WFS?
> 
> Thanks,
> 
> Andreas
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Use QGIS API in Qt5

2018-09-14 Thread David Marteau
Hi,

Qgis 3 use Qt5  and Python 3.5+ , if you use Qgis 2 api then you have to use 
Qt4.

You have the Qgis API  documentation here: https://qgis.org/api/

How do you install qgis ? homebrew, macport, custom build or from 
https://www.qgis.org/fr/site/forusers/download.html ? the exact version of Qt 
Qgis depends on may vary with the distribution.


> Le 14 sept. 2018 à 13:35, Dave Barter  a écrit :
> 
> I want to build a very basic desktop map application using the QGIS API. 
> 
> My development environment is currently Mac OSX High Sierra and Qt5. 
> 
> I’m struggling to find any developer documentation to get me started and the 
> GitHub repo suggests OSX builds of QGIS need Qt4.
> 
> Can my objective be achieved? If so can anyone point me to some docs to get 
> me started 
> 
> -- 
> Dave Barter
> 
> Web: http://www.phased.co.uk 
> Email:d...@phased.co.uk 
> Twitter:@Citizenfishy
> 
> 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Can I automatically style a layer generated with a Processing Sink?

2018-09-11 Thread David Marteau
Hi,

In python you may check the `processing.core.Processing.RenderingStyles` that 
enable you to associate a style (as a qml file) to a pair (alg, output). It is 
also possible to 
do that from the Qgis GUI  ( but I do not remember the details ). 


> Le 11 sept. 2018 à 20:00, C Hamilton  a écrit :
> 
> In a processing routine I create an output vector layer. 
> 
> self.addParameter(
> QgsProcessingParameterFeatureSink(
> self.PrmOutputLayer,
> tr('Output layer'))
> )
> 
> (sink, dest_id) = self.parameterAsSink(parameters,
> self.PrmOutputLayer, context, fields, QgsWkbTypes.LineString, 
> srcCRS)
> 
> I would like to style the output layer by enabling a label based off of one 
> of the fields. Can I do this in Processing? I guess what I would like to get 
> is the actual vector layer that is created. Is that possible?
> 
> Thanks,
> 
> Calvin
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] MAC QGIS 3.x build

2018-09-04 Thread David Marteau


> Le 4 sept. 2018 à 15:12, William Kyngesburye  a écrit :
> 
> 
>> On Sep 4, 2018, at 4:24 AM, Nyall Dawson > <mailto:nyall.daw...@gmail.com>> wrote:
>> 
>> On Tue, 4 Sep 2018 at 19:19, David Marteau > <mailto:dmart...@3liz.com>> wrote:
>>> 
>>> Hi Peter,
>>> 
>>> Warning, if you are using macport: qt5.11 is installed by default and you 
>>> may (or may not)  experience some display problems, instead you may choose 
>>> to stick to qt5.9 by installing
>>> 
>>> the 'qt59' port
>> 
>> Is that the infamous "small canvas" issue?
>> 
> I don't know about that, I use Qt 5.9 in my official build, and it has the 
> small canvas problem.

It is more about the "slowness" problem on Mac: 
https://trac.macports.org/ticket/56915 <https://trac.macports.org/ticket/56915> 
 , https://issues.qgis.org/issues/19546

> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/ <http://www.kyngchaos.com/>
> 
> "We are at war with them. Neither in hatred nor revenge and with no 
> particular pleasure I shall kill every ___ I can until the war is over. That 
> is my duty."
> 
> "Don't you even hate 'em?"
> 
> "What good would it do if I did? If all the many millions of people of the 
> allied nations devoted an entire year exclusively to hating the  it 
> wouldn't kill one ___ nor shorten the war one day."
> 
>  "And it might give 'em all stomach ulcers."
> 
> - Tarzan, on war
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] MAC QGIS 3.x build

2018-09-04 Thread David Marteau
Hi Peter,

Warning, if you are using macport: qt5.11 is installed by default and you may 
(or may not)  experience some display problems, instead you may choose to stick 
to qt5.9 by installing

the 'qt59' port

David

> Le 4 sept. 2018 à 11:14, Denis Rouzaud  a écrit :
> 
> Hi Peter,
> 
> You can look at current Homebrew formula:
> https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/qgis3.rb 
> 
> 
> You'll find a very good doc from Larry (althugh might be a bit outdated)
> https://github.com/qgis/homebrew-qgisdev/tree/master/development 
> 
> 
> Otherwise, there is blog post from David on how to build using Mac ports
> https://www.3liz.com/blog/rldhont/index.php?post/2017/06/01/How-to-build-qgis-on-OSX-with-MacPort
>  
> 
> 
> If while using one or the other, you feel like updating the readme, do not 
> hesitate to do so ;)
> 
> Cheers,
> Denis
> 
> 
> Le mar. 4 sept. 2018 à 11:04, Peter Petrik 
>  > a écrit :
> Hi,
> 
> As a (happy) Linux user, I switched to Mac (High Sierra 10.13.6) for some 
> QGIS development and I see that 
> https://github.com/qgis/QGIS/blob/master/INSTALL 
>  still suggests qt4 and 
> python 2.6 for Mac. Does anyone has a suggestion what to use/read to 
> facilitate the building of current master and get quickly up-to-speed? 
> 
> Also, can you please point me to the scripts/repositories that are used for 
> official Mac releases?
> 
> I have found https://github.com/OSGeo/homebrew-osgeo4mac 
> , but I am not sure if that can 
> be used for development?
> 
> Thanks a lot for any ideas! 
> Peter
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> -- 
> Denis Rouzaud
> de...@opengis.ch  
> +41 76 370 21 22 <>
> 
>  <>___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Adding Map layer to current project destroy custom layer variables in Qgis3

2018-06-21 Thread David Marteau
Hi,

Yes, that's the point. I was surprised by the fact that those variables where 
stored as part of the exported qml file. 

I was trying to set those variable in processing algorithm so that I could 
achieve some parametrization of the style associated with the processing 
output, but no luck
since the qml  overwrite them when loaded in the layer.


> Le 21 juin 2018 à 11:48, Matthias Kuhn  a écrit :
> 
> Hi David,
> 
> Variables are a part of QML / Layer Style. There is a QEP open about
> handling of this:
> 
> https://github.com/qgis/QGIS-Enhancement-Proposals/issues/125
> 
> While variables are not explicitly mentioned in there, it would be good
> to treat them in the same way. I.e. allow exporting and importing QML
> files without variables. This should allow to export and subsequently
> load a style without variables being embedded.
> Would be great if you could add a comment to the QEP.
> 
> Thanks
> Matthias
> 
> On 06/20/2018 10:06 PM, David Marteau wrote:
>> 
>> Just found out that this is not addMapLayer that remove the variables
>> but 'layer.loadNamedStyle'
>> 
>> Print layer.customProperty('variableNames') just before calling
>> 'layer.loadNamedStyle' show variables
>> Print layer.customProperty('variableNames') just after the call :  empty
>> list
>> 
>> Reproduced in the python console:
>> 
>>>>> QgsExpressionContextUtils.setLayerVariable(layer,'FOO','BAR')
>>>>> layer.customProperty('variableNames')
>> ['FOO']
>>>>> layer.loadNamedStyle('mystyle.qml')
>> ('', True)
>>>>> layer.customProperty('variableNames')
>> []
>> 
>> 
>>> Le 20 juin 2018 à 18:13, David Marteau >> <mailto:dmart...@3liz.com>> a écrit :
>>> 
>>> Hi
>>> 
>>> I'm trying to set custom layers variables from processing
>>> using  QgsExpressionContextUtils.setLayerVariables to destination
>>> layers , I have found that those variables does not appear in 
>>> Qgis. 
>>> 
>>> I have found that when the layer is inserted in the current project
>>> (https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L81)
>>> the layer variables are removed - Checking existence of the variable
>>> before
>>> and after the call of 'addMaperLayer' shows that layer variables are
>>> removed from custom properties.
>>> 
>>> I cannot tell if this is a bug or not because it seems that the
>>> removal may occurs in some signal handler. So if somebody has some
>>> clues to where to look, I will be grateful.
>>> 
>>> 
>>> Qgis version: 3.0.3-Girona
>>> 
>>> David
>> 
>> 
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Adding Map layer to current project destroy custom layer variables in Qgis3

2018-06-20 Thread David Marteau

Just found out that this is not addMapLayer that remove the variables but 
'layer.loadNamedStyle'

Print layer.customProperty('variableNames') just before calling 
'layer.loadNamedStyle' show variables
Print layer.customProperty('variableNames') just after the call :  empty list

Reproduced in the python console:

>>> QgsExpressionContextUtils.setLayerVariable(layer,'FOO','BAR')
>>> layer.customProperty('variableNames')
['FOO']
>>> layer.loadNamedStyle('mystyle.qml')
('', True)
>>> layer.customProperty('variableNames')
[]


> Le 20 juin 2018 à 18:13, David Marteau  a écrit :
> 
> Hi
> 
> I'm trying to set custom layers variables from processing using  
> QgsExpressionContextUtils.setLayerVariables to destination layers , I have 
> found that those variables does not appear in 
> Qgis. 
> 
> I have found that when the layer is inserted in the current project 
> (https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L81
>  
> <https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L81>)
>  the layer variables are removed - Checking existence of the variable before
> and after the call of 'addMaperLayer' shows that layer variables are removed 
> from custom properties.
> 
> I cannot tell if this is a bug or not because it seems that the removal may 
> occurs in some signal handler. So if somebody has some clues to where to 
> look, I will be grateful.
> 
> 
> Qgis version: 3.0.3-Girona
> 
> David

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Adding Map layer to current project destroy custom layer variables in Qgis3

2018-06-20 Thread David Marteau
Hi

I'm trying to set custom layers variables from processing using  
QgsExpressionContextUtils.setLayerVariables to destination layers , I have 
found that those variables does not appear in 
Qgis. 

I have found that when the layer is inserted in the current project 
(https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L81
 
)
 the layer variables are removed - Checking existence of the variable before
and after the call of 'addMaperLayer' shows that layer variables are removed 
from custom properties.

I cannot tell if this is a bug or not because it seems that the removal may 
occurs in some signal handler. So if somebody has some clues to where to look, 
I will be grateful.


Qgis version: 3.0.3-Girona

David___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Web based admin interface for processing models

2018-05-31 Thread David Marteau
Hi,

The project  is actually on github: https://github.com/3liz/py-qgis-wps

It is fully functional (while still in beta) and we use it actually in our 
infrastructure.  The project has been presented at the Foss4G.fr and we expect
to talk about it at Foss4G is Dar es Salaam.




> Le 31 mai 2018 à 13:50, johnrobot  a écrit :
> 
> Hi
> Is there any more information on this work? I would love to hear more about
> current status and roadmap.
> 
> Magnus
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Struggling with QGIS Server 3 on a Ubuntu machine, installed from repositories

2018-04-20 Thread David Marteau
Hi,

Try to activate log at info level. When the server start, you should have the 
following lines:

Checking /usr/lib/qgis/server for native services modules"
"Loading native module /usr/lib/qgis/server/libdummy.so"
Adding service SampleService 1.0
"Loading native module /usr/lib/qgis/server/libwcs.so"
Adding service WCS 1.0.0
"Loading native module /usr/lib/qgis/server/libwfs.so"
Adding service WFS 1.1.0
"Loading native module /usr/lib/qgis/server/libwms.so"
Adding service WMS 1.3.0
Initializing server modules from  "/usr/lib/qgis/server"

David


> Le 20 avr. 2018 à 16:25, Giovanni Manghi  a écrit :
> 
> Hi all,
> 
> I'm quite familiar with the installation (on both Linux and Windows)
> and use of QGIS Server 2.* and in the past days I started to have a
> look also to version 3.
> 
> I was able to test on Windows, but I'm struggling on Linux (Ubuntu
> 16.04) after having installed it from the QGIS repos.
> 
> A request like
> http://localhost/cgi-bin/qgis_mapserv.fcgi?MAP=/path/to/project.qgs&SERVICE=WMS&REQUEST=GetCapabilities
> 
> always return "Service unknown or unsupported".
> 
> From the CLI
> 
> "QUERY_STRING="SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&MAP=/path/to/project.qgs"
> /usr/lib/cgi-bin/qgis_mapserv.fcgi
> 
> it seems to return the capabilities but ends always with
> 
> Service unknown
> or unsupported
> 
> In logs I can see messages like
> 
> "Service WMS is not registered"
> 
> 
> Downgrading to 2.18 and making the same requests works as expected.
> 
> 
> Anyone has an hint for me?
> 
> thanks in advance
> 
> -- Giovanni --
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Web based admin interface for processing models

2018-03-20 Thread David Marteau
Hi Allessandro,

I have made a submission to talk about this at the FOSS4G-FR and  FOSS4G in 
Dar-Es-Salam

This is a work based on a fork of PyWPS 4 - many thanks to them - (with a lot 
of changes and many additions!) and act as a standalone server - nothing to do 
with https://plugins.qgis.org/plugins/wps4server/ 
.

Actually we are stabilizing with Qgis 3.0 branch (the API change quickly, and 
we are catching changes as fast as possible), and at some point it is going to 
be published on github.
We are testing this on a real use case and we plan to have something in 
production ready very soon.

To be short: the server reuse processing algorithm  the same way they are used 
in the desktop - without modification. A marshalling is done between WPS 
parameter and Processing parameters.
Results can be stored in temporary projects and published as WMS service with 
Qgis server. 

The server is based on full asynchronous http server (Tornado) and makes an 
heavy use of asyncio and use Redis as storage backend for job status.


> Le 20 mars 2018 à 11:03, Alessandro Pasotti  a écrit :
> 
> Hi Michael,
> 
> can you share some details about this project?
> 
> Is it based on other existing stack like PyWPS?
> 
> Is it related with https://plugins.qgis.org/plugins/wps4server/ 
> ?
> 
> Thanks!
>  
> 
> 
> On Mon, Mar 12, 2018 at 7:46 PM, kimaidou  > wrote:
> Hi 
> 
> Very quick answer:
> We (3liz team) are indeed developing a full server stack to be able to use 
> QGIS processing algorithms server side. It will be fully opensourced. No real 
> web admin panel in project, but we use Lizmap Web Client as a web front end 
> to published algs.
> 
> We will try to come back here asap with a full description and road map. If 
> you want to contact us directly, please use i...@3liz.com 
>  address.
> 
> Regads,
> Michaël
> 
> 
> 2018-03-12 10:56 GMT+01:00 johnrobot  >:
> My previous post didn´t seem to render much interest and I am a bit curious.
> Is this not of interest to anyone else? Was I too vague? Does the task
> involve to much work at the moment? I still think that it would be a great
> addition to QGIS, especially in corporate environments.
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> 
> 
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Qgis3: installing new processing provider via plugins

2018-03-04 Thread David Marteau
Hi

I can't figure where the the "enable additional providers" option is located in 
Qgis 3 ? 

Or there is another way to enable providers from plugins ?

Thx,
David


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Qgis 3.0 plugin dependencies status

2018-03-02 Thread David Marteau

+1 for a QEP on this matter

> Le 2 mars 2018 à 13:28, Richard Duivenvoorde  a écrit :
> 
> On 02-03-18 13:08, David Marteau wrote:
>> Hi
>> 
>> I stumbled on this post: 
>> http://osgeo-org.1560.x6.nabble.com/A-pipinstall-plugin-is-possible-First-What-s-the-difference-between-the-Osgeo4w-Shell-td5107633.html
>> 
>> What it the status of the problem of plugin dependency  for Qgis3 ? 
>> Is there anything done so far ? 
> 
> Nope.
> 
> We had a (private) discussion about it during latest hackfest, and Borys
> (in bcc) hopes to be able to address this as part of the plugins install
> overhaul.
> 
> As the discussion (2014?), you are pointing to, mentions pip and virtual
> env's: just yesterday I stumbled upon pipenv [0][1]. Not sure if that
> could be helpful, but apparently it is  a pip-virtualenv marriage...
> 
> Regards,
> 
> Richard Duivenvoorde
> 
> Ps, maybe good to start a QEP [2] to discuss this?
> 
> [0] https://pipenv.readthedocs.io/en/latest/
> [1] http://docs.python-guide.org/en/latest/dev/virtualenvs/
> [2] https://github.com/qgis/QGIS-Enhancement-Proposals

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Qgis 3.0 plugin dependencies status

2018-03-02 Thread David Marteau
Hi

I stumbled on this post: 
http://osgeo-org.1560.x6.nabble.com/A-pipinstall-plugin-is-possible-First-What-s-the-difference-between-the-Osgeo4w-Shell-td5107633.html

What it the status of the problem of plugin dependency  for Qgis3 ? 
Is there anything done so far ? 

Thx
David

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Native algorithms not loaded in qgis 2.99

2018-02-05 Thread David Marteau

Hi All

Using processing from python using latest master branch  (from commit 
325af48680)  have noticed that native (C++) algorithms  are not loaded anymore !

The native provider does not appears in the list of provider
Native algorithms are not usable anymore  (ex 'qgis:joinattributestable')

All others python algorithms are loaded from a Processing.initialize() call.

Is there anything to do to enable native processing algorithms from python ?

Otherwise this would be a regression from 0a17c370f7.


Thx,

David
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] qgis server time support

2018-02-02 Thread David Marteau
Hi,

For implementing this feature,  one assume that such a time information is 
available from the target layer ? Is that the case ? It is done in a normalized 
way ?

David



> Le 2 févr. 2018 à 11:57, Martin Landa  a écrit :
> 
> Hi all,
> 
> to my knowledge there is no time support in QGIS2 server similar to
> GeoServer [1]. Is there any plan to implement time support for QGIS3?
> I checked bug tracker but haven't found any related issue.
> 
> Thanks in advance, Martin
> 
> [1] http://docs.geoserver.org/latest/en/user/services/wms/time.html
> 
> -- 
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Cannot load WMS capabilities from WMS provider in QGIS3 from python

2018-01-16 Thread David Marteau

Ticket filled https://issues.qgis.org/issues/17866

> Le 16 janv. 2018 à 09:18, David Marteau  a écrit :
> 
> Hi Alessandro
> 
> This is a weird bug, I have also found that once the first request failed, 
> others requests succeed wathever the url or the provider is (tried with wcs 
> and wms).
> When failing, looking on what append wms server  side when we found that no 
> request is sent.
> 
> I fill a ticket on this.
> 
> 
>>> The point is: trying to instanciate  a  wmsprovider will issue a timeout 
>>> when trying to request the capabilities: the code responsible for that 
>>> creates its own QEventLoop and manage to do a blocking call (which is 
>>> expected here). 
>>> Please have a look at 
>>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964
>>>  
>>> <https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964>.
>>>   What we do not understand is why, despite the call of loop.exec() in the 
>>> c++ code, the request is not processed (my example with the  
>>> Q(gs)etworkAccessManager
>>> shows that it should processed)
>>> 
>>> Actually you cannot instanciate properly a QgsProject with a WMS layer.
>>> 
>>> To convince yourself, try to instanciate a QgsProject in python (in a 
>>> standalone python script) from a .qgs project having a single wms layer: it 
>>> will fail to instanciate the layer.
>>> 
>> 
>> 
>> Hi David, 
>> 
>> I verified this issue, I'm sorry but I don't have an explanation right away 
>> and it looks like a bug, please file a ticket.
>> 
>> 
>> -- 
>> Alessandro Pasotti
>> w3:   www.itopen.it <http://www.itopen.it/>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Cannot load WMS capabilities from WMS provider in QGIS3 from python

2018-01-16 Thread David Marteau
Hi Alessandro

This is a weird bug, I have also found that once the first request failed, 
others requests succeed wathever the url or the provider is (tried with wcs and 
wms).
When failing, looking on what append wms server  side when we found that no 
request is sent.

I fill a ticket on this.


>> The point is: trying to instanciate  a  wmsprovider will issue a timeout 
>> when trying to request the capabilities: the code responsible for that 
>> creates its own QEventLoop and manage to do a blocking call (which is 
>> expected here). 
>> Please have a look at 
>> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964
>>  
>> .
>>   What we do not understand is why, despite the call of loop.exec() in the 
>> c++ code, the request is not processed (my example with the  
>> Q(gs)etworkAccessManager
>> shows that it should processed)
>> 
>> Actually you cannot instanciate properly a QgsProject with a WMS layer.
>> 
>> To convince yourself, try to instanciate a QgsProject in python (in a 
>> standalone python script) from a .qgs project having a single wms layer: it 
>> will fail to instanciate the layer.
>> 
> 
> 
> Hi David, 
> 
> I verified this issue, I'm sorry but I don't have an explanation right away 
> and it looks like a bug, please file a ticket.
> 
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Cannot load WMS capabilities from WMS provider in QGIS3 from python

2018-01-15 Thread David Marteau
Here is a test script that illustrate the problem a bit further: if we run 
createProvider() twice, the first time 
the getCapbabilities will fail with a timeout. The second time, it will 
succeed. 

If you run this script, clear the Qgis network cache between two invocations. 

===8<==
import os
import logging

from qgis.core import QgsApplication, QgsMessageLog
from qgis.core import QgsProject, QgsProviderRegistry

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

# No Display
os.environ['QT_QPA_PLATFORM'] = 'offscreen'

qgis_application = QgsApplication([], False )
qgis_application.setPrefixPath('/usr/local', True)
qgis_application.initQgis()

# Log any messages
def writelogmessage(message, tag, level):
arg = '{}: {}'.format( tag, message )
if level == QgsMessageLog.WARNING:
logger.warning(arg)
elif level == QgsMessageLog.CRITICAL:
logger.error(arg)
else:
logger.info <http://logger.info/>(arg)

messageLog = QgsApplication.messageLog()
messageLog.messageReceived.connect( writelogmessage )

wmsuri = 
("contextualWMSLegend=0&crs=EPSG:4326&dpiMode=7&featureCount=10&format=image/jpeg"
  "&layers=s2cloudless&styles&tileMatrixSet=s2cloudless-wmsc-14"
  "&url=http://tiles.maps.eox.at/wms? <http://tiles.maps.eox.at/wms?>" )

# GetCapabilities Fail with Request Timeout !!!
provider = QgsProviderRegistry.instance().createProvider( "wms", wmsuri )

# Run again => works !!!
provider = QgsProviderRegistry.instance().createProvider( "wms", wmsuri )

qgis_application.exitQgis()
del qgis_application
8<=

We have also tested simple QgsNetwork invocation from c++: tests shows that 
event loops have the running status, but the 
request is not processed at the  first invocation.

David


> Le 15 janv. 2018 à 15:05, David Marteau  a écrit :
> 
>> 
>> 
>> 
>> Hi David, 
>> 
>> You  need an event loop to use a Q(qg)NetworkAccessManager, it's 
>> asynchronous.
>> 
> 
> Hi Alessandro,
> 
> Yes, we know that (see the second code in previous mail  ):  the  
> QgsNetworkAccessManager works perfeclty in python, this is not the point.
> 
> The point is: trying to instanciate  a  wmsprovider will issue a timeout when 
> trying to request the capabilities: the code responsible for that creates its 
> own QEventLoop and manage to do a blocking call (which is expected here). 
> Please have a look at 
> https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964
>  
> <https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964>.
>   What we do not understand is why, despite the call of loop.exec() in the 
> c++ code, the request is not processed (my example with the  
> Q(gs)etworkAccessManager
> shows that it should processed)
> 
> Actually you cannot instanciate properly a QgsProject with a WMS layer.
> 
> To convince yourself, try to instanciate a QgsProject in python (in a 
> standalone python script) from a .qgs project having a single wms layer: it 
> will fail to instanciate the layer.
> 
>> 
>> 
>> -- 
>> Alessandro Pasotti
>> w3:   www.itopen.it <http://www.itopen.it/>

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Cannot load WMS capabilities from WMS provider in QGIS3 from python

2018-01-15 Thread David Marteau
> 
> 
> 
> Hi David, 
> 
> You  need an event loop to use a Q(qg)NetworkAccessManager, it's asynchronous.
> 

Hi Alessandro,

Yes, we know that (see the second code in previous mail  ):  the  
QgsNetworkAccessManager works perfeclty in python, this is not the point.

The point is: trying to instanciate  a  wmsprovider will issue a timeout when 
trying to request the capabilities: the code responsible for that creates its 
own QEventLoop and manage to do a blocking call (which is expected here). 
Please have a look at 
https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964
 
.
  What we do not understand is why, despite the call of loop.exec() in the c++ 
code, the request is not processed (my example with the  
Q(gs)etworkAccessManager
shows that it should processed)

Actually you cannot instanciate properly a QgsProject with a WMS layer.

To convince yourself, try to instanciate a QgsProject in python (in a 
standalone python script) from a .qgs project having a single wms layer: it 
will fail to instanciate the layer.

> 
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Cannot load WMS capabilities from WMS provider in QGIS3 from python

2018-01-15 Thread David Marteau
Hi,

We hit a very nasty problem when trying to load projects with wms layer defined 
from python: loading capabilities fail with timeout error, thus preventing 
creating any project or layer from python.

The problem has been verified in Debian, Ubuntu and fresh OSX build from master 
branch.

We have somehow been able to reduce the problem to the loading of the 
wmsprovider. The following python code provide a minimal example for 
reproducing the problem:

===8<==
import os
import logging

from qgis.core import QgsApplication, QgsMessageLog
from qgis.core import QgsProject, QgsProviderRegistry

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

# No Display
os.environ['QT_QPA_PLATFORM'] = 'offscreen'

qgis_application = QgsApplication([], False )
qgis_application.setPrefixPath('/usr/local', True)
qgis_application.initQgis()

# Log any messages
def writelogmessage(message, tag, level):
arg = '{}: {}'.format( tag, message )
if level == QgsMessageLog.WARNING:
logger.warning(arg)
elif level == QgsMessageLog.CRITICAL:
logger.error(arg)
else:
logger.info(arg)

messageLog = QgsApplication.messageLog()
messageLog.messageReceived.connect( writelogmessage )


wmsuri = 
("contextualWMSLegend=0&crs=EPSG:4326&dpiMode=7&featureCount=10&format=image/jpeg"
  "&layers=s2cloudless&styles&tileMatrixSet=s2cloudless-wmsc-14"
  "&url=http://tiles.maps.eox.at/wms?"; )

# Request Timeout
provider = QgsProviderRegistry.instance().createProvider( "wms", wmsuri )

qgis_application.exitQgis()
del qgis_application
8<=

This fail with the following qgis errors

WMS: Download of capabilities failed: Operation canceled
Network: Network request 
https://tiles.maps.eox.at/wms?SERVICE=WMS&REQUEST=GetCapabilities 
 timed out

Note that the following piece of code work perfectly and proceed the request 
without problems:

==
from PyQt5.QtCore import QUrl, QEventLoop
from PyQt5.QtNetwork import QNetworkRequest

url = QUrl("https://tiles.maps.eox.at/wms?SERVICE=WMS&REQUEST=GetCapabilities";)

request = QNetworkRequest()
request.setUrl(url)
manager = QgsNetworkAccessManager.instance()
replyObject = manager.get(request)

loop = QEventLoop()
def onfinish(  ):
print("Qt Return 
Code:",replyObject.attribute(QNetworkRequest.HttpStatusCodeAttribute))
answer = replyObject.readAll();
print(answer[:200],"\n")
loop.quit()

replyObject.finished.connect( onfinish )
loop.exec()
==

So this is not fundamentally a problem with the network manager.

At this point we are stuck because the provider do not do something 
fundamentally different from the last piece of code, 

In qgis code the request execution stall at: 
https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmscapabilities.cpp#L1964
 
The problem does not occur if we run the project from the Desktop application: 
we think that there is a problem with the QEventLoop execution but we have no 
clue atm to check this assumption.

So if anybody have any idea on the subject…...

Regards
David



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS's python as a virtualenv

2017-12-22 Thread David Marteau
An easy way to do so is to add the path to the QGIS python packages in a 
PYTHONPATH env variable and the packages will be reachable from your virtual 
env.

Another (better) to do so would be having QGIS package packaged as 
pip/setuptools package so that they can be installed in any virtualenv - 
assuming that qgis libraires are already installed on
your platform.

This work well on Linux/OSX since QGis can rely on the python installed on your 
platform. On windows, this can be painful because of the way python interpreter 
is packaged, but I know very 
little about Qgis on Windows) .

David.


> Le 22 déc. 2017 à 11:07, Olivier Dalang  a écrit :
> 
> Hi !
> 
> I always have trouble when I need to use QGIS/OSGeo's python environment from 
> outside of QGIS (e.g. setting up an IDE, running some custom scripts that 
> need access to the same libraries than QGIS, etc...). Suggested solutions are 
> to create some batch file, but I never really manage to make this work in a 
> reasonable amount of time.
> 
> This contrasts very much with my experience with virtualenv (in non QGIS 
> related python work), where switching from one python environment to another 
> is extremely straightforward (source path_to_venv/bin/activate on linux or 
> path_to_venv\Scripts\activate.bat on windows). With those commands, 
> everything works : python, pip, all libraries, etc... I think most python 
> IDEs support virtualenvs.
> 
> I'm not sure if this is possible or not, but would it be possible to have 
> QGIS/OSGeo's python environment configured as a virtual environment ?
> 
> Thanks !
> 
> Olivier
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server plugins and thread safety

2017-11-19 Thread David Marteau
Hi,

IMHO, The multi process approach has to be preferred over  multi-threading

Some thought about it:

Forking sever instance for each request is imho a bad idea as it is not 
scalable and defeat resource  control.

I think that it is not a problem  by itself to consider the server engine as 
single worker process:  there is numerous cases where it is much better handled 
using appropriates tools:

- Use supervisor with fcgi prefork to handle a pool of server (not sure is is 
appropriate here)
- Embed the server in a asynchronous framework (like tornado, or python 3 
asyncio) and use multiprocessing to handle your server workers.
- Embed as wsgi  application and use gunicorn mumérous options to handle 
requests queues and the number workers.
…


David. 


IMHO this can be handled in much better way with other tools:

> Le 19 nov. 2017 à 10:34, Alessandro Pasotti  a écrit :
> 
> Hi,
> 
> mi recent experiments with multi-threaded python wrappers for QGIS server 
> showed a critical flaw in my original implementation of the server plugins.
> 
> First, I want to stress that this is not a problem in FCGI server 
> implementation but only if the server is used directly from python in a multi 
> threaded server implementation.
> 
> The problem is that the server interface that exposes the request handler is 
> a static property of the interface, that is changed on every request.
> This means that there is a race condition in setting/accessing the handler 
> from a plugin filter, and that a plugin filter might access to the handler 
> for a wrong request.
> 
> The solution is to pass the request handler (or the request and/or response 
> objects depending on the filter) to the plugin filters and leave the 
> interface for static properties only.
> 
> This would be a big API change for the server interface and filters and I'm 
> not sure we have time/resources to do that now.
> 
> As an alternative we could simply document the issue and change the testing 
> code to create a new server instance to server every request (to be verified, 
> and with consitent performance degradation).
> 
> What's your opinion about this issue?
> 
> BTW,  tomorrow I'll file a ticket for this problem.
> 
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server 3 status

2017-10-09 Thread David Marteau
Hi

According to the source 
https://github.com/qgis/QGIS/blob/master/src/server/qgsserversettings.cpp#L47: 
setting QGIS_SERVER_PARALLEL_RENDERING to False or not setting 
QGIS_SERVER_PARALLEL_RENDERING is the same thing as the default value is 
'false'.

Using the appropriate log level you can get metric on the rendering time from 
qgis: imho, comparing this metric would be a good starting point putting aside 
external configuration (except for the postgres connection) and isolate any 
bottleneck. 

David.

> Le 9 oct. 2017 à 11:53,  
>  a écrit :
> 
> Hi David,
> 
> I will answer you directly and give you the desired information. I've done 
> some tests with a sample application, which you can see under the URL 
> https://lxgis1.stadt.wolfsburg.de/qgis_wcl/index.html.
> The map topic "Stadtplan" is based on the qgis server 2.14.19, the "Stadtplan 
> (Dev)"-topic is based on qgis server 2.99 (codeversion 825a323). Subsequent 
> tests I've done with the layers "Luftbilder" and "Infrastruktur". The former 
> are geotiff's, the latter are generated from a PostGIS database. As client I 
> use a customized version of the "OL3 Mobile Client" from Sourcepole.
> 
> If I look at the access times in the developer tools of the Firefox, they 
> speak a clear language:
> - Topic "Stadtplan" -> moving the map, zoom in / zoom out takes about 0.5 s 
> on the intranet (!)
> - Topic "Stadtplan (Dev)" -> moving the map, zoom in / zoom out takes about 
> 1.2 s with the setting "FcgidInitialEnv QGIS_SERVER_PARALLEL_RENDERING False" 
> in my apache config
> - Without setting "FcgidInitialEnv QGIS_SERVER_PARALLEL_RENDERING False" the 
> access takes about 0.7 s
> Result: without using multiprocessing / multithreading, the QGIS server is 
> faster under these test conditions, but still clearly slower than the older 
> version!
> 
> Hope this description helps
> 
> Burghardt
> 
> ***
> 
> Burghardt Scholle
> mailto:burghardt.scho...@stadt.wolfsburg.de
> 
>> Hi,
>> 
>> Do we have metrics on this ?  Does it mean  that 
>> QGIS_SERVER_PARALLEL_RENDERING=False is also slower than previous version ?
>> 
>> 
>> David M.
>> 
>> 
>> 
>>> Le 4 oct. 2017 à 14:15, Matthias Kuhn  a écrit :
>>> 
>>> Hi,
>>> 
>>> I had some questions from people interested in performance.
>>> 
>>> I advised them to set the following
>>> 
>>> * QGIS_SERVER_PARALLEL_RENDERING=True
>>> * Trust project flag
>>> 
>>> Apparently parallelized rendering works (system stats) but it was
>>> reported to be slower than older versions.
>>> 
>>> Is there something else that needs to be done? Is there more information
>>> I can ask for / give?
>>> 
>>> Thanks a lot
>>> Matthias
>> 
> 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS master branch fails make install on macOS 10.12.6

2017-10-09 Thread David Marteau
Hi

Sorry but the 'make install' seems to work correctly for me on OSX 10.11.6: I 
have a stand alone binary installed at the location specified by 
CMAKE_INSTALL_PREFIX - I'm running several versions of QGIS and then
nee to have different install paths. Is your ~/Applications/QGIS.app a link ? 

David.

> Le 9 oct. 2017 à 01:20, Joel Buckley  a écrit :
> 
> Thanks, this helped. I'm now able to launch it from the command line
> without a problem.
> 
> One thing I've noticed though, is `open -a ~/Applications/QGIS.app` will
> actually invoke the binary created in QGIS/build/output/ - my `make`
> output (if you ⌘-click on the application in the Dock, you will be shown
> the location of the running application).  I imagined a standalone
> binary would be created at `make install`.  Is there a separate set of
> steps to create a standalone binary? I'm trying to make some changes and
> distribute to a few others for them to try.
> 
> Thanks again for the QT_QPA_PLATFORM_PLUGIN_PATH tip.
> 
> Regards,
> 
> -- 
> Joel Buckley
> 
> On Fri, Oct 06, 2017 at 01:59:30PM +0200, David Marteau wrote:
>> Hi
>> 
>> Try to define the environment variable 
>> QT_QPA_PLATFORM_PLUGIN_PATH=/opt/local/libexec/qt5/plugins/platforms (it may 
>> depends on how is your qt5 installation - this path is ok for Macport 
>> installation)
>> 
>> According to my experience (see 
>> https://www.3liz.com/blog/rldhont/index.php?post/2017/06/01/How-to-build-qgis-on-OSX-with-MacPort)
>>  : If this variable is not defined then QGIS will crash at startup.
>> 
>> 
>>> Le 6 oct. 2017 à 09:46, Joel Buckley  a écrit 
>>> :
>>> 
>>> Hi,
>>> 
>>> I am having some difficulty running `make install`, and compiling QGIS into 
>>> a single standalone application on macOS. I can successfully run 
>>> configuration and `make`, and can launch the `make`-d code from 
>>> build/output/bin with no problem.
>>> 
>>> `make install` runs without complaint and returns 0 (success), but when I 
>>> try to launch the newly create QGIS.app, it immediately crashes, and 
>>> produces a crash report (attached for brevity).
>>> 
>>> I have googled and attempted to parse the crash log, but the errors it 
>>> reports are beyond my capability. I'm hoping someone on the list might have 
>>> some input on how to remedy this?
>>> 
>>> Configuration information:
>>> QGIS version: current master branch
>>> QT5, python 3
>>> macOS 10.12.6
>>> 
>>> Regards,
>>> 
>>> --
>>> Joel Buckley
>>> 
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS master branch fails make install on macOS 10.12.6

2017-10-06 Thread David Marteau
Hi

Try to define the environment variable 
QT_QPA_PLATFORM_PLUGIN_PATH=/opt/local/libexec/qt5/plugins/platforms (it may 
depends on how is your qt5 installation - this path is ok for Macport 
installation)

According to my experience (see 
https://www.3liz.com/blog/rldhont/index.php?post/2017/06/01/How-to-build-qgis-on-OSX-with-MacPort)
 : If this variable is not defined then QGIS will crash at startup. 


> Le 6 oct. 2017 à 09:46, Joel Buckley  a écrit :
> 
> Hi,
> 
> I am having some difficulty running `make install`, and compiling QGIS into a 
> single standalone application on macOS. I can successfully run configuration 
> and `make`, and can launch the `make`-d code from build/output/bin with no 
> problem.
> 
> `make install` runs without complaint and returns 0 (success), but when I try 
> to launch the newly create QGIS.app, it immediately crashes, and produces a 
> crash report (attached for brevity).
> 
> I have googled and attempted to parse the crash log, but the errors it 
> reports are beyond my capability. I'm hoping someone on the list might have 
> some input on how to remedy this?
> 
> Configuration information:
> QGIS version: current master branch
> QT5, python 3
> macOS 10.12.6
> 
> Regards,
> 
> -- 
> Joel Buckley
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS Server 3 status

2017-10-05 Thread David Marteau
Hi,

Thanks for the overview. 

We need more examples of embedding the server in python and I plan to publish 
some concrete examples from our use cases asap.

David M.


> Le 5 oct. 2017 à 09:34, Alessandro Pasotti  a écrit :
> 
> Hi Règis,
> 
> thanks for the nice summary!
> 
> Maybe it would be interesting for python devs to stress out how QGIS server 3 
> brings the bindings and the plugins to a new level: while the original 
> filter-style python plugins, are still available, the new service-oriented 
> plugin-based architecture allows Python developers to create new services 
> (for example WPS) by implementing a new `QgsService` directly in Python. 
> Overriding existing services is also possible.
> 
> The server API has now full python bindings and a QGIS server can be easily 
> implemented directly in Python and wrapped into your favourite framework (see 
> this simple wsgi experiment: 
> https://gist.github.com/elpaso/0cd7fb6a0518dc46c45557d9133438b8 
>  ).
> 
> For more examples of the API, I think there are some basic examples in the 
> official Python tests: 
> https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgsserver_services.py#L79
>  
> 
>  
> 
> 
> Cheers
> 
> 
> 
> 
> 
> On Wed, Oct 4, 2017 at 10:49 PM, Régis Haubourg  > wrote:
> Well, from a user point of view, that's a bit hard since all this is 90 % 
> refactoring.. which is supposed to be transparent for users. 
> 
> We have the trust and multithreaded features, that should (and early testers 
> today found it slower today) and the ability to code new services using 
> python.   
> We can also show some numbers about OGC conformity tests and the goal of 
> reaching OGC certification (WMS only by now). 
> 
> Alessandro, René-Luc and David, do you have some user oriented examples for 
> the new modular API ? 
> 
> 
> 
> 2017-10-04 22:18 GMT+02:00 Anita Graser  >:
> Great overview, thanks for drafting Régis!
> 
> Some additional ideas: Could we add a section with the key improvements from 
> an user perspective? 
> 
> I'm particularly intrigued by the services / plugins part. Could you 
> elaborate?
> 
> Regards,
> Anita
> 
> 
> 
> On Wed, Oct 4, 2017 at 9:42 PM, Régis Haubourg  > wrote:
> Hi again, 
> here is my very first draft:
> 
>  Several images can be pulled from the joined slides given at Foss4G-EU here 
> https://drive.google.com/file/d/0BzatQbprJ-hjWF95VzdHbGRsVEk/view?usp=sharing 
> 
>  
> 
> René-Luc, David, Paul, don't hesitate to amend that!
> 
> 
> 
> Qgis server refactoring is done!
> 
> As you may know, QGIS is jumping to a new major version (yes!).  
> Doing so was made necessary because of the need to switch to python 3, QT5, 
> but also because we needed to break the QGIS API in several places. 
> 
> A year ago, a tiny troll  from 
> switzerland rang a bell about the strong need for love server code base 
> required. 
> 
> Indeed, the API was locked by some old methods of QGIS server. In short, QGIS 
> server was reparsing the qgs project file in his own way, and created 
> dependencies to part of QGIS we needed to drop.
>
> As outsourcing the server code base was not an option, so we had to refactor 
> it. 
> 
> The involved parties decided to get engaged in a code sprint 
>  in 
> the city of Lyon , France dedicated to sharing their vision, planning the 
> work and finally making all the following 
>  happen :
> 
> 
> # Deep, complex and unrewarding tasks:
> 
> - Remove all singleton calls
> 
> - Cut all the dependencies to the old qgis project parser
> 
> - Minimize dependencies to GUI library. Since fonts are necessary to render 
> maps, totally removing them was not feasable. 
> 
> # Higher level refactoring
> 
> All services (WMS GetMap, WFS GetFeature, GetLegendGraphics, WCS, GetPrint 
> etc..) have been rewritten. Some like WMS were entirely rewritten. Kudos to 
> the dev's
> 
> 
> # New features and architecture stuff
> 
> - QGIS Server Services as plugins like providers. (slide 10 would be a nice 
> figure here) 
> 
> - Multi-thread rendering  - like in 
> the desktop
> 
> - A new option to trust layer metadata 
>  and speed up project loading
> 
> 
> # Infrastructure tasks
> 
> - Build a OGC compliancy platform 
>  
> and integrate it to a contin

Re: [QGIS-Developer] QGIS Server 3 status

2017-10-04 Thread David Marteau
Hi,

Do we have metrics on this ?  Does it mean  that 
QGIS_SERVER_PARALLEL_RENDERING=False is also slower than previous version ?


David M.



> Le 4 oct. 2017 à 14:15, Matthias Kuhn  a écrit :
> 
> Hi,
> 
> I had some questions from people interested in performance.
> 
> I advised them to set the following
> 
> * QGIS_SERVER_PARALLEL_RENDERING=True
> * Trust project flag
> 
> Apparently parallelized rendering works (system stats) but it was
> reported to be slower than older versions.
> 
> Is there something else that needs to be done? Is there more information
> I can ask for / give?
> 
> Thanks a lot
> Matthias
> 
> On 10/04/2017 02:09 PM, René-Luc Dhont wrote:
>> Hi,
>> 
>> It seems that the QGIS refactoring is complete!
>> https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74
>> https://github.com/qgis/qgis3.0_api/issues/57
>> https://github.com/qgis/QGIS/pull/4824
>> 
>> You can use QGIS Server like this in Python
>> 
>> from qgis.server import QgsServer, QgsServerRequest,
>> QgsBufferServerRequest, QgsBufferServerResponse
>> 
>> server = QgsServer()
>> 
>> qs = "?" + "&".join(["%s=%s" % i for i in list({
>>"MAP": '/tmp/qgis_project.qgs',
>>"SERVICE": "WFS",
>>"VERSION": "1.0.0",
>>"REQUEST": "GetCapabilities"
>>}.items())])
>> requestMethod = QgsServerRequest.GetMethod
>> headers = {}
>> data = '' #can be the xml request for requestMethod =
>> QgsServerRequest.PostMethod
>> 
>> request = QgsBufferServerRequest(qs, requestMethod, headers, data)
>> response = QgsBufferServerResponse()
>> server.handleRequest(request, response)
>> 
>> headers = []
>> rh = response.headers()
>> rk = sorted(rh.keys())
>> for k in rk:
>>headers.append(("%s: %s" % (k, rh[k])).encode('utf-8'))
>> 
>> body = bytes(response.body())
>> 
>> Now QGIS Server needs somes enhancement and cleanup.
>> 
>> René-Luc D'Hont
>> 3Liz
>> 
>> Le 04/10/2017 à 13:23, Régis Haubourg a écrit :
>>> Hi 
>>> 
>>> Yes, refactoring is now complete! see :
>>> https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74#issuecomment-334123595
>>> 
>>> Anita, I'll draft an article tonight if you still agree to review it,
>>> that would be great!
>>> 
>>> Régis
>>> 
>>> 
>>> 
>>> 2017-10-03 14:25 GMT+02:00 Anita Graser >> >>:
>>> 
>>> 
>>> 
>>>On Tue, Oct 3, 2017 at 11:19 AM, Régis Haubourg
>>>mailto:regis.haubo...@gmail.com> 
>>> >> wrote:
>>> 
>>>Hi Etienne, 
>>> 
>>>from my point of view, this is the perfect time to start
>>>stressing QGIS server 3! We just discussed bout starting
>>>working with it this morning on a new project. 
>>> 
>>>Maybe Alessandro and René-Luc can tell us more about the
>>>plugin side. 
>>> 
>>>Paul is currently fixing issues raised by the OGC test
>>>engines. Richard, could you find some time to expose them on a
>>>public url? 
>>> 
>>> 
>>>​What would you think about publishing a QGIS Server update on
>>>blog.qgis.org  >> > once the latest information
>>>has been gathered? I'd like to see Server presented and advertised
>>>more ​widely.
>>> 
>>>​I'd be glad to help write the post if someone can help with the
>>>necessary insights.
>>> 
>>>Regards,
>>>Anita​
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org 
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>>> 
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>>> 
>> 
>> 
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] FeatureIterator Python question

2017-09-15 Thread David Marteau
Sorry, it has already been aswered, did not see the threads.


> Le 15 sept. 2017 à 16:46, David Marteau  a écrit :
> 
> Hi
> 
> If  FeatureIterator is a true iterator then use:
> 
> feature = next(FeatureIterator)
> 
> 
>> Le 15 sept. 2017 à 14:43, Andreas Neumann > <mailto:a.neum...@carto.net>> a écrit :
>> 
>> Hi,
>> 
>> While porting a project from QGIS 2x to 3x I came across a Python issue:
>> 
>> In QGIS 2.x I had a code like below working:
>> 
>> feature = FeatureIterator.next()
>> 
>> In QGIS 3x it says that object has no attribut next.
>> 
>> How do I access the first result of a feature iterator in QGIS 3?
>> 
>> I don't want to loop, because I know that my FeatureIterator always has just 
>> one result. I just want to access this first feature.
>> 
>> Thanks for your help,
>> 
>> Andreas
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] FeatureIterator Python question

2017-09-15 Thread David Marteau
Hi

If  FeatureIterator is a true iterator then use:

feature = next(FeatureIterator)


> Le 15 sept. 2017 à 14:43, Andreas Neumann  a écrit :
> 
> Hi,
> 
> While porting a project from QGIS 2x to 3x I came across a Python issue:
> 
> In QGIS 2.x I had a code like below working:
> 
> feature = FeatureIterator.next()
> 
> In QGIS 3x it says that object has no attribut next.
> 
> How do I access the first result of a feature iterator in QGIS 3?
> 
> I don't want to loop, because I know that my FeatureIterator always has just 
> one result. I just want to access this first feature.
> 
> Thanks for your help,
> 
> Andreas
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Building QGIS 2.18 on OSX

2017-06-01 Thread David Marteau
Hi,

You will find some information for building QGIS 2.18 and QGIS master on OSX 
here: 

https://www.3liz.com/blog/rldhont/index.php?post/2017/06/01/How-to-build-qgis-on-OSX-with-MacPort


> Le 31 mai 2017 à 16:49, William Kyngesburye  a écrit :
> 
> Well, I build the OS X package.  I recently upgraded to Sierra and it messed 
> up my development setup.  I had problems with QGIS also, but didn't want to 
> spend time figuring it out (I need to build for older systems, and I was way 
> behind on QGIS updates) so I used my other Mac that I kept at Yosemite.
> 
> - installing Qt4 - I had already installed Qt4 so running the installer was 
> not a problem.  But what I have is a standard OS X installer package for Qt4, 
> that should not crash anyways.  BUT, it installs a couple important items in 
> /usr/lib and /usr/bin, which are protected in Sierra by SIP and will fail.  
> You'd have to hack those bits so they are available elsewhere in an 
> unprotected location.  You can use Pacifist to extract installer files so you 
> can put them in custom locations.
> 
> - compiling Qt4 - I never had much luck with this in the past, even in 
> supported OS X versions, but it's long past supported OS X versions and you 
> will at least get lots of warnings, if not errors.  Maybe homebrew and the 
> like have patches to work around these, but sounds like you still had 
> problems.
> 
> 
>> On May 29, 2017, at 9:33 AM, Helton Costa > > wrote:
>> 
>> Hi everybody,
>> 
>> This is my first post here and I hope there's not already a post related to 
>> this, even thought I searched through the list a little.
>> 
>> I have been trying to build QGIS 2.18 for about 3 weeks following a few step 
>> by steps I found but none of them gave me success. I'm on OSX 10.12.
>> I first followed the official step by step from QGIS, and then, other ones 
>> using homebrew, but wasn't able to finish the build for the intended version.
>> I do believe I have a polluted OS and libraries, but I invested around 6 
>> hours cleaning it and my environments to try it all again, and still, no 
>> success.
>> 
>> Mainly, I believe my issue is regarding Qt4, which is already deprecated and 
>> I'm not able to install it properly. I already tried the .dmg from 
>> official's qt website (which crashes) and some cartr and osgeo formulaes 
>> from homebrew and still no success.
>> Somewhere along the configuration and build process I get errors regarding 
>> Qt4 or some of their python bindings libraries and even thought I did manage 
>> to fix some of them, the build was never able to finish.
>> 
>> Do you guys believe it is still possible to build non-master versions of 
>> QGIS on OSX, and if so, what would be some kind of different approach in 
>> order to be able to achieve it?
>> 
>> Kind regards, 
>> 
>> Helton Costa
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/ 
> 
> Earth: "Mostly harmless"
> 
> - revised entry in the HitchHiker's Guide to the Galaxy
> 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Fwd: Cannot build qgis with sip 4.19

2017-05-29 Thread David Marteau

Please read sip 4.19

> Début du message réexpédié :
> 
> De: David Marteau 
> Objet: Cannot build qgis with sip 2.19 
> Date: 29 mai 2017 17:17:13 UTC+2
> À: qgis-developer 
> 
> Hi all, 
> 
> There is no way to build qgis 2.18 (latest on branch) on osx with qt4 and sip 
> 2.19:
> 
> Traceback (most recent call last):
>  File "../../../../../scripts/pyuic-wrapper.py", line 26, in 
>import qgis.PyQt.uic.pyuic
>  File "/Users/david/Projets/qgis/QGIS/build/output/python/qgis/__init__.py", 
> line 27, in 
>from qgis.core import QgsFeature, QgsGeometry
>  File 
> "/Users/david/Projets/qgis/QGIS/build/output/python/qgis/core/__init__.py", 
> line 30, in 
>from qgis._core import *
> RuntimeError: qgis._core cannot import type 'QList' from 
> PyQt4.QtCore
> 
> make[3]: *** 
> [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:118:
>  python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
> make[3]: Leaving directory '/Users/david/Projets/qgis/QGIS/build'
> make[2]: *** [CMakeFiles/Makefile2:5391: 
> python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all] 
> Error 2
> make[2]: Leaving directory '/Users/david/Projets/qgis/QGIS/build'
> make[1]: *** [Makefile:163: all] Error 2
> make[1]: Leaving directory '/Users/david/Projets/qgis/QGIS/build'
> make: *** [Makefile:29: build] Error 2
> 
> This seems to be related to 
> 
> https://issues.qgis.org/issues/16343
> https://issues.qgis.org/issues/16071
> 
> I suspect that there is no proper sip definition for QList. 
> compatible with sip 2.19
> 
> Any clue ?
> 
> David,
> 
> 
> 
> 
> 

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Cannot build qgis with sip 2.19

2017-05-29 Thread David Marteau
Hi all, 

There is no way to build qgis 2.18 (latest on branch) on osx with qt4 and sip 
2.19:

Traceback (most recent call last):
  File "../../../../../scripts/pyuic-wrapper.py", line 26, in 
import qgis.PyQt.uic.pyuic
  File "/Users/david/Projets/qgis/QGIS/build/output/python/qgis/__init__.py", 
line 27, in 
from qgis.core import QgsFeature, QgsGeometry
  File 
"/Users/david/Projets/qgis/QGIS/build/output/python/qgis/core/__init__.py", 
line 30, in 
from qgis._core import *
RuntimeError: qgis._core cannot import type 'QList' from PyQt4.QtCore

make[3]: *** 
[python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:118:
 python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
make[3]: Leaving directory '/Users/david/Projets/qgis/QGIS/build'
make[2]: *** [CMakeFiles/Makefile2:5391: 
python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all] Error 
2
make[2]: Leaving directory '/Users/david/Projets/qgis/QGIS/build'
make[1]: *** [Makefile:163: all] Error 2
make[1]: Leaving directory '/Users/david/Projets/qgis/QGIS/build'
make: *** [Makefile:29: build] Error 2

This seems to be related to 

https://issues.qgis.org/issues/16343
https://issues.qgis.org/issues/16071

I suspect that there is no proper sip definition for QList. 
compatible with sip 2.19

Any clue ?

David,





___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Spatialite KyngChaos packaging on OSX not loading spatialite extension

2017-04-03 Thread David Marteau
Hi,


For some times some people are reporting that plugins using pyspatialite are 
not working anymore  with the KyngChaos packaging for OSX (2.14 or 2.18)

The error is usually:

OperationalError('no such module: VirtualSpatialIndex',)

when trying to référence SpatialIndex in spatial requests.
After investigation it appears that errors occurs when trying to use spatialite 
functions…

The fact is, when using pyspatialite directly from python: the spatialite 
extension is not loaded.

cur.execute('SELECT spatialite_version()')
> OperationalError: no such function: spatialite_version

and so on for any SELECT involving spatialite functions.

This can be explained easily has the pyspatialite python package is only a link 
to the pysqlite2 python package, and thus, do not load the the spatialite 
module. 

Furthemore loading extension is disabled in the KyngChaos sqlite3 package, so 
we are stuck in that the pyspatialite provided by KyngChaos is useless as 
standalone library and do not enable plugins to make direct calls to  
spatialite.


Is there any reason for this situation or this should be considered as a bug ?? 

Actually, the native OSX sqlite3 python binding do not enable leading 
extensions, this was preventing using spatialite from python. This constraint 
has been removed recently in Macport, which now enables to use spatialite with 
python without relying on pyspatialite.



David.

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Spatialite in QGIS master

2017-01-30 Thread David Marteau
PySpatialite is a totally obsoleted python package: you must explicitely load 
the mod_spatialite extension using the spatialite load_extension(..).

Qgis use its own version of pyspatialite, but you must enable it in the build 
configuration as stated by Matthias. 



> Le 30 janv. 2017 à 13:10, Saber Razmjooei 
>  a écrit :
> 
>  sudo pip3 install pyspatialite ?
> 
> Cheers
> Saber
> 
> On 30 January 2017 at 10:48, matteo  > wrote:
> Hi all,
> 
> I don't know if a miss some older discussion on this topic but I'm not
> able to load SpatiaLite databases in QGIS 3.
> 
> It seems there there is no pyspatialite for python3:
> 
> Traceback (most recent call last):
>   File
> "/home/matteo/lavori/QGIS/build-qgis3/output/python/qgis/utils.py", line
> 598, in spatialite_connect
> from pyspatialite import dbapi2
>   File
> "/home/matteo/lavori/QGIS/build-qgis3/output/python/qgis/utils.py", line
> 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ImportError: No module named 'pyspatialite'
> 
> 
> I checked around on the web and I found an issue the github repo [0]
> 
> Has anyone a working SpatiaLite db on QGIS?
> 
> Thanks to all
> 
> Matteo
> 
> 
> [0] https://github.com/lokkju/pyspatialite/issues/27 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> 
> 
> -- 
> Saber Razmjooei
> www.lutraconsulting.co.uk 
> +44 (0)7568 129733
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS Server in Python?

2017-01-19 Thread David Marteau
Hi,

The server is actually under heavy refactoring: the new version - planned with 
Qgis 3 - enables you to embed the server in any  framework (python or C++) by 
using abstract request/response objects that links all I/O between server and 
your embedding frameworks. Examples will follow soon.

David.


> Le 19 janv. 2017 à 11:03, Sören Gebbert  a 
> écrit :
> 
> Dear developers,
> i have a naive question.
> 
> Would it be possible and meaningful to implement the QGIS Server in Python?
> 
> There are several nice Python Web-frameworks (Django, Flask) which would make 
> it easy to expose the rendering, data management and processing functionality 
> of QGIS as WMS, WFS or REST service.
> 
> Do you think this may be a good idea to implement?
> 
> Thanks and best regards
> Soeren 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Replacing Q_FOREACH in Qgis code

2017-01-19 Thread David Marteau
Hi,

I would like to know if there is plans for replacing Q_FOREACH (use discouraged 
from QT 5.7) with C++11 range based loop in QGIS code and if it is appropriate 
to start the move in new PR ?

Some références:
http://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH
http://en.cppreference.com/w/cpp/language/range-for
https://www.kdab.com/goodbye-q_foreach/

Thx
David
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS setup with Qt 5 on mac

2016-10-31 Thread David Marteau
Hi

I will speak with my own experience using and compiling Qgis on Mac (El capitan 
and Maverick):

First I use Macport: MacPort use clang/libc++ by default (at least with XCode 
5.3 on Maverick, 7.3 on El capitan) so this should solve one of your problems.
I have installed qt5 from MacPort without problems. 

The problems arise with some ports that do not fully support qt5 variants and 
you need to tweak some portfiles: qscintilla and py-qscintilla are one of them 
and are required by Qgis. 
If you are interested I can give you my diff files for portfiles.

I had to build qwt directly from sources because tweaking Macport portfiles was 
too painful, but I did not encounter any serious problems as far as I can 
remember.

No source code was needed to be patched, only compilation configurations. 

Once you get all dependencies you need to set the cmake options accordingly to 
the path of your installation:

Here is my defines:

»   »   -DCMAKE_INSTALL_PREFIX:PATH=/Applications \
»   »   -DWITH_SERVER=ON \
»   »   -DWITH_PYSPATIALITE=ON \
»   »   
-DPYTHON_CUSTOM_FRAMEWORK:PATH=/opt/local/Library/Frameworks/Python.framework  \
»   »   -DEXPAT_INCLUDE_DIR:PATH=/opt/local/include \
»   »   -DEXPAT_LIBRARY:FILEPATH=/opt/local/lib/libexpat.dylib \
»   »   -DSQLITE3_INCLUDE_DIR:PATH=/opt/local/include \
»   »   -DSQLITE3_LIBRARY:FILEPATH=/opt/local/lib/libsqlite3.dylib \
»   »   -DQT_QMAKE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/qmake \
»   »   
-DQWT_INCLUDE_DIR:PATH=/usr/local/qwt-6.1.3/lib/qwt.framework/Versions/6/Headers
 \
»   »   
-DQWT_LIBRARY:FILEPATH=/usr/local/qwt-6.1.3/lib/qwt.framework/Versions/6/qwt \
»   »   -DQCA_INCLUDE_DIR:PATH=/opt/local/include/qca \
»   »   -DQCA_LIBRARY:FILEPATH=/opt/local/lib/libqca.dylib \
»   »   -DQSCINTILLA_INCLUDE_DIR:PATH=/opt/local/libexec/qt5/include \
»   »   
-DQSCINTILLA_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/libqscintilla2.dylib \
»   »   -DQT_LRELEASE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/lrelease \

I hope that full support for qt5 will be available from Macport soon, but for 
now I have managed to compile Qgis from the master branch without struggling 
too much. 

Best,
David 

> Le 31 oct. 2016 à 16:12, Diane Perez  a écrit :
> 
> Dear QGIS developers,
> 
> First of all, thank you very much for the great job, I have been a very happy 
> user for years !
> 
> I would like to contribute now to the development, but I found myself stuck 
> at the installation of dependencies.
> 
> According to the instructions of the INSTALL file provided with the source 
> code, mac users should use Qt 4 and compile and install a bunch of 
> dependencies for which binaries are not available (mainly Spatialindex, SIP, 
> QScintilla2, PyQt, Qwt and bison) before being able to compile QGIS. I 
> followed the instructions and got stuck at compiling QGIS as the master now 
> requires Qt 5.
> 
> Now as I actually started by installing Qt 5 by mistake, I had the 
> opportunity to see that it leads to a lot of problems to compile the 
> dependencies. As far as I understand, Qt 5 requires C++11, which means one 
> must use the new libc++ library instead of the old libstdc++ (at least on my 
> configuration, with El Capitan and clang/llvm). Some modifications are such 
> that mixing both is not possible, so everything must be compiled from start 
> with C++11 and libc++. Unfortunately most of the dependencies I mention above 
> do not compile without tweaking, and I stopped doing it when it started 
> meaning not only modifying the Makefiles but the code itself...
> 
> I guess some of you work on mac, and have a far better understanding of all 
> this than me. So my question is : how did you install those dependencies to 
> compile the last version of QGIS with Qt 5 ? 
> 
> Did you have to compile again all of them or only a subset using Qt 5 and 
> C++11 ? If so, how did you do it ? I got stuck at Qwt (6.1.3) which uses lots 
> of functions deprecated in Qt 5.
> 
> I hope someone can give me pointers, as I would really like to contribute to 
> QGIS (and hopefully fix a few bugs bugging me) !
> 
> Best regards,
> Diane
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

Re: [Qgis-developer] WIP: QGIS Server refactoring

2016-10-21 Thread David Marteau

The idea is to have an 'aviary' branch that can mess with the server while 
keeping it in sync with the master, then at some point that branch can 'land' 
to the master.



> Le 21 oct. 2016 à 18:14, Paolo Cavallini  a écrit :
> 
> Il 21/10/2016 18:10, David Marteau ha scritto:
>> Hi Andreas,
>> 
>> We know that it will be premature to write code that dépends on the qgis
>> core api and that we have to wait that things stabilize on this side and
>> that no refactoring of the services can occurs without the refactoring
>> of Martin. 
>> 
>> The part of the code we wand to start is the support machinery for
>> dynamic loading and registering of services and eventually the supports
>> for the plugins.
>> For this part, we do need to rely on anything from the qgis core
>> functionalities and thus  Martin Dobias's refactoring can go at its own
>> pace.
> 
> Hi all,
> I think we al very much welcome any improvement in any section of QGIS,
> including of course our beloved server.
> I may be missing something, but IMHO develoiping on a separate branch
> only increases the risk of misalignment: why not keeping everything in
> one place? I understand you are more free to break everything, but risks
> seem to overweight the advantages.
> All the best.
> 
> -- 
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

Re: [Qgis-developer] WIP: QGIS Server refactoring

2016-10-21 Thread David Marteau
Hi Andreas,

We know that it will be premature to write code that dépends on the qgis core 
api and that we have to wait that things stabilize on this side and that no 
refactoring of the services can occurs without the refactoring of Martin. 

The part of the code we wand to start is the support machinery for dynamic 
loading and registering of services and eventually the supports for the plugins.
For this part, we do need to rely on anything from the qgis core 
functionalities and thus  Martin Dobias's refactoring can go at its own pace.

David


> Le 21 oct. 2016 à 17:54, Neumann, Andreas  a écrit :
> 
> Hi René-Luc,
> 
> hm - I am not sure if this is good timing.
> 
> Martin Dobias will refactor the layer tree extensively to allow a better QGIS 
> server code design. It is his proposal he submitted for the QGIS grants. The 
> swiss QGIS user group, potentially together with the german QGIS user group 
> will pay for his work, because it didn't make the grant in the voting, but we 
> still thought it is important work to be done.
> 
> I guess it would make sense to wait until his work will be finished and then 
> start the QGIS server refactoring. However, it would be good to collaborate 
> with Martin to make sure his refactoring is useful for the QGIS server 
> refactoring.
> 
> Greetings,
> 
> Andreas
> 
> On 2016-10-21 17:40, René-Luc Dhont wrote:
> 
>> Hi devs,
>> 
>> We (David Marteau and I) will start the QGIS Server refactoring.
>> 
>> The first step for us is to develop the *service register* like described in 
>> the QEP: QGIS server code refactoring for QGIS 3.0 
>> https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74 
>> <https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74>
>> 
>> To keep the developement open, we proposed to use a github repository to 
>> centralize *Pull Request* and development strictly on QGIS Server with a 
>> dedicated branch https://github.com/3liz/QGIS/tree/master_qgis_server 
>> <https://github.com/3liz/QGIS/tree/master_qgis_server>
>> We proposed to do so to have the possibility to broke the code but we will 
>> continue to merge master in it during the dev.
>> We will open the right to other QGIS Server developers and be proud to 
>> review Pull Request.
>> 
>> Our goal is to keep the functionalities, simplify the code and add 
>> modularity; to have something more maintainable, robust and expendable.
>> 
>> Regards,
>> René-Luc D'Hont
>> 3Liz
>> 
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org <mailto:Qgis-developer@lists.osgeo.org>
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> <http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> <http://lists.osgeo.org/mailman/listinfo/qgis-developer> 
>  
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

Re: [Qgis-developer] QGIS server improvements

2016-10-12 Thread David Marteau
Ok for the renaming.

> Le 12 oct. 2016 à 10:04, Neumann, Andreas  a écrit :
> 
> Hi,
> 
> Yes - that seems a good place to do the discussions.
> 
> Maybe the title of the QEP can be renamed to "QGIS server code refactoring 
> for QGIS 3.0" - or something similar. And the original proposal about the 
> "Server Services as plugins" could be included?
> 
> Thanks and greetings,
> Andreas
> 
> On 2016-10-12 09:56, David Marteau wrote:
> 
>> Hi,
>> 
>> There a QEP about the refactoring of the server that already addresses some 
>> issues: https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74 
>> <https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74>, could it fit 
>> as a starting point ?
>> 
>> 
>>> Le 12 oct. 2016 à 09:42, Paolo Cavallini >> <mailto:cavall...@faunalia.it>> a écrit :
>>> 
>>> Il 12/10/2016 09:26, Neumann, Andreas ha scritto:
>>> 
>>>> Lets spend some time first, to collect all the requirements before we do
>>>> any further actions. I think in this situation a QEP, describing what to
>>>> do in what order, makes a lot of sense. After that we can look into who
>>>> could do what.
>>> 
>>> Agreed fully. Would you like to start it?
>>> Thanks a lot.
>>> 
>>> -- 
>>> Paolo Cavallini - www.faunalia.eu <http://www.faunalia.eu/>
>>> QGIS & PostGIS courses: http://www.faunalia.eu/training.html 
>>> <http://www.faunalia.eu/training.html>
>>> https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis 
>>> <https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis>
>>> ___
>>> Qgis-developer mailing list
>>> Qgis-developer@lists.osgeo.org <mailto:Qgis-developer@lists.osgeo.org>
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer 
>>> <http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer 
>>> <http://lists.osgeo.org/mailman/listinfo/qgis-developer> 
>  

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

Re: [Qgis-developer] QGIS server improvements

2016-10-12 Thread David Marteau
Naturally, I volonteer for help.

> Le 12 oct. 2016 à 10:07, Paolo Cavallini  a écrit :
> 
> Il 12/10/2016 09:56, David Marteau ha scritto:
>> Hi,
>> 
>> There a QEP about the refactoring of the server that already addresses some 
>> issues: https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74, could 
>> it fit as a starting point ?
> 
> Thanks everybody for comments. I agree we should start moving ASAP, and
> what we mainly need at this stage is someone taking the lead on this,
> ensuring that nothing important will fall into the cracks. Andreas,
> would you be available? Anybody else? If nobody, I can help.
> All the best.
> 
> -- 
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis

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

Re: [Qgis-developer] QGIS server improvements

2016-10-12 Thread David Marteau
Hi,

There a QEP about the refactoring of the server that already addresses some 
issues: https://github.com/qgis/QGIS-Enhancement-Proposals/issues/74, could it 
fit as a starting point ?


> Le 12 oct. 2016 à 09:42, Paolo Cavallini  a écrit :
> 
> Il 12/10/2016 09:26, Neumann, Andreas ha scritto:
> 
>> Lets spend some time first, to collect all the requirements before we do
>> any further actions. I think in this situation a QEP, describing what to
>> do in what order, makes a lot of sense. After that we can look into who
>> could do what.
> 
> Agreed fully. Would you like to start it?
> Thanks a lot.
> 
> -- 
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

Re: [Qgis-developer] Tests: QGIS loadPythonSupport: cannot import future

2016-09-27 Thread David Marteau
Thx, I have missed that doc

David



> Le 27 sept. 2016 à 17:29, Matthias Kuhn  a écrit :
> 
> Hi,
> 
> use pip to install it:
> 
> https://github.com/qgis/QGIS/blob/master/ci/travis/osx/before_install.sh#L41
> 
> Best
> Matthias
> 
> On 09/27/2016 05:21 PM, David Marteau wrote:
>> Hi
>> 
>> 
>> loadPythonSupport() load utils.py which in turn try to load the 'future' 
>> package: this package is not in the build nor the install path and so 
>> loadPythonSupport 
>> fail  and python support  is deactivated.
>> 
>> Any idea ?
>> 
>> I'm building on Mac OSX 10.9 (Maverick)
>> 
>> Thx
>> David
>> 
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

[Qgis-developer] Tests: QGIS loadPythonSupport: cannot import future

2016-09-27 Thread David Marteau
Hi


loadPythonSupport() load utils.py which in turn try to load the 'future' 
package: this package is not in the build nor the install path and so 
loadPythonSupport 
fail  and python support  is deactivated.
 
Any idea ?

I'm building on Mac OSX 10.9 (Maverick)

Thx
David

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

Re: [Qgis-developer] Test crashes on if providers not found.

2016-09-27 Thread David Marteau
I have found that runtime path was not set correctly  on one dependency 
(libqscintilla) and thus the library was not loaded (image not found), not easy 
to guess because the tests were just crashing without hints,  maybe some more 
validity tests should be done to prevent dereferencing null pointers.

David


> Le 27 sept. 2016 à 15:24, Nyall Dawson  a écrit :
> 
> On 27 September 2016 at 23:07, David Marteau  wrote:
>> Hi,
>> 
>> 
>> I'm trying to run tests on OSX 10.9.5 (Maverick), by running the following
>> 
>>> sudo make install
>>> make test
> 
> I'm not sure if "make test" works with QGIS. The usual approach is to
> switch to your build folder and then run "ctest".
> 
> Nyall
> 
> 
>> 
>> I have the following warning "!!! prefix path was requested, but it is not 
>> valid - we do not run from installed path !!!" then all tests
>> involving loading a provider are crashing.
>> 
>> I figured out that provider was not found  and In those tests will crash 
>> with a segfault because they are trying to dereference a null pointer on 
>> provider before testing if the returned objects are valid or not.
>> 
>> Is there something missing for setting the correct prefix in tests ?
>> 
>> Thx
>> David
>> 
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

[Qgis-developer] Test crashes on if providers not found.

2016-09-27 Thread David Marteau
Hi,


I'm trying to run tests on OSX 10.9.5 (Maverick), by running the following

> sudo make install
> make test

I have the following warning "!!! prefix path was requested, but it is not 
valid - we do not run from installed path !!!" then all tests
involving loading a provider are crashing.

I figured out that provider was not found  and In those tests will crash with a 
segfault because they are trying to dereference a null pointer on provider 
before testing if the returned objects are valid or not.

Is there something missing for setting the correct prefix in tests ?

Thx
David

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

Re: [Qgis-developer] [QGIS Server] Maintain it and create a team

2016-09-26 Thread David Marteau
Hi

Are you telling that the server codebase could rely on these features 
(multiproject management and layer cache) with
the actual refactoring ?  This would be really a good thing - (and also a 
better handling of the layer registry that introduces weird
things with the ownership of layers).  

Afaik, trying to genuinely load a project in a headless qgis leads to a crash, 
and this why the server had to
manage things on its own.

Regards
David
 


> Le 26 sept. 2016 à 16:44, Jürgen E. Fischer  a écrit :
> 
> Hi Andreas,
> 
> On Mon, 26. Sep 2016 at 14:37:30 +0200, Neumann, Andreas wrote:
>> I have to say it comes a bit as a surprise to me that suddenly QGIS
>> server is not regarded as a core component of QGIS anymore. 
> 
> Me too.  To me it's also not so clear why it should be separated more from
> core.  I guess it would be better to make core more suitable for use with the
> server.  So all the special things it now does to manage multiple projects and
> caching of layers across projects should be already covered there and don't
> have to be reinvented in the server in a different way.
> 
> I also don't clearly see how moving it to a separate repository with a 
> separate
> release schedule will make things easier.   My expectation would be that it
> then would need to support multiple versions of core.  And keeping it in sync
> with the cores would need extra effort by the server team, that is now covered
> with the rest of the following changes to gui, app etc. by whoever does change
> core.
> 
> 
> Jürgen
> 
> -- 
> Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
> Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
> Software Engineer   D-26506 Norden http://www.norbit.de
> QGIS release manager (PSC)  GermanyIRC: jef on FreeNode   
>   
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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