Re: [QGIS-Developer] Monitor QGIS (Server) memory consumption per project

2021-07-28 Thread kimaidou
Hey,

I updated my "audit qgis projects" processing algorithm with a
quick-and-dirty method to calculate the memory usage, before and after each
project reading
https://gist.github.com/mdouchin/cd89a259d3560635d4bb8708ad430caa#file-lizmapauditqgisprojects-py-L150

It is not very reliable and should not be used in a highly changing
environment (production server with high activity).
It could help nonetheless...

Regards,
Michaël

Le mer. 28 juil. 2021 à 12:08, kimaidou  a écrit :

> Hi all,
>
> We (@3liz.com) use QGIS Server since a long time to provide hosting
> services for our clients, with Lizmap Web Client (LWC) as the web map
> builder.
>
> Having hundred LWC instances, we pay obviously attention to metrics, and
> monitor the CPU, memory, requests response time, etc.
>
> We sometimes encounter heavy memory consumption for specific projects, for
> example :
> https://github.com/qgis/QGIS/issues/43787
> which put a lot of strain to the servers.
>
> It is often very hard to find the project(s) responsible for a high memory
> usage, in a production context, when many requests are run in parallel for
> many projects.
>
> I created a POC processing script to audit all the QGIS projects stored in
> a folder:
> https://gist.github.com/mdouchin/cd89a259d3560635d4bb8708ad430caa/
> which helps a bit to gather some key figures, such as the number of
> layers, the sum of the images used in map layouts, etc.
> This can help, but often the memory consumption is not related to the
> number of layers, and we use a "find a needle in the haystack" approach to
> find the problematic project(s).
>
> For example, I spent once a whole day finding that a too big JPEG used in
> a print layout causes the heavy memory usage:
> * look at the memory curve,
> * find the moment when the memory increased a lot
> * use the command line find  to get which QGIS project files has changed
> during this period (for example because it has been uploaded by the user)
> * look inside QGIS logs to find which project has been loaded during this
> period, and compare
> * if you are lucky, there are not so many projects involved...
> * download the project, open it in QGIS Desktop to observe and confirm the
> memory issue
> * try to understand which causes the issue
> * ...
>
> We are also building a REST API over py-qgis-server (
> https://github.com/3liz/py-qgis-server ) which will allow to get
> information on the loaded projects, to ease the auditing process in
> real-time. (It will be opensource).
>
> In the processing script, and in this API tool, we still miss a very
> important metric: how much each project consumes the system memory (RAM). I
> am not sure it could be easily done, but it will be very handy to:
>
> * find heavy memory consumer projects
> * see how the memory evolves
> * compare the memory usage for each QGIS versions (with the same project
> and layers)
> * help to find the possible memory leaks
>
> This message is not a feature request, I would like to get your experience
> and opinion regarding this memory usage issue. Any contribution welcome ;-)
>
> Thanks in advance
> Michaël
>
___
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] Monitor QGIS (Server) memory consumption per project

2021-07-28 Thread kimaidou
Hi all,

We (@3liz.com) use QGIS Server since a long time to provide hosting
services for our clients, with Lizmap Web Client (LWC) as the web map
builder.

Having hundred LWC instances, we pay obviously attention to metrics, and
monitor the CPU, memory, requests response time, etc.

We sometimes encounter heavy memory consumption for specific projects, for
example :
https://github.com/qgis/QGIS/issues/43787
which put a lot of strain to the servers.

It is often very hard to find the project(s) responsible for a high memory
usage, in a production context, when many requests are run in parallel for
many projects.

I created a POC processing script to audit all the QGIS projects stored in
a folder:
https://gist.github.com/mdouchin/cd89a259d3560635d4bb8708ad430caa/
which helps a bit to gather some key figures, such as the number of layers,
the sum of the images used in map layouts, etc.
This can help, but often the memory consumption is not related to the
number of layers, and we use a "find a needle in the haystack" approach to
find the problematic project(s).

For example, I spent once a whole day finding that a too big JPEG used in a
print layout causes the heavy memory usage:
* look at the memory curve,
* find the moment when the memory increased a lot
* use the command line find  to get which QGIS project files has changed
during this period (for example because it has been uploaded by the user)
* look inside QGIS logs to find which project has been loaded during this
period, and compare
* if you are lucky, there are not so many projects involved...
* download the project, open it in QGIS Desktop to observe and confirm the
memory issue
* try to understand which causes the issue
* ...

We are also building a REST API over py-qgis-server (
https://github.com/3liz/py-qgis-server ) which will allow to get
information on the loaded projects, to ease the auditing process in
real-time. (It will be opensource).

In the processing script, and in this API tool, we still miss a very
important metric: how much each project consumes the system memory (RAM). I
am not sure it could be easily done, but it will be very handy to:

* find heavy memory consumer projects
* see how the memory evolves
* compare the memory usage for each QGIS versions (with the same project
and layers)
* help to find the possible memory leaks

This message is not a feature request, I would like to get your experience
and opinion regarding this memory usage issue. Any contribution welcome ;-)

Thanks in advance
Michaël
___
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-psc] Grant report: Rework handling of multi-layer, mixed-format datasets

2021-07-28 Thread kimaidou
Thanks a lot !

Regards,
Michaël

Le mer. 28 juil. 2021 à 09:00, Tim Sutton  a écrit :

> Wow great work Nyall!
>
> Regards
>
> Tim
>
> Sent from my iPhone
>
> On 28 Jul 2021, at 07:43, Paolo Cavallini  wrote:
>
> Thanks a lot Nyall, I'm sure you did more and better work than it was
> expected. Our donors can be happy.
> Cheers.
>
> Il 28 luglio 2021 07:02:30 EEST, Nyall Dawson  ha
> scritto:
>>
>> Hi lists,
>>
>> Just reporting in the conclusion of the grant work: "Rework handling
>> of multi-layer, mixed-format datasets". You can read more about the
>> motivation behind this work at
>> https://github.com/qgis/QGIS-Enhancement-Proposals/issues/216
>>
>> While the work was partly motivated as an opportunity to clean up some
>> older parts of the QGIS codebase which were fragile and had low test
>> coverage, it has also resulted in many improvements and polish in the
>> QGIS user interface. Specifically:
>>
>> - There's a much improved dialog shown when a user has to pick from
>> multiple layers from a dataset dropped onto QGIS. The dialog will
>> populate in a background thread, avoiding the UI hangs older QGIS
>> versions experience when scanning for layers in large files. The
>> dialog shows a unified view of all layers in the dataset, regardless
>> of whether they are vector, raster or mesh layers. There's also a new
>> "filter" widget allowing users to quickly find matching layers in
>> larger datasets.
>>
>> - The browser view of files and file-based datasources has been
>> reworked. You'll no longer see duplicate entries for the same files
>> when these files can be read as either raster/vector/mesh layers (e.g.
>> for netcdf files, geopdf files and other mixed-format types). A lot of
>> consistency has been added to the right click actions you see when
>> interacting with file based items, with many bugs fixed along the way.
>>
>> Under the hood, we've now got a flexible API for querying sublayers of
>> a dataset which can be easily extended to new providers so that they
>> automatically participate in the unified sublayers dialog and browser
>> items. It's all protected by a huge number of new unit tests, the
>> majority of which cover critical functionality which was previously
>> not being tested.
>>
>> Thanks for funding this work!
>> 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
>>
>>
> --
> Sorry for being short___
> Qgis-psc mailing list
> qgis-...@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-psc
>
> ___
> 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] Processing script to audit all projects in a directory and subdirectories

2021-07-16 Thread kimaidou
Hi,

Thanks for your reply.

My answers:

Le ven. 16 juil. 2021 à 14:30,  a écrit :

> Hi, Michael,
>
>
>
> Congratulations for the script!
>

thanks


>
> These days I was looking for a script to list layers from Qgis projects
> with their respective sources (pathfile) and other info like, layer name,
> Invalid pathfile. I would be better if it is possible to do without really
> open the Qgis project file in Qgis.
>
>
>
> I think this script you created do this, If am not wrong, but I did not
> figure out how to list layers from projects.
>

I have not listed all the layers and sources in the output, because it
could be huge (some users have 200 layers in their projects).
I created the plugin "Layer Board" some time ago, which you can use inside
QGIS Desktop, to get a list of layers with their properties (name, title,
datasource, CRS, feature count, etc.). It can export this data to CSV too.
But you have to open the QGIS project.

The processing script "Audit QGIS projects" has not yet this capabilities.
We could think of a new checkbox "Gather all the layers information", which
would create one CSV file per QGIS project (or huge CSV file with all the
layers of all the projects...).



> I use Windows and Qgis 3.18. Do I have to install anything else?
>

Not really, I think. I have not tried it under Windows...


>
>
> I got a CSV file like this:
>
> "
>
>
> *path,basename,last_modified,crs,layer_count,invalid_layer_count,print_layout_count,print_layout_pictures_paths,print_layout_pictures_sizes,print_layout_pictures_total_size,print_layout_pictures_total_size_mb,trust_option_active,last_save_version*
>
> *C:\Users\jorgealmerio\Documents\Mandu.qgz, Mandu,2021-07-15
> 16:46:55,EPSG:31984,126,5,1,,,0,0.0,False,31802*
>
>
>
> *C:\Users\jorgealmerio\Documents\Mandu2.qgz, Mandu2,2021-07-16
> 16:46:55,EPSG:31984,126,5,1,,,0,0.0,False,31802*
>
>
>
> "
>
>
>


This seems to be a correct output.


> Another thing, there are unnecessary blank lines in result CSV file.
>

Hum, bizarre... Do you see all the projects which should be there, ie which
are present in the directory(ies) but not listed in the output CSV file ?


>
>
> Regards,
>

Cheers !
Michaël
___
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] Processing script to audit all projects in a directory and subdirectories

2021-07-16 Thread kimaidou
Hi all !

I just published a WIP processing script I created to audit all the
projects found in a local directory (and subdirectories).
I think it can be useful in different contexts, and if you enough people
find it interesting, I could add it to the QGIS Resource sharing repository.

See a full README here:
https://gist.github.com/mdouchin/cd89a259d3560635d4bb8708ad430caa/

PS: obviously it can be improved, as any piece of code ;) but I think it is
mature enough to be shared

Regards
Michaël
___
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 "fast" mode

2020-03-18 Thread kimaidou
Hi all

Thanks for raising this issue and for your proposal of patch. I agree with
you that in many cases, completely trusting the project for columns, srid,
and all other things needed by Qgis would improve performances a lot in
project loading, and for Qgis server getcapabilities requests.

I do not use often the trust option for two reasons

# only few requests are avoided as you pointed out so the performance
improves "only" a bit
# sometimes you have some layers with changing data, and there is actually
no way to trust only a subset of layers inside the project

Do you think it would be interesting to have the trust option per layer and
not only per project?

Regards
Michael

Le mardi 17 mars 2020, Julien Cabieces  a
écrit :
>
> Hi
>
>>   If I understand correctly, I can change my patch to skip geometry
>> type and srid check when they are saved in project already and when
>> option "trust project" is switched on?
>> (https://github.com/qgis/QGIS/pull/34738)
>
> Yes, I think it looks like the appropriate way of doing 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] Potential vulnerabilities

2020-02-03 Thread kimaidou
Hi all,

Thanks for the report. On this kind of topic, I think it would be wise to
be cautious when writing issues about security. I personally would have
contacted the authors of Lizmap Web Client first before writing an issue on
the public Github repo, with detailed methodology on how to reproduce the
issue. When cross-posting here, I would also have given the link to Lizmap
issue, [1]. This issue has been posted this Saturday evening. I would have
waited for monday morning before raising this issue ;)

Regards
Michaël

[1] https://github.com/3liz/lizmap-web-client/issues/1489

Le lun. 3 févr. 2020 à 00:27, nadiaspit  a écrit :

> Hi Jonathan,
>
> this is a good idea and also a good proposal for the students of next
> edition of Master in Cybersecurity.
> I will tell to my professor.
>
> Thank you
> Nadia
>
>
>
> --
> 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] LTR management [was Re: Delaying 3.10.1?]

2019-11-23 Thread kimaidou
HI,
I totally agree with Nathan on this topic.
Regards,
Michaël

Le sam. 23 nov. 2019 à 13:37, Nathan Woodrow  a écrit :

> Hey,
>
> I know it has been said before, but changing the GDAL/Proj version of the
> LTR versions is really a no go. It's a breaking change in terms of possible
> breakages and just increases risks on a version we need to stay stable.
>
> We are communicating to users they should use the LTR because it's stable
> but changing the major dependencies under the hood with new versions breaks
> this trust and message.  It would be like changing the Qt version inside an
> LTR point release, we just can't do it because it's a full major change
> with massive impacts.   The risk of the LTR running on older stacks is seen
> as a net positive not a negative when it comes to stability for users.
>  The moment we break this trust we lose all the work past work we have put
> in to communicate this message, trust is hard to gain and easy to lose.
>
> I'm not sure what the solution here is because I know OSGeo4w doesn't
> really support that kind of separation yet but if we have a way to fund
> this kind of work I would really like us to consider it (unsure the state
> of the budget but this one is critical IMO).  It's going to be an ongoing
> issue and something that will always have to be resolved with each LTR as
> it moves away from the nightlies with the  dependencies  changing.   I wish
> I had the skills and time to help fix this but at the moment all I can
> offer is my concern.
>
> Regards,
> Nathan
>
> On Sat, Nov 23, 2019 at 10:26 PM Tim Sutton  wrote:
>
>> Hi
>>
>> We also have situations like this [1] where we are breaking the LTR with.
>> Big bumps in GDAL/PROJ version.
>>
>> Could we either a) invest QGIS bug fixing money into resolving these or
>> b) adopt a more conservative approach to adopting new versions of libraries?
>>
>> [1]https://github.com/qgis/QGIS/issues/32953
>>
>> Regards
>>
>> Tim
>>
>> On 23 Nov 2019, at 11:23, Paolo Cavallini  wrote:
>>
>> Hi Tim,
>>
>> Il 23/11/19 11:22, Tim Sutton ha scritto:
>>
>>
>> For windows at least we could ‘freeze’ 3.4.x by pointing them to use the
>> standalone installers but then we have an LTR that is not getting bug
>> fixes. As I read Jürgen’s roadmap [1] we still have 4 more bug fix
>> releases of 3.4 before 3.10 becomes LTR, which is quite a long time to
>> have our ’stable’ version out there with no bug fixes.
>>
>>
>> yes, that's what I meant. It's a kind of bad hack, so as Bas also
>> pointed out the proper solution is just to go ahead and fix the bugs.
>> I feel bad about people wasting their time to fix this compatibility bug
>> that will be useful just for a relatively short period, however.
>> Cheers.
>> --
>> Paolo Cavallini - www.faunalia.eu
>> QGIS.ORG Chair:
>> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
>> ___
>> 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
>>
>>
>> —
>>
>>
>>
>>
>>
>>
>>
>>
>> *Tim Sutton*
>>
>> *Co-founder:* Kartoza
>> *Ex Project chair:* QGIS.org
>>
>> Visit http://kartoza.com to find out about open source:
>>
>> Desktop GIS programming services
>> Geospatial web development
>> GIS Training
>> Consulting Services
>>
>> *Skype*: timlinux
>> *IRC:* timlinux on #qgis at freenode.net
>>
>> I'd love to connect. Here's my calendar link
>>  to make finding time easy.
>>
>> ___
>> 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] Processing alg - best solution for a "value relation" form input ?

2019-06-27 Thread kimaidou
Hi,

I would like to propose a QgsProcessingParameterEnum automatically filled
with data from a layer, exactly in the same way QGIS does with the form
value relation widget.
Basically, the alg author would choose the layer, the key field, the value
field, to order or not by value, and an optionnal filter.

I would like to know if someone had already done it, and if so, I there is
some example code online.

If not, I think I would do this:

* create a new QgsProcessingParameterValueRelationEnum inherited from
QgsProcessingParameterEnum
* use the input metadata to gather the parameters of the datasource. For
example for PostgreSQL, I would add the connection parameters (service) and
the schema and table name. An filter option would be great too.
* add methods (or override existing one ?) to gather the data and then use
the setConditions methods to fill in the combobox.
* I should also add a new method parameterAsValueRelationEnum to get the
code based on the selected item

I could also just call the setOptions method inside the alg, but it would
be harder to maintain accross algs, and it does not seem to be the right
"processing" way of doing it.

Or I could also use the setMetadata method with a widget_wrapper, such as
done for the ConnectionWidgetWrapper ?
db_param.setMetadata({
'widget_wrapper': {
'class':
'processing.gui.wrappers_postgis.ConnectionWidgetWrapper'
}
})
and then do the magic inside a dedicated class ? How ?

Any help appreciated.

Regards,
Michaël
___
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] Python script to count the number of feature for each unique values

2019-02-26 Thread kimaidou
Thanks a lot Nyall, setting the NoGeometry flags and subset of fields does
improve the speed by factor 3 for my test layer ( 300k features and 80 (!)
fields )

Regards
Michaël

Le lun. 25 févr. 2019 à 23:48, Nyall Dawson  a
écrit :

> On Tue, 26 Feb 2019 at 03:31, kimaidou  wrote:
> >
> > Hi all,
> >
> > I needed to gather basic stats for a layer containing multiple fields. I
> created the following gist to compute the number of features per each
> unique value for a list of given fields
> > https://gist.github.com/mdouchin/a234efb7e67ebd8dae3a04cb26cf5e72
>
> Checkout trap #3 from
> http://nyalldawson.net/2016/10/speeding-up-your-pyqgis-scripts/.
> Specifically, since you aren’t doing anything with the geometry, and
> are only using a single attribute from the layer, by calling setFlags(
> QgsFeatureRequest.NoGeometry ) and setSubsetOfAttributes() you can
> tell QGIS that you don’t need the geometry, and only require a single
> attribute’s value in the feature request. This will give a huge speed
> boost to the feature fetching.
>
> > I know I could use PostgreSQL to do it (see
> https://twitter.com/kimaidou/status/1100053546978983936 conversation),
> wich is much faster, but I needed a quick way to do it with Python.
> > I tested virtual layers too, but my source layer has many fields (with
> some heavy data) and the copy/pasting into spatialite was not efficient
> here.
> >
> > The method uniqueValues(fieldIndex) of QgsVectorLayer is pretty fast
> compared to my iteration through the layer features. Any hint how to
> improve the speed of my calculation ?
>
> Potentially this could be a new method in QgsVectorDataProvider which
> sends a native query to be executed on the backend (like uniqueValues
> does -- that's why it's so fast). But that would require an addition
> to the c++ QgsVectorDataProvider class, and implementations in the
> popular vector data providers.
>
> Nyall
>
> >
> > Regards,
> > Michaël
> > ___
> > 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] Python script to count the number of feature for each unique values

2019-02-25 Thread kimaidou
Hi all,

I needed to gather basic stats for a layer containing multiple fields. I
created the following gist to compute the number of features per each
unique value for a list of given fields
https://gist.github.com/mdouchin/a234efb7e67ebd8dae3a04cb26cf5e72

I know I could use PostgreSQL to do it (see
https://twitter.com/kimaidou/status/1100053546978983936 conversation), wich
is much faster, but I needed a quick way to do it with Python.
I tested virtual layers too, but my source layer has many fields (with some
heavy data) and the copy/pasting into spatialite was not efficient here.

The method uniqueValues(fieldIndex) of QgsVectorLayer is pretty fast
compared to my iteration through the layer features. Any hint how to
improve the speed of my calculation ?

Regards,
Michaël
___
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] Tackling Postgis layers connection recover

2019-02-06 Thread kimaidou
Here is the pull request kindly provided by Timothé
https://github.com/qgis/QGIS/pull/9107

Le mar. 5 févr. 2019 à 13:43, kimaidou  a écrit :

> +1000 Thanks for your help regarding this nasty issue
>
> Le mar. 5 févr. 2019 à 08:00, Paolo Cavallini  a
> écrit :
>
>> Agreed, a long standing annoying issue. Thanks for taking it.
>> Cheers.
>>
>> Il 4 febbraio 2019 23:32:39 CET, Nyall Dawson 
>> ha scritto:
>>>
>>> On Tue, 5 Feb 2019 at 05:54, Timothé Perez  
>>> wrote:
>>> >
>>>
>>>>  Hello qgis-devs,
>>>>
>>>>  This is my first message here and first contribution to QGIS, so I thank 
>>>> you in advance for being indulgent and do not hesitate to correct me on 
>>>> any mistake I will make.
>>>>  I didn't want to jump right into proposing my patch "as is" in a PR as 
>>>> I'm new to this project, so first I wanted to discuss about it to make 
>>>> sure I got it right.
>>>>
>>>>  Here's a recap of what I have found so far (sorry if it's a bit long):
>>>>
>>>>  I'm using QGIS 3.4 with a PostgreSQL database to store layers and I'm 
>>>> facing the same issue as described in https://issues.qgis.org/issues/20170 
>>>> : unrecoverable PostgreSQL connections.
>>>>
>>>>  I have cloned the repo and started to dig, as it is really annoying 
>>>> because it forces you to abandon your changes and close and reopen your 
>>>> project.
>>>>
>>>
>>> Upfront, thanks for the great attitude. This is one of the MOST
>>> effective ways to get bugs fixed... rolling up your sleeves and fixing
>>> them yourself!
>>>
>>>  To reproduce the problem, the simplest way is to spin a local PostgreSQL 
>>> database with postgis and create a table with just a serial and a geometry:
>>>>   CREATE TABLE foo (id serial primary key, geometry GEOMETRY(POINT, 4326));
>>>>
>>>>  Open it in QGIS, create several features, save them then simply restart 
>>>> the PostgreSQL service so that all connections are forced to be closed.
>>>>  QGIS logs will display that the connections to PostgreSQL were lost but 
>>>> recovered and features will still be accessible.
>>>>
>>>>  However if I start editing the layer by adding a feature and then call 
>>>> save, it will fail:
>>>>
>>>>  2019-02-04T19:11:30 CRITICALLayer foo : PostGIS error while 
>>>> adding features: FATAL: terminating connection due to administrator command
>>>>   la connexion au serveur a été coupée de façon inattendue
>>>>Le serveur s'est peut-être arrêté anormalement avant ou 
>>>> durant le
>>>>traitement de la requête.
>>>>
>>>>  2019-02-04T19:11:30 WARNINGCommit errors : Could not commit 
>>>> changes to layer foo
>>>>  2019-02-04T19:11:34 CRITICALLayer foo : PostGIS error while 
>>>> adding features: no result buffer
>>>>  2019-02-04T19:11:34 WARNINGCommit errors : Could not commit 
>>>> changes to layer foo
>>>>
>>>>  My only option is to cancel my edits and reload the project to regain 
>>>> full access to the db.
>>>>
>>>>  So in fact this problem has 2 causes: (time to dig in the C++ code)
>>>>
>>>> *snip*
>>> >
>>>
>>>> I am willing to propose a PR if my fixes make sense and are acceptable, 
>>>> this will fix an annoying issue.
>>>>
>>>
>>> They both sound reasonable to me, and yes, valuables fixes for an
>>> annoying issues! Looking forward to the PRs! (One request: please file
>>> these as two separate PRs, so both fixes can be discussed and reviewed
>>> independently.)
>>>
>>> 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
>>>
>>>
>> --
>> Sorry for being short
>> ___
>> 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] Tackling Postgis layers connection recover

2019-02-05 Thread kimaidou
+1000 Thanks for your help regarding this nasty issue

Le mar. 5 févr. 2019 à 08:00, Paolo Cavallini  a
écrit :

> Agreed, a long standing annoying issue. Thanks for taking it.
> Cheers.
>
> Il 4 febbraio 2019 23:32:39 CET, Nyall Dawson  ha
> scritto:
>>
>> On Tue, 5 Feb 2019 at 05:54, Timothé Perez  
>> wrote:
>> >
>>
>>>  Hello qgis-devs,
>>>
>>>  This is my first message here and first contribution to QGIS, so I thank 
>>> you in advance for being indulgent and do not hesitate to correct me on any 
>>> mistake I will make.
>>>  I didn't want to jump right into proposing my patch "as is" in a PR as I'm 
>>> new to this project, so first I wanted to discuss about it to make sure I 
>>> got it right.
>>>
>>>  Here's a recap of what I have found so far (sorry if it's a bit long):
>>>
>>>  I'm using QGIS 3.4 with a PostgreSQL database to store layers and I'm 
>>> facing the same issue as described in https://issues.qgis.org/issues/20170 
>>> : unrecoverable PostgreSQL connections.
>>>
>>>  I have cloned the repo and started to dig, as it is really annoying 
>>> because it forces you to abandon your changes and close and reopen your 
>>> project.
>>>
>>
>> Upfront, thanks for the great attitude. This is one of the MOST
>> effective ways to get bugs fixed... rolling up your sleeves and fixing
>> them yourself!
>>
>>  To reproduce the problem, the simplest way is to spin a local PostgreSQL 
>> database with postgis and create a table with just a serial and a geometry:
>>>   CREATE TABLE foo (id serial primary key, geometry GEOMETRY(POINT, 4326));
>>>
>>>  Open it in QGIS, create several features, save them then simply restart 
>>> the PostgreSQL service so that all connections are forced to be closed.
>>>  QGIS logs will display that the connections to PostgreSQL were lost but 
>>> recovered and features will still be accessible.
>>>
>>>  However if I start editing the layer by adding a feature and then call 
>>> save, it will fail:
>>>
>>>  2019-02-04T19:11:30 CRITICALLayer foo : PostGIS error while adding 
>>> features: FATAL: terminating connection due to administrator command
>>>   la connexion au serveur a été coupée de façon inattendue
>>>Le serveur s'est peut-être arrêté anormalement avant ou 
>>> durant le
>>>traitement de la requête.
>>>
>>>  2019-02-04T19:11:30 WARNINGCommit errors : Could not commit 
>>> changes to layer foo
>>>  2019-02-04T19:11:34 CRITICALLayer foo : PostGIS error while adding 
>>> features: no result buffer
>>>  2019-02-04T19:11:34 WARNINGCommit errors : Could not commit 
>>> changes to layer foo
>>>
>>>  My only option is to cancel my edits and reload the project to regain full 
>>> access to the db.
>>>
>>>  So in fact this problem has 2 causes: (time to dig in the C++ code)
>>>
>>> *snip*
>> >
>>
>>> I am willing to propose a PR if my fixes make sense and are acceptable, 
>>> this will fix an annoying issue.
>>>
>>
>> They both sound reasonable to me, and yes, valuables fixes for an
>> annoying issues! Looking forward to the PRs! (One request: please file
>> these as two separate PRs, so both fixes can be discussed and reviewed
>> independently.)
>>
>> 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
>>
>>
> --
> Sorry for being short
> ___
> 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] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian

2018-12-11 Thread kimaidou
The primary keys were integer only. So the issues was not caused by
nvarchar as Pkeys. The issue was with nvarchars in general. This behaviour
can be tested with ogr2ogr by converting a table into a geojson or CSV ->
you will see hieroglyphs for exported nvarchar fields.

Le lun. 10 déc. 2018 à 01:03, Nyall Dawson  a
écrit :

> On Sun, 9 Dec 2018 at 03:11, kimaidou  wrote:
> >
> > Hi Nyall,
> >
> > Thanks for your answer. I had already checked that the layers had
> integer primary keys. I have discovered that the "wrong" layers had
> "nvarchar" fields, instead of "varchar". We changed the types of the view
> fields from nvarchar to varchar, and it solved the issue.
>
> Can you elaborate here? Was the issue "nvarchars" in general? Or
> nvarchars used as primary keys?
>
> Nyall
>
> >
> > Cheers,
> > Michaël
> >
> > Le mer. 5 déc. 2018 à 23:55, Nyall Dawson  a
> écrit :
> >>
> >> On Thu, 6 Dec 2018 at 05:37, kimaidou  wrote:
> >> >
> >> > Thanks for your answers. I managed to connect with QGIS MSSQL native
> provider under my Debian box with the following steps
> >> > https://gist.github.com/mdouchin/64f7733a3c4ecfe441f65d5529351a30
> >> >
> >> > I have a weird behaviour. For some layers, QGIS Desktop cannot
> display the features attributes : the attribute table is empty, and the
> identify tool returns no feature. BUT I can see the points in my map, so
> QGIS can query the geography field from the database. For some other
> layers, wich seems identical (same structure for example), I can see the
> attributes (full attribute table and identify OK)
> >> >
> >>
> >> Sounds like an issue with fetching by primary key/feature ID. Is there
> >> any difference between the primary key setup on these tables vs the
> >> ones which work?
> >>
> >> Nyall
> >>
> >>
> >>
> >>
> >> > Have anyone seen this behaviour before ?
> >> >
> >> > Cheers
> >> > Michaël
> >> >
> >> > Le lun. 19 nov. 2018 à 00:12, Nyall Dawson 
> a écrit :
> >> >>
> >> >> On Sat, 17 Nov 2018 at 02:01, kimaidou  wrote:
> >> >> >
> >> >> > Hi all,
> >> >> >
> >> >> > I am trying to connect to a MSSQL server from a QGIS installed in
> a Linux Debian Jessie computer.
> >> >> > I have checked that the credentials are ok with the mssql-client
> from Microsoft:
> >> >> >
> >> >> > mssql-cli -S myserver -U carto -P *** -d MyBase
> >> >> >
> >> >> > I installed the following packages from debian and Microsoft repos
> :
> >> >> >
> >> >> > curl https://packages.microsoft.com/keys/microsoft.asc | apt-key
> add -
> >> >> > curl https://packages.microsoft.com/config/debian/8/prod.list  >
> /etc/apt/sources.list.d/mssql-release.list
> >> >> > apt-get update
> >> >> > ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev
> mssql-tools msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc
> >> >> >
> >> >> > When I open QGIS and try to set up a connection, I use not DSN,
> and I put my server "myserver" as the host. I add the user and password.
> >> >> > Then try to list the databases, but I get this error
> >> >> >
> >> >> > [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not
> found
> >> >>
> >> >> This is all super-fragile. (Just another symptom of SQL Server's
> >> >> inferiority IMO).
> >> >>
> >> >> Have a look at
> https://github.com/qgis/QGIS/blob/master/.ci/travis/linux/docker-build-test.sh#L128
> >> >> for how the Travis testing environment sets up a connection, there
> may
> >> >> be some clues there.
> >> >>
> >> >> Nyall
> >> >>
> >> >> >
> >> >> > I tested with
> >> >> >
> >> >> > root@carto:~# odbcinst -j
> >> >> > unixODBC 2.3.1
> >> >> > DRIVERS: /etc/odbcinst.ini
> >> >> > SYSTEM DATA SOURCES: /etc/odbc.ini
> >> >> > FILE DATA SOURCES..: /etc/ODBCDataSources
> >> >> > USER DATA SOURCES..: /root/.odbc.ini
> >> >> > SQLULEN Size...: 8
> >> >> > SQLLEN Size..

Re: [QGIS-Developer] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian

2018-12-08 Thread kimaidou
Hi Nyall,

Thanks for your answer. I had already checked that the layers had integer
primary keys. I have discovered that the "wrong" layers had "nvarchar"
fields, instead of "varchar". We changed the types of the view fields from
nvarchar to varchar, and it solved the issue.

Cheers,
Michaël

Le mer. 5 déc. 2018 à 23:55, Nyall Dawson  a écrit :

> On Thu, 6 Dec 2018 at 05:37, kimaidou  wrote:
> >
> > Thanks for your answers. I managed to connect with QGIS MSSQL native
> provider under my Debian box with the following steps
> > https://gist.github.com/mdouchin/64f7733a3c4ecfe441f65d5529351a30
> >
> > I have a weird behaviour. For some layers, QGIS Desktop cannot display
> the features attributes : the attribute table is empty, and the identify
> tool returns no feature. BUT I can see the points in my map, so QGIS can
> query the geography field from the database. For some other layers, wich
> seems identical (same structure for example), I can see the attributes
> (full attribute table and identify OK)
> >
>
> Sounds like an issue with fetching by primary key/feature ID. Is there
> any difference between the primary key setup on these tables vs the
> ones which work?
>
> Nyall
>
>
>
>
> > Have anyone seen this behaviour before ?
> >
> > Cheers
> > Michaël
> >
> > Le lun. 19 nov. 2018 à 00:12, Nyall Dawson  a
> écrit :
> >>
> >> On Sat, 17 Nov 2018 at 02:01, kimaidou  wrote:
> >> >
> >> > Hi all,
> >> >
> >> > I am trying to connect to a MSSQL server from a QGIS installed in a
> Linux Debian Jessie computer.
> >> > I have checked that the credentials are ok with the mssql-client from
> Microsoft:
> >> >
> >> > mssql-cli -S myserver -U carto -P *** -d MyBase
> >> >
> >> > I installed the following packages from debian and Microsoft repos :
> >> >
> >> > curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add
> -
> >> > curl https://packages.microsoft.com/config/debian/8/prod.list  >
> /etc/apt/sources.list.d/mssql-release.list
> >> > apt-get update
> >> > ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools
> msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc
> >> >
> >> > When I open QGIS and try to set up a connection, I use not DSN, and I
> put my server "myserver" as the host. I add the user and password.
> >> > Then try to list the databases, but I get this error
> >> >
> >> > [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found
> >>
> >> This is all super-fragile. (Just another symptom of SQL Server's
> >> inferiority IMO).
> >>
> >> Have a look at
> https://github.com/qgis/QGIS/blob/master/.ci/travis/linux/docker-build-test.sh#L128
> >> for how the Travis testing environment sets up a connection, there may
> >> be some clues there.
> >>
> >> Nyall
> >>
> >> >
> >> > I tested with
> >> >
> >> > root@carto:~# odbcinst -j
> >> > unixODBC 2.3.1
> >> > DRIVERS: /etc/odbcinst.ini
> >> > SYSTEM DATA SOURCES: /etc/odbc.ini
> >> > FILE DATA SOURCES..: /etc/ODBCDataSources
> >> > USER DATA SOURCES..: /root/.odbc.ini
> >> > SQLULEN Size...: 8
> >> > SQLLEN Size: 8
> >> > SQLSETPOSIROW Size.: 8
> >> >
> >> > So I checked /etc/odbcinst.ini which seems ok
> >> >
> >> > root@carto:~# cat /etc/odbcinst.ini
> >> > [ODBC Driver 17 for SQL Server]
> >> > Description=Microsoft ODBC Driver 17 for SQL Server
> >> > Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
> >> > UsageCount=1
> >> >
> >> > [ODBC Driver 13 for SQL Server]
> >> > Description=Microsoft ODBC Driver 13 for SQL Server
> >> > Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
> >> > UsageCount=1
> >> >
> >> > Should I install more packages ?  Any help appreciated.
> >> >
> >> > Regards,
> >> > Michaël
> >> >
> >> > ___
> >> > 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] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian

2018-12-05 Thread kimaidou
Thanks for your answers. I managed to connect with QGIS MSSQL native
provider under my Debian box with the following steps
https://gist.github.com/mdouchin/64f7733a3c4ecfe441f65d5529351a30

I have a weird behaviour. For some layers, QGIS Desktop cannot display the
features attributes : the attribute table is empty, and the identify tool
returns no feature. BUT I can see the points in my map, so QGIS can query
the geography field from the database. For some other layers, wich seems
identical (same structure for example), I can see the attributes (full
attribute table and identify OK)

Have anyone seen this behaviour before ?

Cheers
Michaël

Le lun. 19 nov. 2018 à 00:12, Nyall Dawson  a
écrit :

> On Sat, 17 Nov 2018 at 02:01, kimaidou  wrote:
> >
> > Hi all,
> >
> > I am trying to connect to a MSSQL server from a QGIS installed in a
> Linux Debian Jessie computer.
> > I have checked that the credentials are ok with the mssql-client from
> Microsoft:
> >
> > mssql-cli -S myserver -U carto -P *** -d MyBase
> >
> > I installed the following packages from debian and Microsoft repos :
> >
> > curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
> > curl https://packages.microsoft.com/config/debian/8/prod.list  >
> /etc/apt/sources.list.d/mssql-release.list
> > apt-get update
> > ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools
> msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc
> >
> > When I open QGIS and try to set up a connection, I use not DSN, and I
> put my server "myserver" as the host. I add the user and password.
> > Then try to list the databases, but I get this error
> >
> > [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found
>
> This is all super-fragile. (Just another symptom of SQL Server's
> inferiority IMO).
>
> Have a look at
> https://github.com/qgis/QGIS/blob/master/.ci/travis/linux/docker-build-test.sh#L128
> for how the Travis testing environment sets up a connection, there may
> be some clues there.
>
> Nyall
>
> >
> > I tested with
> >
> > root@carto:~# odbcinst -j
> > unixODBC 2.3.1
> > DRIVERS: /etc/odbcinst.ini
> > SYSTEM DATA SOURCES: /etc/odbc.ini
> > FILE DATA SOURCES..: /etc/ODBCDataSources
> > USER DATA SOURCES..: /root/.odbc.ini
> > SQLULEN Size...: 8
> > SQLLEN Size: 8
> > SQLSETPOSIROW Size.: 8
> >
> > So I checked /etc/odbcinst.ini which seems ok
> >
> > root@carto:~# cat /etc/odbcinst.ini
> > [ODBC Driver 17 for SQL Server]
> > Description=Microsoft ODBC Driver 17 for SQL Server
> > Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
> > UsageCount=1
> >
> > [ODBC Driver 13 for SQL Server]
> > Description=Microsoft ODBC Driver 13 for SQL Server
> > Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
> > UsageCount=1
> >
> > Should I install more packages ?  Any help appreciated.
> >
> > Regards,
> > Michaël
> >
> > ___
> > 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] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian

2018-11-16 Thread kimaidou
Ok, I have progressed a little bit.
You have to rename the section in the odbcinst.ini file. QGIS and ogr2ogr
expects the section [SQL Server] and not [ODBC Driver 17 for SQL Server] as
written by Microsoft package.

Then I can use ogr2ogr to connect to my database and convert some table
with this:
ogr2ogr -f "ESRI Shapefile" "/tmp/Carto.vPole"
"MSSQL:server=myserver;database=MyBase;uid=carto;pwd=***;" -overwrite
-sql "SELECT id, position FROM Carto.vPole"

Now I need to understand the SQL Server syntax, and understand why I have
hieroglyphs in my text fields (encoding I presume...)





Le ven. 16 nov. 2018 à 17:00, kimaidou  a écrit :

> Hi all,
>
> I am trying to connect to a MSSQL server from a QGIS installed in a Linux
> Debian Jessie computer.
> I have checked that the credentials are ok with the mssql-client from
> Microsoft:
>
> mssql-cli -S myserver -U carto -P *** -d MyBase
>
> I installed the following packages from debian and Microsoft repos :
>
> curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
> curl https://packages.microsoft.com/config/debian/8/prod.list  >
> /etc/apt/sources.list.d/mssql-release.list
> apt-get update
> ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools
> msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc
>
> When I open QGIS and try to set up a connection, I use not DSN, and I put
> my server "myserver" as the host. I add the user and password.
> Then try to list the databases, but I get this error
>
> [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found
>
> I tested with
>
> root@carto:~# odbcinst -j
> unixODBC 2.3.1
> DRIVERS: /etc/odbcinst.ini
> SYSTEM DATA SOURCES: /etc/odbc.ini
> FILE DATA SOURCES..: /etc/ODBCDataSources
> USER DATA SOURCES..: /root/.odbc.ini
> SQLULEN Size...: 8
> SQLLEN Size: 8
> SQLSETPOSIROW Size.: 8
>
> So I checked /etc/odbcinst.ini which seems ok
>
> root@carto:~# cat /etc/odbcinst.ini
> [ODBC Driver 17 for SQL Server]
> Description=Microsoft ODBC Driver 17 for SQL Server
> Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
> UsageCount=1
>
> [ODBC Driver 13 for SQL Server]
> Description=Microsoft ODBC Driver 13 for SQL Server
> Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
> UsageCount=1
>
> Should I install more packages ?  Any help appreciated.
>
> Regards,
> Michaël
>
>
___
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] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian

2018-11-16 Thread kimaidou
Hi all,

I am trying to connect to a MSSQL server from a QGIS installed in a Linux
Debian Jessie computer.
I have checked that the credentials are ok with the mssql-client from
Microsoft:

mssql-cli -S myserver -U carto -P *** -d MyBase

I installed the following packages from debian and Microsoft repos :

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/8/prod.list  >
/etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools
msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc

When I open QGIS and try to set up a connection, I use not DSN, and I put
my server "myserver" as the host. I add the user and password.
Then try to list the databases, but I get this error

[unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found

I tested with

root@carto:~# odbcinst -j
unixODBC 2.3.1
DRIVERS: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size...: 8
SQLLEN Size: 8
SQLSETPOSIROW Size.: 8

So I checked /etc/odbcinst.ini which seems ok

root@carto:~# cat /etc/odbcinst.ini
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
UsageCount=1

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
UsageCount=1

Should I install more packages ?  Any help appreciated.

Regards,
Michaël
___
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 composer export - issue with projection, scale & scalebar ?

2018-11-16 Thread kimaidou
Le ven. 16 nov. 2018 à 02:21, Nyall Dawson  a
écrit :

>
>
> My 2c: I don't actually believe there's an issue here. QGIS scale bars
> *ALWAYS* use ellipsoidal distances, regardless of the projection (and
> have for longer than I've been involved in the project, so since some
> version earlier than 1.7).
> This means you'll see differences between a 1km size grid created in a
> some local projection vs the scale bar's size, because the grid size
> is a cartesian size measurement based on a projected CRS, vs distances
> measured on the ellipsoid. The differences will be more extreme for
> CRSes which are bad for distance/area preservation, especially 3857.
>

Yes, this is the conclusion I got after some more thinking, as described in
my last comment in the hub issue.
I have one last question about the *numerical* scale "bar", I guess it is
calculated always in meter, and use the spheroid too ?



>
> I think the solution here is really just education -- we need to make
> sure users know that 3857 is unsuitable for anything but web maps, and
> that it's THEIR responsibility to make an informed decision what the
> correct CRS is for their project.**
>

I agree with your


> Nyall
>
> ** in reality, we'll never win this battle, and there'll always be
> uninformed, untrained users pushing out junk results out based on 3857
> calculations.
>

We could probably add some warnings in QGIS composer when using meter | map
units such as "Be aware the scale bar length will be calculated "based on
the projection ellipsoid" | "based on the projection planimetric coordinate
system" )
___
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 composer export - issue with projection, scale & scalebar ?

2018-11-14 Thread kimaidou
Hi all,

Sorry for my previous message, which (I just realize) can appear rude if
you have not received the first one. In fact I sent a "normal" first
message with my Gmail account, and attached some files. Wich obviously was
not allowed by the mailing list. So I decided to create a issue in the QGIS
hub instead. I should have done that first.
Let continue the talk in the hub.

Sorry for this.
Michaël

Le mer. 14 nov. 2018 à 12:03, kimaidou  a écrit :

> I created this issue
> https://issues.qgis.org/issues/20489
>
> Le mer. 14 nov. 2018 à 11:56, kimaidou  a écrit :
>
>> Hi !
>>
>> I am facing what seems to be an issue, or probably something well known
>> by anyone but me...
>>
>> I have created 2 very simple QGIS projects (attached with data)
>>
>> * 1 vector polygon grid 1km X 1km (GeoJSON), created with the Vector
>> processing tool.
>> * 1 OpenStreetMap TMS background layer (EPSG:3857)
>> * 1 A4 composer with a map taking full size, and a scale bar
>> * 1 project in EPSG:3857 & its brother in EPSG:2154 (French proj)
>>
>> Issues noted:
>>
>> * In the composer, the scale bar does not fit with the 1km grid, in both
>> projects.
>> * After defining the same scale (1:10 000) in the composers, the view are
>> really different in the 2 projects (see attached PDF)
>>
>> I know projections are biased representations of the reality, but as a
>> user perspective, this 2 behaviours really seem like issues. Every time a
>> user prints a map and take the A4 paper, he is condident he will be able to
>> use his ruler to measure things and convert to real distances according to
>> the scale. Or report N times the scale bar segments to get distances.
>>
>> I am like someone who just discovers the Earth is not flat...
>>
>> NB: I have tested this behaviour only in 2.18.
>>
>
___
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 composer export - issue with projection, scale & scalebar ?

2018-11-14 Thread kimaidou
I created this issue
https://issues.qgis.org/issues/20489

Le mer. 14 nov. 2018 à 11:56, kimaidou  a écrit :

> Hi !
>
> I am facing what seems to be an issue, or probably something well known by
> anyone but me...
>
> I have created 2 very simple QGIS projects (attached with data)
>
> * 1 vector polygon grid 1km X 1km (GeoJSON), created with the Vector
> processing tool.
> * 1 OpenStreetMap TMS background layer (EPSG:3857)
> * 1 A4 composer with a map taking full size, and a scale bar
> * 1 project in EPSG:3857 & its brother in EPSG:2154 (French proj)
>
> Issues noted:
>
> * In the composer, the scale bar does not fit with the 1km grid, in both
> projects.
> * After defining the same scale (1:10 000) in the composers, the view are
> really different in the 2 projects (see attached PDF)
>
> I know projections are biased representations of the reality, but as a
> user perspective, this 2 behaviours really seem like issues. Every time a
> user prints a map and take the A4 paper, he is condident he will be able to
> use his ruler to measure things and convert to real distances according to
> the scale. Or report N times the scale bar segments to get distances.
>
> I am like someone who just discovers the Earth is not flat...
>
> NB: I have tested this behaviour only in 2.18.
>
___
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] The future of the F5 shortcut...

2018-07-12 Thread kimaidou
There is another issue relative to F5 button. In database manager, it is
supposed to run the Query, but I have never seen it work, neither on Ubuntu
or Windows. Has anyone been confonted to the same issue ?

Michaël

2018-07-11 11:18 GMT+02:00 Borys Jurgiel :

> Dnia środa, 11 lipca 2018 01:44:48 CEST Matthias Kuhn pisze:
>
> > If you feel like doing something fancy, open up a MessageBox at the
> > first launch of the plugin and inform devs about the shortcut and maybe
> > even offer a button to quickly toggle for your friends and you ;) Or if
> > you don't like message boxes, put the same onto the config page,
> > everybody goes there once in a while ;)
>
> Everyone wins! Great idea, thanks!
>
> B.
>
>
>
>
> ___
> 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] pyqgis - layer.saveDefaultStyle() for PostGIS layers

2018-05-09 Thread kimaidou
Great news, thanks for the report ;)

2018-05-04 14:30 GMT+02:00 Etienne Trimaille <etienne.trimai...@gmail.com>:

> For your information, with the big hint from Matthias in the last email,
> it's now fixed in 2.18.20. I checked in QGIS 3, it was working fine already.
>
> 2017-09-26 9:07 GMT-04:00 Matthias Kuhn <matth...@opengis.ch>:
>
>> For 2.18 it should be ok to make it /InOut/ (there was no return value
>> before, so it shouldn't break anything).
>> For 3.0 this can be made /Out/ as proposed.
>>
>> Matthias
>>
>> On 09/26/2017 12:06 PM, Luigi Pirelli wrote:
>> > there is a SIP specification error
>> > https://github.com/qgis/QGIS/blob/release-2_18/python/core/q
>> gsvectorlayer.sip#L492
>> > should be  QString  /out/ );
>> >
>> > that's the reason that error is not returned in the python side => I
>> > suppose SIP would change C++ api in:
>> > msg = saveStyleToDatabase( name, description, useAsDefault,
>> uiFileContent)
>> > Luigi Pirelli
>> >
>> > 
>> **
>> > * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
>> > * LinkedIn: https://www.linkedin.com/in/luigipirelli
>> > * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
>> > * GitHub: https://github.com/luipir
>> > * Mastering QGIS 2nd Edition:
>> > * https://www.packtpub.com/big-data-and-business-intelligence/
>> mastering-qgis-second-edition
>> > 
>> **
>> >
>> >
>> > On 25 September 2017 at 16:21, kimaidou <kimai...@gmail.com> wrote:
>> >> I have tried another method
>> >>
>> >> * first add default style into DB via UI -> it works
>> >>
>> >> * the use console to create a new, not default, style
>> >> msg = ''
>> >> layer.saveStyleToDatabase( "a new style", "some description", False,
>> None,
>> >> msg );
>> >>
>> >> It does not work (not new line created, and msg remains empty. No log
>> in the
>> >> database, which means NO query has been sent (I have change postgresql
>> >> config to log all requests).
>> >>
>> >> But the following method works
>> >> layer.listStylesInDatabase()
>> >>
>> >> And a new line appears in the postgresql log
>> >> 2017-09-25 16:19:18.248 CEST [8984] mdouchin@qgis LOG:  0:
>> duration:
>> >> 0.217 ms  statement: SELECT id,styleName,description FROM layer_styles
>> WHERE
>> >> NOT (f_table_catalog='qgis' AND f_table_schema='sup' AND
>> >> f_table_name='geo_commune' AND f_geometry_column='geom') ORDER BY
>> >> update_time DESC
>> >>
>> >> It seems the method saveStyleToDatabase returns with no error, which
>> can be
>> >> caused by 2 reasons
>> >> https://qgis.org/api/2.18/qgsvectorlayer_8cpp_source.html#l04347
>> >>
>> >>  4369   this->exportNamedStyle( qmlDocument, msgError );
>> >>  4370   if ( !msgError.isNull() )
>> >>  4371   {
>> >>  4372 return;
>> >>  4373   }
>> >>  4374   qmlStyle = qmlDocument.toString();
>> >>  4375
>> >>  4376   this->exportSldStyle( sldDocument, msgError );
>> >>  4377   if ( !msgError.isNull() )
>> >>  4378   {
>> >>  4379 return;
>> >>  4380   }
>> >>
>> >> /me investigates
>> >>
>> >> 2017-09-25 15:50 GMT+02:00 Jorge Gustavo Pereira Bastos Rocha
>> >> <j...@di.uminho.pt>:
>> >>>
>> >>> Hi,
>> >>>
>> >>> It already happened to me. The first user to save a style became the
>> owner
>> >>> of the table. No other users were able to write on the layer_style
>> table,
>> >>> because there were DEFAULT PRIVILEGES defined.
>> >>>
>> >>> Can you check the postgrsql log to see if there is any problem related
>> >>> with permissions?
>> >>>
>> >>> Regards,
>> >>>
>> >>> Jorge Gustavo
>> >>>
>> >>> 
>> >>> De: QGIS-Developer [qgis-developer-boun...@lists.osgeo.org] em nome
>> de
>> >&

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

2018-03-12 Thread kimaidou
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

Re: [QGIS-Developer] QGIS3 - processing python script. Read features from output layer

2018-02-15 Thread kimaidou
Thanks for your explanation !
I also think it makes sense to share source layers in some cache in the
future.

2018-02-16 7:36 GMT+01:00 Nyall Dawson <nyall.daw...@gmail.com>:

> On 16 February 2018 at 17:29, kimaidou <kimai...@gmail.com> wrote:
> > Thanks Nyall,
> >
> > Our posts crossed !
> >
> > Ok for the shortcut and the getMapLayer method.
> >
> > One question : in my alg, if I use QgsProcessingParameterFeatureSource
> > instead of QgsProcessingParameterVectorLayer for my input, can I still
> use
> > mapLayerFromString and the getFeatures, or is there a
> > featureSourceFromString which allows me to loop through the features ?
>
> There's no method like that. At the moment all vector outputs from
> processing algorithms are full vector layers (either disk-based or
> memory layers). That's because currently only vector layers and vector
> data providers are QgsFeatureSources. It's possible (likely?) that in
> future we'll see this change at may need to add that method. [1]
>
> Nyall
>
> [1] E.g. I'd like to see QgsFeatureStore become a QgsFeatureSource,
> and act as a simple dump for features without the complexity of using
> a memory layer. I think there's a lot of value in QgsVectorLayerCache
> also becoming a QgsFeatureSource... I think some processing algorithms
> could greatly benefit from using a QgsVectorLayerCache, when they are
> iterating multiple times of a source layer
>
>
>
>
>
>
>
> > Michaël
> >
> > 2018-02-16 7:22 GMT+01:00 Nyall Dawson <nyall.daw...@gmail.com>:
> >>
> >> On 16 February 2018 at 04:36, kimaidou <kimai...@gmail.com> wrote:
> >> > Hi all,
> >> >
> >> > I have a simple processing python alg which
> >> > * generates a buffer with qgis:buffer
> >> > * use qgis:fieldcalculator to add an buf_area field -> the output
> vector
> >> > of
> >> > my alg is this buffer+new field.
> >> >
> >> > I would like to parse the features of the output vector in order to
> >> > gather
> >> > some information and put it in a new string output. I have not been
> able
> >> > to
> >> > get the layer object to perform a getFeatures on it.
> >> >
> >> > See the code
> >> > http://paste.debian.net/1010463/
> >> >
> >> > In line 32, my blayer is None
> >> > I think I am not using the good way to get the output vector layer
> >> > features?
> >> > I tried to use the same way as for reading an input layer, but
> oviously
> >> > it
> >> > is different.
> >>
> >> blayer = QgsProcessingUtils.mapLayerFromString( area_result[ 'OUTPUT'
> >> ]), context )
> >>
> >> I'm thinking of adding a shortcut for this to the context, e.g.:
> >>
> >> blayer = context.getMapLayer( area_result['OUTPUT'] )
> >>
> >> What do you think?
> >>
> >> 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

Re: [QGIS-Developer] QGIS3 - processing python script. Read features from output layer

2018-02-15 Thread kimaidou
Thanks Nyall,

Our posts crossed !

Ok for the shortcut and the getMapLayer method.

One question : in my alg, if I use QgsProcessingParameterFeatureSource
instead of QgsProcessingParameterVectorLayer for my input, can I still use
mapLayerFromString and the getFeatures, or is there a
featureSourceFromString which allows me to loop through the features ?

Michaël

2018-02-16 7:22 GMT+01:00 Nyall Dawson <nyall.daw...@gmail.com>:

> On 16 February 2018 at 04:36, kimaidou <kimai...@gmail.com> wrote:
> > Hi all,
> >
> > I have a simple processing python alg which
> > * generates a buffer with qgis:buffer
> > * use qgis:fieldcalculator to add an buf_area field -> the output vector
> of
> > my alg is this buffer+new field.
> >
> > I would like to parse the features of the output vector in order to
> gather
> > some information and put it in a new string output. I have not been able
> to
> > get the layer object to perform a getFeatures on it.
> >
> > See the code
> > http://paste.debian.net/1010463/
> >
> > In line 32, my blayer is None
> > I think I am not using the good way to get the output vector layer
> features?
> > I tried to use the same way as for reading an input layer, but oviously
> it
> > is different.
>
> blayer = QgsProcessingUtils.mapLayerFromString( area_result[ 'OUTPUT'
> ]), context )
>
> I'm thinking of adding a shortcut for this to the context, e.g.:
>
> blayer = context.getMapLayer( area_result['OUTPUT'] )
>
> What do you think?
>
> 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

Re: [QGIS-Developer] QGIS3 - processing python script. Read features from output layer

2018-02-15 Thread kimaidou
Found id !
I have to use mapLayerFromString :

blayer = QgsProcessingUtils.mapLayerFromString(area_result['OUTPUT'],
context)

\o/

2018-02-16 7:11 GMT+01:00 kimaidou <kimai...@gmail.com>:

> Hi Salvatore,
>
> I already tried to use
>
> blayer = area_result['OUTPUT']
> for feat in blayer.getFeatures():
> 
>
> with no success . If I do so I get
>
> AttributeError: 'str' object has no attribute 'getFeatures'
>
> There must be a way to transforme this string representing the layer as a
> processing layer object
> I use this code inside the processAlgorithm method of my
> QgsProcessingAlgorithm class.
>
>
> Michaël
>
> 2018-02-15 22:39 GMT+01:00 Salvatore Larosa <lrssv...@gmail.com>:
>
>> Hi Michaël,
>>
>> On Thu, Feb 15, 2018 at 6:36 PM, kimaidou <kimai...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I have a simple processing python alg which
>>> * generates a buffer with qgis:buffer
>>> * use qgis:fieldcalculator to add an buf_area field -> the output vector
>>> of my alg is this buffer+new field.
>>>
>>> I would like to parse the features of the output vector in order to
>>> gather some information and put it in a new string output. I have not been
>>> able to get the layer object to perform a getFeatures on it.
>>>
>>> See the code
>>> http://paste.debian.net/1010463/
>>>
>>> In line 32, my blayer is None
>>> I think I am not using the good way to get the output vector layer
>>> features? I tried to use the same way as for reading an input layer, but
>>> oviously it is different.
>>>
>>
>> What does happen if you put area_result['OUTPUT'] directly instead of
>> self.parameterAsSource?
>> parameterAsSource() accept a parameter as first argument and area_result
>> should be already un QgsVectorLayer.
>>
>> Where you are trying to execute it from?
>>
>>
>> --
>> Salvatore Larosa
>> linkedIn: http://linkedin.com/in/larosasalvatore
>> twitter: @lrssvt
>> skype: s.larosa
>> IRC: lrssvt on freenode
>>
>
>
___
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] QGIS3 - processing python script. Read features from output layer

2018-02-15 Thread kimaidou
Hi Salvatore,

I already tried to use

blayer = area_result['OUTPUT']
for feat in blayer.getFeatures():


with no success . If I do so I get

AttributeError: 'str' object has no attribute 'getFeatures'

There must be a way to transforme this string representing the layer as a
processing layer object
I use this code inside the processAlgorithm method of my
QgsProcessingAlgorithm class.


Michaël

2018-02-15 22:39 GMT+01:00 Salvatore Larosa <lrssv...@gmail.com>:

> Hi Michaël,
>
> On Thu, Feb 15, 2018 at 6:36 PM, kimaidou <kimai...@gmail.com> wrote:
>
>> Hi all,
>>
>> I have a simple processing python alg which
>> * generates a buffer with qgis:buffer
>> * use qgis:fieldcalculator to add an buf_area field -> the output vector
>> of my alg is this buffer+new field.
>>
>> I would like to parse the features of the output vector in order to
>> gather some information and put it in a new string output. I have not been
>> able to get the layer object to perform a getFeatures on it.
>>
>> See the code
>> http://paste.debian.net/1010463/
>>
>> In line 32, my blayer is None
>> I think I am not using the good way to get the output vector layer
>> features? I tried to use the same way as for reading an input layer, but
>> oviously it is different.
>>
>
> What does happen if you put area_result['OUTPUT'] directly instead of
> self.parameterAsSource?
> parameterAsSource() accept a parameter as first argument and area_result
> should be already un QgsVectorLayer.
>
> Where you are trying to execute it from?
>
>
> --
> Salvatore Larosa
> linkedIn: http://linkedin.com/in/larosasalvatore
> twitter: @lrssvt
> skype: s.larosa
> IRC: lrssvt on freenode
>
___
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] QGIS3 - processing python script. Read features from output layer

2018-02-15 Thread kimaidou
Hi Salvatore,

I already tried to use

blayer = area_result['OUTPUT']
for feat in blayer.getFeatures():


with no success . If I do so I get

AttributeError: 'str' object has no attribute 'getFeatures'

There must be a way to transforme this string representing the layer as a
processing layer object
I use this code inside the processAlgorithm method of my
QgsProcessingAlgorithm class.


Michaël

2018-02-15 22:39 GMT+01:00 Salvatore Larosa <lrssv...@gmail.com>:

> Hi Michaël,
>
> On Thu, Feb 15, 2018 at 6:36 PM, kimaidou <kimai...@gmail.com> wrote:
>
>> Hi all,
>>
>> I have a simple processing python alg which
>> * generates a buffer with qgis:buffer
>> * use qgis:fieldcalculator to add an buf_area field -> the output vector
>> of my alg is this buffer+new field.
>>
>> I would like to parse the features of the output vector in order to
>> gather some information and put it in a new string output. I have not been
>> able to get the layer object to perform a getFeatures on it.
>>
>> See the code
>> http://paste.debian.net/1010463/
>>
>> In line 32, my blayer is None
>> I think I am not using the good way to get the output vector layer
>> features? I tried to use the same way as for reading an input layer, but
>> oviously it is different.
>>
>
> What does happen if you put area_result['OUTPUT'] directly instead of
> self.parameterAsSource?
> parameterAsSource() accept a parameter as first argument and area_result
> should be already un QgsVectorLayer.
>
> Where you are trying to execute it from?
>
>
> --
> Salvatore Larosa
> linkedIn: http://linkedin.com/in/larosasalvatore
> twitter: @lrssvt
> skype: s.larosa
> IRC: lrssvt on freenode
>
___
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 - processing python script. Read features from output layer

2018-02-15 Thread kimaidou
Hi all,

I have a simple processing python alg which
* generates a buffer with qgis:buffer
* use qgis:fieldcalculator to add an buf_area field -> the output vector of
my alg is this buffer+new field.

I would like to parse the features of the output vector in order to gather
some information and put it in a new string output. I have not been able to
get the layer object to perform a getFeatures on it.

See the code
http://paste.debian.net/1010463/

In line 32, my blayer is None
I think I am not using the good way to get the output vector layer
features? I tried to use the same way as for reading an input layer, but
oviously it is different.

Regards
Michaël
___
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] QGIS3 Processing Modeler - some bugs encountered

2018-01-23 Thread kimaidou
Thanks Nyall !

2018-01-23 1:57 GMT+01:00 Nyall Dawson <nyall.daw...@gmail.com>:

> On 19 January 2018 at 18:26, kimaidou <kimai...@gmail.com> wrote:
> > Dear devs,
> >
> > I am looking at Processing for QGIS3, and would like to share some bugs I
> > discovered while playing with models. I have not found related issues in
> the
> > hub. I will add them after some feedback. Please point me the the issues
> if
> > they do exists in Redmine
> >
> > * Number input is not proposed in algorithms. For example, after adding
> an
> > input of type Number, you cannot anymore use this input as a value for
> the
> > buffer size in the QGIS fixed buffer alg : no combobox is shown to the
> user,
> > just a standard text input.
>
> The interface here isn't fantastic - but you need to hit the '...'
> button to the right of the numeric parameter and then you'll see the
> input exposed as a variable for use.
>
> We need https://github.com/qgis/QGIS-Enhancement-Proposals/issues/84
> in order to improve this.
>
> > * Grid alg : the user can choose the extent of one of the vector layers (
> > inputs or results of alg), bug when you run the model, the extent is
> empty
> > and the grid alg failed.
>
> Confirmed - PR with fix is https://github.com/qgis/QGIS/pull/6133
>
> 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] QGIS3 Processing Modeler - some bugs encountered

2018-01-19 Thread kimaidou
Dear devs,

I am looking at Processing for QGIS3, and would like to share some bugs I
discovered while playing with models. I have not found related issues in
the hub. I will add them after some feedback. Please point me the the
issues if they do exists in Redmine

* Number input is not proposed in algorithms. For example, after adding an
input of type Number, you cannot anymore use this input as a value for the
buffer size in the QGIS fixed buffer alg : no combobox is shown to the
user, just a standard text input.

* Grid alg : the user can choose the extent of one of the vector layers (
inputs or results of alg), bug when you run the model, the extent is empty
and the grid alg failed.

Regards,
Michaël
___
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] QGIS3 - Processing : display the HTML outputs

2018-01-11 Thread kimaidou
Thanks Alexander Bruy for the commit !
https://github.com/qgis/QGIS/commit/3f55bba535b69d38993ace466266e2ab63d3839f

Michaël

2018-01-11 12:47 GMT+01:00 G. Allegri :

> The same for me!
>
> Giovanni
>
> 2018-01-11 10:04 GMT+01:00 matteo :
>
>> > Il 11/01/2018 09:47, Victor Olaya ha scritto:
>> >> No sure why it was decided to have it like that...but I also think
>> >> that keepping it open by default is a better option.
>>
>> +1 this is the first option I always change in all the configpaths
>>
>> Thanks!
>>
>> Matteo
>> ___
>> 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] Project migration 2.18 > 3.0 - QGIS Server GetMap output very big images compared to a "from scratch" project

2018-01-11 Thread kimaidou
Hi,

Bug fixed by René-Luc : https://github.com/qgis/QGIS/pull/6038/files

Cheers,
Michaël

2018-01-11 12:17 GMT+01:00 kimaidou <kimai...@gmail.com>:

> Hi,
>
> I have seen a difference :
> * in the migrated file, the property  type="int">90
> is kept inside the QGS.
> * in a QGIS 3 project from scratch, this flag is not written if the
> default value is used : menu Project / QGIS Server / WMS Capabilities /
> Qualite for JPEG images. The flag is written only if the value is not the
> default one, for example if value = 80
>
> This means there is a regression in QGIS 3 Server, which uses this
> parameter for PNG and not only for JPEG !
>
> I will search deeper in the code
>
> regards
> Michaël
>
>
>
>
>
>
> 2018-01-11 12:08 GMT+01:00 kimaidou <kimai...@gmail.com>:
>
>> Hi,
>>
>> I am testing QGIS 3 Server.
>> When I create a project from scratch in QGIS 3, and use it to publish WMS
>> service, the getMap requests return correct PNG images :
>> ~ 100 ko for a size of ~ 1500 X 800 pixels
>>
>> When I open a project made with 2.18 and save it with QGIS 3, and publish
>> it, I get huge PNG files :
>> ~ 4,5 Mo (!) for the same layer, configuration and getMap request.
>>
>> I am wondering what is happening. Here are the files and projects :
>> https://framadrop.org/r/JpTgir91jk#ZHFXi6ejrGQ/1NA2TbV4rD/
>> HEfeqqbzA5XaVjrK+aqQ=
>>
>> I have not been able to see any major difference explaining this
>> behaviour.
>>
>> Thanks in advance
>>
>> Michaël
>>
>
>
___
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] Project migration 2.18 > 3.0 - QGIS Server GetMap output very big images compared to a "from scratch" project

2018-01-11 Thread kimaidou
Hi,

I have seen a difference :
* in the migrated file, the property 90 is kept inside the QGS.
* in a QGIS 3 project from scratch, this flag is not written if the default
value is used : menu Project / QGIS Server / WMS Capabilities / Qualite for
JPEG images. The flag is written only if the value is not the default one,
for example if value = 80

This means there is a regression in QGIS 3 Server, which uses this
parameter for PNG and not only for JPEG !

I will search deeper in the code

regards
Michaël






2018-01-11 12:08 GMT+01:00 kimaidou <kimai...@gmail.com>:

> Hi,
>
> I am testing QGIS 3 Server.
> When I create a project from scratch in QGIS 3, and use it to publish WMS
> service, the getMap requests return correct PNG images :
> ~ 100 ko for a size of ~ 1500 X 800 pixels
>
> When I open a project made with 2.18 and save it with QGIS 3, and publish
> it, I get huge PNG files :
> ~ 4,5 Mo (!) for the same layer, configuration and getMap request.
>
> I am wondering what is happening. Here are the files and projects :
> https://framadrop.org/r/JpTgir91jk#ZHFXi6ejrGQ/
> 1NA2TbV4rD/HEfeqqbzA5XaVjrK+aqQ=
>
> I have not been able to see any major difference explaining this
> behaviour.
>
> Thanks in advance
>
> Michaël
>
___
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] QGIS3 - Processing : display the HTML outputs

2018-01-10 Thread kimaidou
Ok, I have found the option in QGIS Options dialog / Tab Processing / Check
"Keep dialog open after running an algorithm". I think this option should
be checked as a default value. Any opinion on this ?

I trie the Result panel : for the "Raster layer statistics" alg. I can see
the run listed in the Processing result viewer. I think we should propose a
way to display the result directly inside QGIS for the text, html and other
"readable" output format.

Michaël

2018-01-11 8:29 GMT+01:00 kimaidou <kimai...@gmail.com>:

> Hi Alexander,
>
> It helps a lot thanks. It solves the "display outputs" issue.
>
> Another issue I notice : IMHO I think the "auto-close after run" behaviour
> is a bit cumbersome for the user. It means the user need to reopen the alg
> dialog each time after a successfull run. Imagine you would like to test
> different values for inputs. Instead of run / go back to the form to change
> an input / run, you need to run / reopen the alg / re-enter all inputs (you
> have lost the previous values) / run / reopen ...
>
> We should have an option to let the user decide "Keep the alg dialog open"
> which make it possible to run the same alg more than once. Perhaps there is
> an hidden option or setting to do so ?
>
> Regards
> Michaël
>
> 2018-01-11 7:10 GMT+01:00 Alexander Bruy <alexander.b...@gmail.com>:
>
>> Hi Michaël,
>>
>> HTML outputs does not open automatically. You need to open Results panel
>> to see them. Double-clicking on the result item will open it in the
>> default browser.
>>
>> Hope this helps
>>
>> 2018-01-10 21:37 GMT+02:00 kimaidou <kimai...@gmail.com>:
>> > Hi all,
>> >
>> > I am trying QGIS 3 these days. In the processing toolbox, when I run
>> some
>> > algs with an HTML output, the processing dialog is closed just after the
>> > results are produced, and not displayed.
>> >
>> > You can test this behaviour with the Raster statistics algs.
>> >
>> > What is the python way to tell QGIS to display the HTML results ? I
>> tried
>> > this
>> > https://github.com/ghtmtt/DataPlotly/pull/65/files#diff-c208
>> 9b16fcc7b309bc3bf9e5a9f6e114R110
>> >
>> > Should I add an HTML output ?
>> >
>> > Regards
>> > Michaël
>> >
>> > ___
>> > 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
>>
>>
>>
>> --
>> 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

Re: [QGIS-Developer] QGIS3 - Processing : display the HTML outputs

2018-01-10 Thread kimaidou
Hi Alexander,

It helps a lot thanks. It solves the "display outputs" issue.

Another issue I notice : IMHO I think the "auto-close after run" behaviour
is a bit cumbersome for the user. It means the user need to reopen the alg
dialog each time after a successfull run. Imagine you would like to test
different values for inputs. Instead of run / go back to the form to change
an input / run, you need to run / reopen the alg / re-enter all inputs (you
have lost the previous values) / run / reopen ...

We should have an option to let the user decide "Keep the alg dialog open"
which make it possible to run the same alg more than once. Perhaps there is
an hidden option or setting to do so ?

Regards
Michaël

2018-01-11 7:10 GMT+01:00 Alexander Bruy <alexander.b...@gmail.com>:

> Hi Michaël,
>
> HTML outputs does not open automatically. You need to open Results panel
> to see them. Double-clicking on the result item will open it in the
> default browser.
>
> Hope this helps
>
> 2018-01-10 21:37 GMT+02:00 kimaidou <kimai...@gmail.com>:
> > Hi all,
> >
> > I am trying QGIS 3 these days. In the processing toolbox, when I run some
> > algs with an HTML output, the processing dialog is closed just after the
> > results are produced, and not displayed.
> >
> > You can test this behaviour with the Raster statistics algs.
> >
> > What is the python way to tell QGIS to display the HTML results ? I tried
> > this
> > https://github.com/ghtmtt/DataPlotly/pull/65/files#diff-
> c2089b16fcc7b309bc3bf9e5a9f6e114R110
> >
> > Should I add an HTML output ?
> >
> > Regards
> > Michaël
> >
> > ___
> > 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
>
>
>
> --
> 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

[QGIS-Developer] QGIS3 - Processing : display the HTML outputs

2018-01-10 Thread kimaidou
Hi all,

I am trying QGIS 3 these days. In the processing toolbox, when I run some
algs with an HTML output, the processing dialog is closed just after the
results are produced, and not displayed.

You can test this behaviour with the Raster statistics algs.

What is the python way to tell QGIS to display the HTML results ? I tried
this
https://github.com/ghtmtt/DataPlotly/pull/65/files#diff-c2089b16fcc7b309bc3bf9e5a9f6e114R110

Should I add an HTML output ?

Regards
Michaël
___
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] Heatmap renderer - speed up possible ?

2018-01-02 Thread kimaidou
Hi,

I have juste seen this blog post
https://bl.ocks.org/rpgove/210f679b1087b517ce654b717e8247ac

I know nothing about this kind of algs, nore about the QGIS rendering
internals, but I thought it could be a possible way to speed up the heatmap
renderer ?

Just passing the info ;)

Regards
Michaël
___
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] Removing QgsProject.instance() from Python bindings?

2017-12-29 Thread kimaidou
Hi,

Ok for this change, but please take the Server into account, where iface is
not usable, but serverIface instead. Please add the activeProject method to
the server interface too, as server plugins shall use the project

Regards
Michaël

2017-12-23 11:23 GMT+01:00 Matthias Kuhn :

> +1
>
> for the advantage, that when we go MultiProject we can just add a
> activeProjectChanged signal
>
> Matthias
>
>
> On 12/23/2017 05:40 AM, Nyall Dawson wrote:
> > Hi all,
> >
> > Just wondering... before 3.0 launch, should we remove
> > QgsProject.instance() from the Python bindings, in favour of something
> > like iface.activeProject()?
> >
> > Sometime in the future (4.0?) we'll end up killing
> > QgsProject.instance(), but in the meantime is it a good move to push
> > people away from relying on this method?
> >
> > I'd say yes, given that the 2.x -> 3.0 api break is so huge anyway and
> > will generally result in substantial plugin rewriting (vs just
> > modifying a few methods), maybe we're better off to get PyQGIS
> > developers to deal with this now and factor it into their new
> > designs?*
> >
> > Nyall
> >
> > * based on the belief that 3.x -> 4.0 will be a gentler transition!!
> > ___
> > 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] Fwd: My PostgreSQL/PostGIS function to create all missing spatial indexes

2017-12-03 Thread kimaidou
Hi Jorge

This feature would be good to have in the DB manager, but I do not think we
should create a function in any database without warning the user.

Inside QGIS, we should be less intrusive and only run the SELECT SQL inside
the function to get all missing indexes, show them in a QGIS table view
with checkboxes, and a button to create selected indexes.
I could propose a PR for this if I find time (heavy workload this end of
year...)

Regards
Michaël

2017-12-01 17:09 GMT+01:00 Jorge Gustavo Rocha :

> Nice contribution, Michaël! Tested and approved :-)
>
> We might use this query to offer the option "Check missing spatial
> indexes" in DB Manager, with an additional checkbox to "Add missing
> indexes". Initially just for the Postgis provider, but it can be
> implemented for other providers.
>
> What do you think?
>
> Regards,
>
> Jorge Gustavo
>
>
>
___
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] Fwd: My PostgreSQL/PostGIS function to create all missing spatial indexes

2017-12-01 Thread kimaidou
I have improved my function.

Now it returns a table containing the schema, table name and column name.
You need to use it with
SELECT * FROM create_missing_spatial_indexes();

If you would like to only get the informations about missing indexes, there
is a new "simulate" parameter.
SELECT * FROM create_missing_spatial_indexes(True);

URL : https://gist.github.com/mdouchin/cfa0e37058bcf102ed490bc59d762042

Cheers,
Michaël

2017-12-01 12:10 GMT+01:00 Salvatore Larosa <lrssv...@gmail.com>:

> Thank you very much!
>
> --
> Sent from my mobile phone
>
> Il 01 Dic 2017 12:01 PM, "kimaidou" <kimai...@gmail.com> ha scritto:
>
>> Hi users and devs,
>>
>> I just created a very simple function [1] to create all the missing
>> spatial indexes on your table geometry columns.
>>
>> It is the 1st version, has no fancy parameter to choose tables or
>> schemas, nor return anything usefull (only notices).
>>
>> Use it with a simple
>> SELECT create_missing_spatial_indexes();
>>
>> [1] https://gist.github.com/mdouchin/cfa0e37058bcf102ed490bc59d762042
>>
>> Regards,
>> Michael
>>
>>
>> ___
>> 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: My PostgreSQL/PostGIS function to create all missing spatial indexes

2017-12-01 Thread kimaidou
Hi users and devs,

I just created a very simple function [1] to create all the missing spatial
indexes on your table geometry columns.

It is the 1st version, has no fancy parameter to choose tables or schemas,
nor return anything usefull (only notices).

Use it with a simple
SELECT create_missing_spatial_indexes();

[1] https://gist.github.com/mdouchin/cfa0e37058bcf102ed490bc59d762042

Regards,
Michael
___
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] Preview job and slow datasources

2017-11-16 Thread kimaidou
Hi,

I was wondering if these preview jobs are enabled in QGIS Server context,
when requesting a GetMap from any client. I am pretty sure the context of
the preview jobs execution is related to Desktop, but I would like to be
sure.
Any hint on this ?

Regards,
Michaël

2017-11-16 11:15 GMT+01:00 Matthias Kuhn :

> Hi Patrick,
>
> Would be interesting to do this test with previews enabled and disabled.
> Then we'll see if it's actually the previews or some other mechanism that
> is causing this.
>
> IIRC only a composite image is saved in the preview jobs and not each
> layer separately, but that's just what I remember and not evidence based.
>
> You can enable them in the python console with
>
> iface.mapCanvas().setPreviewJobsEnabled(True)
>
> and disable with
>
> iface.mapCanvas().setPreviewJobsEnabled(False)
>
> Thanks for a feedback
>
> Matthias
>
> On 11/16/2017 08:42 AM, Patrick Dunford wrote:
>
> In my current project using Qgis 2.99, turning off the rasters uses 16 GB,
> turning them on uses 52 GB
>
> I do not believe it is independent from the number of layers that are
> being displayed.
>
> Previous versions of the software did not cache every single raster (the
> number of rasters actually being displayed on the canvas at any one time is
> a small fraction of the total number in the project)
> On 16/11/17 20:11, Matthias Kuhn wrote:
>
> Hi Patrick,
>
> This uses some memory (~ canvas width pixels * canvas height pixels * 8
> preview images * 32 bit RGBA), so let's assume 50 MB to 100 MB.
>
> This consumption is independent from the number or type of layers.
>
> Matthias
>
> On 11/16/2017 08:02 AM, Patrick Dunford wrote:
>
> So to put it another way this is the reason why Qgis wants to use a huge
> amount of memory (40 GB) when I have a lot of raster images loaded in the
> background.
>
> On 16/11/17 18:56, Tim Sutton wrote:
>
> Hi
>
> On 16 Nov 2017, at 04:35, Patrick Dunford  wrote:
>
> What is this "preview job" function?
>
>
> Its application logic to prefetch / pre-render offscreen content in
> anticipation of user panning the map.
>
> Regards
>
> Tim
>
>
> ___
> 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
>
>
> —
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Project chair:* QGIS.org
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux
> *IRC:* timlinux on #qgis at freenode.net
>
>
>
>
> ___
> QGIS-Developer mailing listqgis-develo...@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 listqgis-develo...@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 listqgis-develo...@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] pyqgis - layer.saveDefaultStyle() for PostGIS layers

2017-09-25 Thread kimaidou
I have tried another method

* first add default style into DB via UI -> it works

* the use console to create a new, not default, style
msg = ''
layer.saveStyleToDatabase( "a new style", "some description", False, None,
msg );

It does not work (not new line created, and msg remains empty. No log in
the database, which means NO query has been sent (I have change postgresql
config to log all requests).

But the following method works
layer.listStylesInDatabase()

And a new line appears in the postgresql log
2017-09-25 16:19:18.248 CEST [8984] mdouchin@qgis LOG:  0: duration:
0.217 ms  statement: SELECT id,styleName,description FROM layer_styles
WHERE NOT (f_table_catalog='qgis' AND f_table_schema='sup' AND
f_table_name='geo_commune' AND f_geometry_column='geom') ORDER BY
update_time DESC

It seems the method saveStyleToDatabase returns with no error, which can be
caused by 2 reasons
https://qgis.org/api/2.18/qgsvectorlayer_8cpp_source.html#l04347

 4369   this->exportNamedStyle( qmlDocument, msgError );
 4370   if ( !msgError.isNull() )
 4371   {
 4372 return;
 4373   }
 4374   qmlStyle = qmlDocument.toString();
 4375
 4376   this->exportSldStyle( sldDocument, msgError );
 4377   if ( !msgError.isNull() )
 4378   {
 4379 return;
 4380   }

/me investigates

2017-09-25 15:50 GMT+02:00 Jorge Gustavo Pereira Bastos Rocha <
j...@di.uminho.pt>:

> Hi,
>
> It already happened to me. The first user to save a style became the owner
> of the table. No other users were able to write on the layer_style table,
> because there were DEFAULT PRIVILEGES defined.
>
> Can you check the postgrsql log to see if there is any problem related
> with permissions?
>
> Regards,
>
> Jorge Gustavo
>
> ____
> De: QGIS-Developer [qgis-developer-boun...@lists.osgeo.org] em nome de
> kimaidou [kimai...@gmail.com]
> Enviado: 25 de Setembro de 2017 14:23
> Para: Luigi Pirelli
> Cc: qgis-developer@lists.osgeo.org
> Assunto: Re: [QGIS-Developer] pyqgis - layer.saveDefaultStyle() for
> PostGIS layers
>
> Hi,
>
> @ Tom : I really would like to trust QGIS method instead of managing
> manually different providers.
>
> @ Luigi
> No error message, even worse : i got a message telling everything went
> well ;)
>
> layer.saveDefaultStyle()
> (u'The style dbname=\'qgis\' host=localhost port=5432 user=\'mdouchin\'
> sslmode=disable key=\'ogc_fid\' estimatedmetadata=true srid=2154
> type=MultiPolygon table="sup"."geo_commune" (geom) sql= was updated in the
> database.', True)
>
> But the line is not created in the layer_styles table.
>
> Michaël
>
>
> 2017-09-25 14:48 GMT+02:00 Luigi Pirelli <lui...@gmail.com<mailto:luipi
> r...@gmail.com>>:
> from the code:
>
> mLayer->saveStyleToDatabase and mLayer->saveDefaultStyle
>
> and in
> QString QgsMapLayer::saveDefaultStyle( bool & theResultFlag )
> {
>   return saveNamedStyle( styleURI(), theResultFlag );
> }
>
> => seems you are doing correct.
>
> any log message?
>
> **
>
>
> void QgsVectorLayerProperties::saveDefaultStyle_clicked()
> {
>   apply();
>   QString errorMsg;
>   if ( mLayer->dataProvider()->isSaveAndLoadStyleToDBSupported() )
>   {
> QMessageBox askToUser;
> askToUser.setText( tr( "Save default style to: " ) );
> askToUser.setIcon( QMessageBox::Question );
> askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
> askToUser.addButton( tr( "Local database" ), QMessageBox::NoRole );
> askToUser.addButton( tr( "Datasource database" ), QMessageBox::YesRole
> );
>
> switch ( askToUser.exec() )
> {
>   case 0:
> return;
>   case 2:
> mLayer->saveStyleToDatabase( "", "", true, "", errorMsg );
> if ( errorMsg.isNull() )
> {
>   return;
> }
> break;
>   default:
> break;
> }
>   }
>
>   bool defaultSavedFlag = false;
>   errorMsg = mLayer->saveDefaultStyle( defaultSavedFlag );
>   if ( !defaultSavedFlag )
>   {
> QMessageBox::warning( this, tr( "Default Style" ), errorMsg );
>   }
> }
> Luigi Pirelli
>
> 
> **
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> * https://www.packtpub.com

Re: [QGIS-Developer] pyqgis - layer.saveDefaultStyle() for PostGIS layers

2017-09-25 Thread kimaidou
Hi,

@ Tom : I really would like to trust QGIS method instead of managing
manually different providers.

@ Luigi
No error message, even worse : i got a message telling everything went well
;)

layer.saveDefaultStyle()
(u'The style dbname=\'qgis\' host=localhost port=5432 user=\'mdouchin\'
sslmode=disable key=\'ogc_fid\' estimatedmetadata=true srid=2154
type=MultiPolygon table="sup"."geo_commune" (geom) sql= was updated in the
database.', True)

But the line is not created in the layer_styles table.

Michaël


2017-09-25 14:48 GMT+02:00 Luigi Pirelli :

> from the code:
>
> mLayer->saveStyleToDatabase and mLayer->saveDefaultStyle
>
> and in
> QString QgsMapLayer::saveDefaultStyle( bool & theResultFlag )
> {
>   return saveNamedStyle( styleURI(), theResultFlag );
> }
>
> => seems you are doing correct.
>
> any log message?
>
> **
>
>
> void QgsVectorLayerProperties::saveDefaultStyle_clicked()
> {
>   apply();
>   QString errorMsg;
>   if ( mLayer->dataProvider()->isSaveAndLoadStyleToDBSupported() )
>   {
> QMessageBox askToUser;
> askToUser.setText( tr( "Save default style to: " ) );
> askToUser.setIcon( QMessageBox::Question );
> askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
> askToUser.addButton( tr( "Local database" ), QMessageBox::NoRole );
> askToUser.addButton( tr( "Datasource database" ), QMessageBox::YesRole
> );
>
> switch ( askToUser.exec() )
> {
>   case 0:
> return;
>   case 2:
> mLayer->saveStyleToDatabase( "", "", true, "", errorMsg );
> if ( errorMsg.isNull() )
> {
>   return;
> }
> break;
>   default:
> break;
> }
>   }
>
>   bool defaultSavedFlag = false;
>   errorMsg = mLayer->saveDefaultStyle( defaultSavedFlag );
>   if ( !defaultSavedFlag )
>   {
> QMessageBox::warning( this, tr( "Default Style" ), errorMsg );
>   }
> }
> Luigi Pirelli
>
> 
> **
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> * https://www.packtpub.com/big-data-and-business-
> intelligence/mastering-qgis-second-edition
> 
> **
>
>
> On 25 September 2017 at 13:44, Tom Chadwin 
> wrote:
> > Perhaps you have to do it manually via a PostGIS query matching
> > f_table_catalog, f_table_schema, and f_table_name, and updating styleqml
> and
> > stylesld?
> >
> > Tom
> >
> >
> >
> > -
> > Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
> > --
> > 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

[QGIS-Developer] pyqgis - layer.saveDefaultStyle() for PostGIS layers

2017-09-25 Thread kimaidou
Hi all,

In the "Layer board" plugin, there is a button to save the default style
for each selected layers. To do so, I use the method

layer.saveDefaultStyle()

It seems this method does not work for Postgis layers. I tried manually in
the python console, and I confirm it does not achieve to create (or update)
the default style in the layer_styles table.

I also try to use the other methods, like
layer.saveNamedStyle(layer.styleURI())
with no more success.

Has anyone a clue about this issue ?

nb: I tested it only inside QGIS 2.18.13

Regards,
Michaël
___
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] Attribute table - item not highlighted in form mode when using drag designer

2017-08-08 Thread kimaidou
Hi all,

A user reported an issue on QGIS 2.18.11 (and probably previous versions).
When the drag and drop designer is used for a vector layer, the attribute
table, viewed in form mode, does not show any colour underneath the current
feature.

See this image
https://framapic.org/Ft1j3xwqga2D/8ARZc3qUL6AP.jpg

Is is a known issue ? I will obvioulsy open a ticket if needed.

Regards
Michaël
___
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 Europe in Paris next week

2017-07-08 Thread kimaidou
Hi all

I will be present too !

2017-07-05 16:36 GMT+02:00 Yves Jacolin :

> Régis,
>
> I will be present all week so even for the code sprint!
>
> Y.
> On mercredi 5 juillet 2017 16:16:46 CEST Régis Haubourg wrote:
> > Hi all,
> > within two weeks  the FOSS4G Europe is held near Paris at the National
> > Geographic Institute School (ENSG) from tuesday 18th to 22nd of July.
> >
> > Will some of QGIS developers or other involved parties be there? That
> would
> > be nice to meet some of you.
> >
> >
> > Concerning QGIS, there will be some interesting talks or workshops:
> >
> > - GML application schema made easy in GDAL/OGR and QGIS workshop
> > - Lizmap workshop
> >
> > - QGIS server refactoring for QGIS 3 - talk
> > - Data Processing with QGIS -talk
> >
> >
> > See you there!
> >
> > Cheers
> > Régis (and all the Oslandia Team)
>
>
> ___
> 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 Grant "Add consistency to UI controls" complete

2017-06-09 Thread kimaidou
Thanks a lot ! No more confusion with  N or 1/N scales definition !

2017-06-09 9:42 GMT+02:00 Tim Sutton :

> Thanks for the report back and the great work Nyall!
>
> Regards
>
> Tim
>
> On Fri, Jun 9, 2017 at 9:18 AM, Paolo Cavallini 
> wrote:
>
>> Il 09/06/2017 08:54, Nyall Dawson ha scritto:
>>
>> > Just a quick notice to advise that the work sponsored by the QGIS
>> > grant program on "adding consistency to UI controls" is now complete
>> > and merged into master. The following tasks were done as part of this
>> > work:
>>
>> Great stuff, thaks heaps!
>>
>> --
>> Paolo Cavallini - www.faunalia.eu
>> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
>> https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
>> ___
>> 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
>>
>
>
>
> --
> 
> --
> ​
>
> Tim Sutton
> Visit http://kartoza.com to find out about open source:
>  * Desktop GIS programming services
>  * Geospatial web development
> * GIS Training
> * Consulting Services
> Skype: timlinux Irc: timlinux on #qgis at freenode.net
> Tim is a member of the QGIS Project Steering Committee
> 
> ---
> Kartoza is a merger between Linfiniti and Afrispatial
>
> ___
> 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] Lizmap - "Story map" feature POC with QGIS user map data

2017-06-08 Thread kimaidou
Thanks Tim !

2017-06-08 8:57 GMT+02:00 Tim Sutton <t...@kartoza.com>:

> Hi
>
> On Tue, Jun 6, 2017 at 5:16 PM, kimaidou <kimai...@gmail.com> wrote:
>
>> Hi all,
>>
>> I am working on a new feature for upcoming version of Lizmap Web Client,
>> which allows the user
>> * to move from one layer object to the next , and shows:
>> * to see the feature information ( based on Lizmap popup)
>> * to see the geometry of the feature (highlighted in yellow) , optionnaly
>>
>> The editor of the QGIS project will choose :
>> * a coverage layer (same principle as the atlas)
>> * a label field used to fill a combo box from the layer features
>> * a field used to order the layer features (usually the label field)
>> * buttons to move backward/forward, which means to the previous or next
>> feature
>> * a button to start an animation, with an option to set the step duration
>> (5 s by default)
>>
>> Changing the user in the combo box will trigger the move to the
>> corresponding feature
>>
>> I have used QGIS user map data to build a demo
>> https://plugins.qgis.org/community-map/
>> Please tell me if I have the permission to use this data. Obviously, if
>> using this data is not possible, I will shut down the demo !
>>
>
> ​I don't see any problem with this. Thanks for making more cool things for
> the world :-)
>
> Regards
>
> Tim​
>
>
>
>>
>> The link is
>> http://dev.lizmap.3liz.com/index.php/projects/demonstration/
>> qgis_community
>>
>> Since this feature is based on a layer, you can imagine other scenarios
>> of use.
>>
>> Cheers
>>
>> Michaël
>>
>> ___
>> 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
>>
>
>
>
> --
> 
> --
> ​
>
> Tim Sutton
> Visit http://kartoza.com to find out about open source:
>  * Desktop GIS programming services
>  * Geospatial web development
> * GIS Training
> * Consulting Services
> Skype: timlinux Irc: timlinux on #qgis at freenode.net
> Tim is a member of the QGIS Project Steering Committee
> 
> ---
> Kartoza is a merger between Linfiniti and Afrispatial
>
___
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] Lizmap - "Story map" feature POC with QGIS user map data

2017-06-07 Thread kimaidou
Hi Tom

I prefer to use a layer as a source, because this way you can use it
* to zoom on somewhere (each layer feature ) -> no need to set up bookmarks
in QGIS
* display some information (title, description, photo, etc.) based on each
feature GetFeatureInfo request
I could use any other lizmap feature based on a layer to add more tools
(such as selection, filter of child data based on the active parent
feature, etc.)

If I base this tool on QGIS bookmarks, I ask the editor to create many
bookmarks, and I cannot find enough information for each bookmark item.
Basing the tool on a simple layer is more flexible in my opinion, since you
are not limited on which information you use for each feature.

Michaël

2017-06-06 20:45 GMT+02:00 Tom Chadwin :

> Hi Michaël
>
> Have you thought of basing it on QGIS bookmarks instead? No need to
> dedicate
> a field for the "order" property then.
>
> Tom
>
>
>
> -
> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
> --
> View this message in context: http://osgeo-org.1560.x6.
> nabble.com/QGIS-Developer-Lizmap-Story-map-feature-POC-
> with-QGIS-user-map-data-tp5323217p5323254.html
> Sent from the QGIS - Developer mailing list archive at Nabble.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] Lizmap - "Story map" feature POC with QGIS user map data

2017-06-06 Thread kimaidou
Hi all,

I am working on a new feature for upcoming version of Lizmap Web Client,
which allows the user
* to move from one layer object to the next , and shows:
* to see the feature information ( based on Lizmap popup)
* to see the geometry of the feature (highlighted in yellow) , optionnaly

The editor of the QGIS project will choose :
* a coverage layer (same principle as the atlas)
* a label field used to fill a combo box from the layer features
* a field used to order the layer features (usually the label field)
* buttons to move backward/forward, which means to the previous or next
feature
* a button to start an animation, with an option to set the step duration
(5 s by default)

Changing the user in the combo box will trigger the move to the
corresponding feature

I have used QGIS user map data to build a demo
https://plugins.qgis.org/community-map/
Please tell me if I have the permission to use this data. Obviously, if
using this data is not possible, I will shut down the demo !

The link is
http://dev.lizmap.3liz.com/index.php/projects/demonstration/qgis_community

Since this feature is based on a layer, you can imagine other scenarios of
use.

Cheers

Michaël
___
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 data from

2017-06-06 Thread kimaidou
Oups, sorry, I did not write down the whole subject, which was meant to be
"Use data from QGIS user map"

2017-06-06 13:51 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Hi all,
>
> I would like to use data from the QGIS User map [1] to create a demo map
> for a new Lizmap feature. Data can be accessed from [2]
> I would like to know which are the terms of use.
>
> [1] https://plugins.qgis.org/community-map/
> [2] https://plugins.qgis.org/community-map/usermaps/?format=json
>
> Regards
> Michaël
>
___
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] Use data from

2017-06-06 Thread kimaidou
Hi all,

I would like to use data from the QGIS User map [1] to create a demo map
for a new Lizmap feature. Data can be accessed from [2]
I would like to know which are the terms of use.

[1] https://plugins.qgis.org/community-map/
[2] https://plugins.qgis.org/community-map/usermaps/?format=json

Regards
Michaël
___
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] 2.18.9 - big thanks to Jürgen for the quick release!

2017-05-30 Thread kimaidou
Hi all,

+1000 to thank Jürgen for his work.

I think QGIS dev community should also find a way not to rely only on one
person to wear this burden (if it is really the case). I have no clue if
anyone else can help Jürgen ( or if it is necessary , or if Jürgen agree
with this, or if it is already the case...), but I think we should be
cautious. One dedicated and skillfull person as Jürgen is always the more
effective way, but sharing burden and how-tos is also a good thing IMHO.

Regards
Michaël

2017-05-28 7:20 GMT+02:00 Chris Crook :

> Absolutely want to second this comment.  This level of commitment is what
> makes QGIS great, and an invaluable tools for me in my work
>
> Thankyou Jürgen
>
> Chris
> 
> From: QGIS-Developer [qgis-developer-boun...@lists.osgeo.org] On Behalf
> Of Nyall Dawson [nyall.daw...@gmail.com]
> Sent: 27 May 2017 12:38
> To: qgis-developer; qgis-...@lists.osgeo.org
> Subject: [QGIS-Developer] 2.18.9 - big thanks to Jürgen for the quick
> release!
>
> I'd really like to publicly extend my thanks to Jürgen for this prompt
> release of 2.18.9, and for the work he's put in to quickly backport
> fixes and squash critical bugs leading up to this.
>
> This makes the second point release in a row where Jürgen has been
> required to push out rapid follow up releases, through no fault of his
> own!
>
> Jürgen -- without your hard work as release manager and all the hours
> you put in to packaging QGIS releases there's no way we'd have
> achieved the success we enjoy today. Many many thanks for all the work
> you've put in over the years in this thankless task!
>
> 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
>
> This message contains information, which may be in confidence and may be
> subject to legal privilege. If you are not the intended recipient, you must
> not peruse, use, disseminate, distribute or copy this message. If you have
> received this message in error, please notify us immediately (Phone 0800
> 665 463 or i...@linz.govt.nz) and destroy the original message. LINZ
> accepts no responsibility for changes to this email, or for any
> attachments, after its transmission from LINZ. Thank You.
> ___
> 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] Expression to get label reference point X and Y for use with geometry generator (make_line) ?

2017-05-04 Thread kimaidou
Hi QGIS !

I am playing with data-defined label position, with 2 column label_x and
label_y.
I use a geometry generator to draw the line between the label and the
feature centroid, like

make_line(
  centroid( $geometry ),
  make_point( "label_x", "label_y" )
)

It work pretty well (with some rectangle background under the label text),
but it is obviously only active when the label_x and label_y fields are not
NULL ( when the label is pinned )

I would like to draw this line for any features (perhaps depending on this
line length). So basically, I would need 2 new functions $x_label and
$y_label.

Anyone has tried to achieve this ?

Cheers,
Michaël
___
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] QGEP - right place to raise issues and discuss technical matters ?

2017-04-27 Thread kimaidou
Hi,

I have chosen to use the Github repository. Any feedback appreciated ;)
I will probably add more issues, and ad PR. Please tell me if I need to
stop !

https://github.com/QGEP/QGEP/issues/created_by/mdouchin
https://github.com/QGEP/datamodel/pull/12#issuecomment-297654347

2017-04-21 11:44 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Hi Régis,
>
> Thanks for your answer !
>
> 2017-04-14 16:16 GMT+02:00 Régis Haubourg <regis.haubo...@gmail.com>:
>
>> Hi Michaël,
>> nice to see more people join the water application fest :).
>>
>> good question, and we could ask the same for similar projects like QWAT
>> and the others ready to launch.
>>
>> Your point is that we miss mailing list / IRC or other channels dedicated
>> to those projects ?
>>
>
> I had 2 questions in mind ;
> * ask for permission to report issues in the QGEP github repository.
> * ask if there is a dedicated and open mailing list for QGEP, or if I
> should instead use QGIS-dev mailing list to discuss some subject.
>
> I do not want to pollute the github issues with "newbie" questions or
> discussions, so I was asking QGEP maintainers their opinion about it.
>
>
>>
>> My guess is that it is up to each Steering comitee to decide if they want
>> to open those channels.
>>
>
> Yep !
>
>
>>
>> My personal opinion is a big yes, still we need to avoid opening *yet
>> another list of channels* when current cluttering is quite high (mails,
>> irc, gitter, matrix, git pr and issues, wikis) It's a real challenge for us
>> to avoid communication gaps.
>>
>
> I think we could use QGIS dev mailing list to discuss some matter related
> to QGEP, but only if there is an impact on QGIS (feature missing, etc.), as
> Matthias and other QGEP devs do sometimes.
>
>
>
>>
>> Maybe we could discuss that at Essen, will you join?
>>
>
> I won't attend this meeting, but I will be available for any online
> interaction ( irc, emails, wiki, webconf, etc.)
>
>
>>
>> Matthias, Denis, any opinion ?
>>
>
> Same question ;)
>
>
> Cheers,
> Michaël
>
___
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] QGEP - right place to raise issues and discuss technical matters ?

2017-04-21 Thread kimaidou
Hi Régis,

Thanks for your answer !

2017-04-14 16:16 GMT+02:00 Régis Haubourg :

> Hi Michaël,
> nice to see more people join the water application fest :).
>
> good question, and we could ask the same for similar projects like QWAT
> and the others ready to launch.
>
> Your point is that we miss mailing list / IRC or other channels dedicated
> to those projects ?
>

I had 2 questions in mind ;
* ask for permission to report issues in the QGEP github repository.
* ask if there is a dedicated and open mailing list for QGEP, or if I
should instead use QGIS-dev mailing list to discuss some subject.

I do not want to pollute the github issues with "newbie" questions or
discussions, so I was asking QGEP maintainers their opinion about it.


>
> My guess is that it is up to each Steering comitee to decide if they want
> to open those channels.
>

Yep !


>
> My personal opinion is a big yes, still we need to avoid opening *yet
> another list of channels* when current cluttering is quite high (mails,
> irc, gitter, matrix, git pr and issues, wikis) It's a real challenge for us
> to avoid communication gaps.
>

I think we could use QGIS dev mailing list to discuss some matter related
to QGEP, but only if there is an impact on QGIS (feature missing, etc.), as
Matthias and other QGEP devs do sometimes.



>
> Maybe we could discuss that at Essen, will you join?
>

I won't attend this meeting, but I will be available for any online
interaction ( irc, emails, wiki, webconf, etc.)


>
> Matthias, Denis, any opinion ?
>

Same question ;)


Cheers,
Michaël
___
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] QGEP - right place to raise issues and discuss technical matters ?

2017-04-13 Thread kimaidou
Hi all,

I am working for a client of mine with the great QGEP model and plugin. I
have some issues, questions, and I would like to contribute with possible
translation, documentation and development.

My first reflex would be to open issues and PR in QGEP github repository,
but since this project is led by a community of users, with an official
steering committee, I was wondering if I can use it.

I have already contacted Matthias Kuhn privately to discuss some points,
but I really think this would be better for him and for QGEP if I do not go
on sending him direct emails ;)

Regards,
Michaël
___
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] p.write() throws an error

2017-03-06 Thread kimaidou
Hi Paolo,

As you tested, this is not related to Lizmap plugin, because you told me
you tested the following python code inside your Python console and got the
same error

p = QgsProject.instance()
if p.isDirty():
p.write()


Can anyone else test and report there is no pbm ? Paolo, could you give
more information on QGIS Version / Platform and status of project file (
new not saved, saved, etc.)

Cheers
Michaël

2017-03-03 9:33 GMT+01:00 Paolo Cavallini :

> Hi all,
> while using the latest version of Lizmap plugin, I get an error on some
> machines;
> ===
> 2017-03-01T16:50:09 1   Traceback (most recent call last):
>   File 
> "/home/paolo/.qgis2/python/plugins/lizmap/lizmap.py",
> line
> 2718, in run
> if not self.dlg.isVisible() and self.
> checkGlobalProjectOptions():
>   File 
> "/home/paolo/.qgis2/python/plugins/lizmap/lizmap.py",
> line
> 2377, in checkGlobalProjectOptions
> p.write()
> TypeError: write() takes exactly 2 arguments (1
> given)
> ===
> So apparently sip bindings have a problem here.
>
> All the best, and thanks.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
> ___
> 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] [Server] performance questions

2017-02-18 Thread kimaidou
Hi,

Thanks for this work.
I heard in a recent PR that Richard Duivenvoorde is struggling with big
PostgreSQL datasets (see [1] )

[1]
https://github.com/qgis/QGIS-Enhancement-Proposals/issues/79#issuecomment-279628851

Michaël

2017-02-16 11:04 GMT+01:00 Luca Manganelli :

>
> On Wed, Feb 15, 2017 at 6:48 PM, Régis Haubourg 
> wrote:
>
>> So Paul  introduced an option to avoid unecessary checks on startup called
>> "Trust project when datasource has no metadata (id, extent, geometry
>> type).
>> His branch is here https://github.com/pblottiere/QGIS/tree/trust
>
>
> ​This is awesome! Looking forward in merging into QGIS.
>
> But now I see that the Travis build gives an error...
>
> ___
> 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] Z or M styling in QGIS

2017-01-03 Thread kimaidou
Thanks Regis !

2017-01-03 12:22 GMT+01:00 Régis Haubourg :

> First PR for sharing style here:
> https://github.com/qgis/QGIS-Resources/pull/6
>
>
>
___
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] Z or M styling in QGIS

2017-01-03 Thread kimaidou
Hi all

This is indeed awesome !
Régis, you really should pass this kind of snippet to a broad audience (if
you have time, of course). I do not know if the new QGIS sharing tool is
the right target, or a quick blog post ?

Cheers,
Michaël

2017-01-03 11:31 GMT+01:00 Régis Haubourg :

>
>
> 2017-01-03 5:44 GMT+01:00 Nyall Dawson :
>
>>
>>
>> I'd say the preferred solution would be a 3d viewer using the Qt 3d
>> framework (http://doc.qt.io/qt-5/qt3d-examples.html). Then it could be
>> built in as core functionality instead of as a python plugin (or
>> relying on a js framework). We'd gain lots of benefits to this
>> approach, including:
>> - could be used with a multi-canvas view, with a mix of 2d/3d views
>> - could potentially reuse existing symbology as surface materials
>> - could do nifty things like embedding an interactive 3d view in a
>> composer
>> - could potentially replace the globe plugin
>
>
> Yes I forgot to mention Qt3D. That would be good to know if someone has
> already played with it.
>
>
>
>> So something like:
>> z(point_n($geometry,@geometry_point_num))
>
>
> Thanks for the pointer, That works with that expression on a Marker Line
> easily to draw vertical edges. See the screenshot here
> http://imgur.com/RPtOjMg
>
>
>
>>
>
> Throw that inside some type of data defined override and you can style
>> a geometry's nodes based on their z value.
>>
>> A geometry generator using  segments_to_lines and geometry_n can style
>> a geometries segments based on their z/m values too.
>>
>
> Wow I just realized that you can combine a geometry generator inside a
> marker line. Win!!!
>
> I used that expression, creating a line for each marker with a y
> translation using z value:
>
> make_line( translate(point_n(  $geometry,  @geometry_point_num ), 0 ,
> -z(point_n($geometry,@geometry_point_num)) ), translate( point_n(
>  $geometry,  @geometry_point_num +1  ), 0 , 
> -z(point_n($geometry,@geometry_point_num+1))
> ) )
>
> See http://imgur.com/TlCN7zf
>
>
> and a video just to underline the immediate feedback when editing :)
>
> https://youtu.be/o_lAeKJhRkg
>
>
>
> Thanks again Nyall, QGIS always allows a lot more than we think. So
> great
>
>
> ___
> 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] Improve server-side compiled expressions for PostGreSQL

2016-11-15 Thread kimaidou
Thanks Matthias.
I will try to give it a go in my spare time ( no fund either)

Cheers

2016-11-15 12:12 GMT+01:00 Matthias Kuhn <matth...@opengis.ch>:

> Hi Michaël,
>
> No functions are compiled so far (afaik).
>
> One will need to implement this in qgssqlexpressioncompiler or
> qgspostgresexpressioncompiler for all the functions involved (I'm not
> sure if / to what degree these functions are compatible between
> different sql dialects).
>
> Also make sure that any new function which is compiled is unit tested
> (providertestbase.py) to make sure it behaves exactly the same when
> executed locally and server side - across all providers.
>
> It's a long-standing plan of mine but I haven't found the time (or
> contract) for this yet...
>
> Matthias
>
> On 11/15/2016 11:01 AM, kimaidou wrote:
> > Hi all,
> >
> > I usually work with PostgreSQL data in QGIS.
> > I would like to have a guidance on how to improve the set of compiled
> > expressions for PostgreSQL. My goal is to propose a PR for some spatial
> > function.
> >
> > I think the files are here
> > src/providers/postgres/qgspostgresexpressioncompiler.cpp
> > src/providers/postgres/qgspostgresfeatureiterator.cpp
> >
> > For example, I would like the following expression to be compiled server
> > side:
> >
> > intersects(
> > $geometry,
> > geom_from_gml(
> >
> > '<gml:Polygon+xmlns:gml="http://www.opengis.net/gml;> outerBoundaryIs><gml:coordinates+
> decimal="."+cs=","+ts="+">MY_GML_COORDINATES coordinates>'
> > )
> > )
> >
> > where MY_GML_COORDINATES is the GML version of a polygon ring coords.
> >
> > What are the required steps to do so, and where ? The result would be
> >
> >
> > ST_Intersects(
> > geom,
> > ST_GeomFromGml( 'the long GML polygon representation')
> > )
> >
> > Regards,
> > Michaël
> >
> >
> > ___
> > 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] Improve server-side compiled expressions for PostGreSQL

2016-11-15 Thread kimaidou
Hi all,

I usually work with PostgreSQL data in QGIS.
I would like to have a guidance on how to improve the set of compiled
expressions for PostgreSQL. My goal is to propose a PR for some spatial
function.

I think the files are here
src/providers/postgres/qgspostgresexpressioncompiler.cpp
src/providers/postgres/qgspostgresfeatureiterator.cpp

For example, I would like the following expression to be compiled server
side:

intersects(
$geometry,
geom_from_gml(
'MY_GML_COORDINATES'
)
)

where MY_GML_COORDINATES is the GML version of a polygon ring coords.

What are the required steps to do so, and where ? The result would be


ST_Intersects(
geom,
ST_GeomFromGml( 'the long GML polygon representation')
)

Regards,
Michaël
___
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] Visualisation of relations

2016-11-01 Thread kimaidou
Hi all,

Speaking about child tables, I would rather have them presented as table
and not forms by default (or have an option to decide this for QGIS
installation). Usually you only want to see the list of children for each
relation, which is more compact, and show very fast if there is zero or any
children.

Michaël

2016-10-31 14:58 GMT+01:00 Patrick Valsecchi <
patrick.valsec...@camptocamp.com>:

> OK, I've created a PR for auto-detecting N-1 relations and pick the
> RelationReference widget for the foreign key fields.
> https://github.com/qgis/QGIS/pull/3699
>
> For the deep relations UX problem, I really don't know. Do we have UX
> experts among the QGIS devs?
>
> Thanks.
>
> On Mon, Oct 31, 2016 at 1:51 PM, Matthias Kuhn 
> wrote:
>
>> On 10/31/2016 01:26 PM, Patrick Valsecchi wrote:
>> > Matthias,
>> >
>> > Hummm... I don't know about the tabs. Initially I was thinking it would
>> > be a good idea, then I tried to imagine how it would look like for
>> > linked layers within linked layers. We would have two choices:
>> >
>> >   * Have QTabWidget within QTabWidget: tabs within tabs is a UX
>> nightmare
>> >   * Switch to the current way of representing relations for
>> > sub-relations: that would lead to user confusion because we have two
>> > ways of representing relations.
>> >
>> > What do you think? To me, tabs is not a good idea.
>>
>> I think the (current) groupbox within groupbox approach suffers from the
>> same UX defficiencies. At least I get confused regularly.
>>
>> Maybe
>>
>> * toplevel tabs
>> * first sublevel groupbox
>> * second sublevel ...
>>   groupbox again?
>>   skip?
>>   button to open in separate window?
>>
>> Matthias
>>
>
>
> ___
> 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] About project.qgs file versions

2016-10-26 Thread kimaidou
Hi all,

What about having an automatic backup saved before overwriting the file
with the newer version ? For example create a my-project.qgs.2.14 and only
after that override the project file with newer version.
This would be a safe way to let the user keep a copy of the project.

I can create an issue and propose a PR if needed.

Regards
Michaël
___
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] Show Geotagged Images on Map

2016-10-10 Thread kimaidou
Hi,

Sorry, my previous message was a bit "dry". Here are the steps:

* Open the vector layer properties dialog
* Go to the Style tab
* Use "Single symbol renderer"
* Choose "SVG Symbol"
* In the text input with the path to SVG, instead of using the "..." button
to choose a file, click instead of the button right next to it, to be able
to enter an expression. Choose "Edit"
* It opens a new dialog, with 2 tabs : Expression and Function  editor ->
Go to the latest "Function editor" tab.
* You can here create a "New file" via the button at the top
* Then choose a name, and then you can copy/paste the whole text you found
in the URL https://gist.github.com/mdouchin/d66191ccfadd74cff3f0
* Then you can go back to the first tab "Expression", and use an expression
such as

show_picture( "picture_path_fieldname" )

where "picture_path_filename" is the name of the field containing the path
to the image for each feature. (you can have absolute path, or better,
paths relative to the QGIS project)


This is a bit cumbersome, but should work :)

Regards,
Michaël

2016-10-06 14:41 GMT+02:00 Joshua Quesenberry <engn...@gmail.com>:

> Hi Michaël,
>
>
>
> Sorry, I missed your reply when it originally came through. Can you
> elaborate further on how to use the code snippet? I’m only very vaguely
> following what you’re saying to do so far.
>
>
>
> Separately, would it be possible to add an image type to the symbol editor
> for shapefiles, etc. that can use the an equation to create the image name
> and then display the image from there?
>
>
>
> Thanks,
>
>
>
> JQ
>
>
>
> *From:* kimaidou [mailto:kimai...@gmail.com]
> *Sent:* Monday, September 19, 2016 3:11 AM
> *To:* Joshua Quesenberry <engn...@gmail.com>
> *Cc:* qgis-developer <qgis-developer@lists.osgeo.org>
> *Subject:* Re: [Qgis-developer] Show Geotagged Images on Map
>
>
>
> ​Hi, you could use this snippets :
> https://gist.github.com/mdouchin/d66191ccfadd74cff3f0
>
> Basically, it loads an image for each feature in a SVG, which can then be
> used as a symbol.
>
> Regards
>
> Michaël
>
>
>
> 2016-09-18 22:35 GMT+02:00 Joshua Quesenberry <engn...@gmail.com>:
>
> All,
>
>
>
> I was wondering if anyone knows of a current method for displaying
> geotagged images (or maybe just a thumbnail) directly on the map canvas
> without having to click on one image a time? I saw this thread, but the
> solution seems to be deprecated now: http://osgeo-org.1560.x6.
> nabble.com/Showing-thumbnails-of-geotagged-photos-td5008632.html
>
>
>
> Thanks,
>
>
>
> JQ
>
>
> ___
> 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] Are we doing a 2.18 release

2016-09-21 Thread kimaidou
Thanks a lot Matthias and Jürgen for your answer. We should then make sure
bugfixes are backported into 2.14 (no example in mind, just a thought in
this complex context of 2 masters and multiple versions to handle for devs).

Regards
Michaël

2016-09-21 14:51 GMT+02:00 Jürgen E. Fischer <j...@norbit.de>:

> Hi Michaël,
>
> On Wed, 21. Sep 2016 at 13:33:48 +0200, kimaidou wrote:
> > A big other question: will this release be a LTR ?
>
> No, 2.14 is the LTR.
>
>
> 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

Re: [Qgis-developer] Are we doing a 2.18 release

2016-09-21 Thread kimaidou
Hi,

A big other question: will this release be a LTR ? I am sorry to reopen
Pandora box, but this is a question often asked by users during courses.
They would prefer to have the last 2.* as LTR, before the big changes, in
order to keep their plugins and projects "safe" before 3.0.
Or perhaps it is too soon, as we do not know yet if there will be a 2.20 ?

Regards
Michaël

2016-09-21 11:09 GMT+02:00 Neumann, Andreas :

> Hi Nathan,
>
> Yes - in Bonn it was decided to do a 2.18 release.
>
> There are a number of new features in master 2.
>
> The plan is also to have 2.18.x releases which will add DXF/DWG CAD import
> support and Geopackage improvements (through OGR). Jürgen and Evan will
> work on these. Both of these features couldn't make it into 2.17.
>
> Andreas
>
> On 2016-09-21 00:33, Nathan Woodrow wrote:
>
> Hi all,
>
> Are we doing a 2.18 release.  Seems we are in freeze but I wasn't sure we
> were doing the release to start with.
>
> - Nathan
>
> ___
> 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

Re: [Qgis-developer] Show Geotagged Images on Map

2016-09-19 Thread kimaidou
​Hi, you could use this snippets :
https://gist.github.com/mdouchin/d66191ccfadd74cff3f0

Basically, it loads an image for each feature in a SVG, which can then be
used as a symbol.

Regards
Michaël

2016-09-18 22:35 GMT+02:00 Joshua Quesenberry :

> All,
>
>
>
> I was wondering if anyone knows of a current method for displaying
> geotagged images (or maybe just a thumbnail) directly on the map canvas
> without having to click on one image a time? I saw this thread, but the
> solution seems to be deprecated now: http://osgeo-org.1560.x6.
> nabble.com/Showing-thumbnails-of-geotagged-photos-td5008632.html
>
>
>
> Thanks,
>
>
>
> JQ
>
> ___
> 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 and huge amount of data opening "small" postgis layer

2016-09-08 Thread kimaidou
Hi,

Have you checked in the tab "Rendering" of your layer properties the
checkbox about "Realize simplification by the provider if possible" (or a
text similar, as I just translated from french...).
It can make a huge difference for smal scales like 1:50, because data
is simplified server-side and then downloaded.See:
https://github.com/qgis/QGIS/pull/2410#issuecomment-160987344

Regards
Michaël

2016-09-08 17:12 GMT+02:00 Paolo Cavallini :

> Il 08/09/2016 17:09, Pietro Rossin ha scritto:
> > Thanks Paolo
> >
> > This is the table:
> >
> > CREATE mytable_3045
> > (
> >   id serial NOT NULL,
> >   geom geometry(MultiPolygonZ,3045),
> >   nome character varying(255),
> >   cod_istat character varying(255),
> >   CONSTRAINT mytable_3045_pkey PRIMARY KEY (id)
> > )
> > WITH (
> >   OIDS=FALSE
> > );
>
> Certainly varchar can be smaller, this would save ome byte, but I'd not
> expect dramatic improvements. Why geomZ?
> Is the geom in single or double precision?
> All the best.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> 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] Qgis resource sharing VS processing for script sharing

2016-08-31 Thread kimaidou
Hi QGIS folks,

Since the release of the great plugin "Qgis resource sharing" (1) (2) & (3)
we can share many resources, and processing scripts are among them.

We have also another Processing dedicated github repo for sharing Python
scripts, R scripts and models (4)

Regarding this current situation, what should we tell users and developpers
who want to share Processing scripts ? What shoud they use to share their
scripts ?

Once the new plugin will be able to let users share R scripts and
processing models, could we get rid of the historical Processing sharing
tool ?

Thanks in advance for your ideas about this topic.

Cheers
Michaël


(1)
https://github.com/akbargumbira/qgis_resources_sharing/releases/tag/v0.5.1
(2) http://www.akbargumbira.com/qgis_resources_sharing/
(3) https://github.com/qgis/QGIS-Resources

(4) https://github.com/qgis/QGIS-Processing
___
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] Let's clean up hub.qgis.org

2016-08-25 Thread kimaidou
Hi Paolo

You can also remove and purge lizmap related projects

http://hub.qgis.org/projects/lizmapwebclient
http://hub.qgis.org/projects/lizmap-plugin

Thanks a lot.
Michael

Le jeudi 25 août 2016, Luca Congedo  a
écrit :
> Hello Paolo,
> you can remove the project
> http://hub.qgis.org/projects/semi-automatic-class
>
> Thank you,
> Luca
___
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] Pyqgis - QgsComposerLabel issues with Html rendering (state = 2) in QGIS 2.16

2016-08-11 Thread kimaidou
While running QGIS from command line, I got these warnings

Warning: Object::connect: No such signal QgsWebPage::loadFinished( bool )



2016-08-11 11:52 GMT+02:00 kimaidou <kimai...@gmail.com>:

> ​​
> Hi folks,
>
> In one of my plugins I create a QgsComposition and fill it with some
> QgsComposerLabel items. Extract of code :
>
> http://paste.debian.net/788195/
>
> In 2.14, this works fast and well -> my HTML is well rendered when
> exporting the composition to pdf.
>
> In 2.16, generation take ages, and the exported PDF shows blank labels
> with no rendered content.
>
> If I comment the line 17 ( with : cl.setHtmlState(2) ) and test again in
> 2.16, PDF generation is as fast as in 2.14, and text is rendered (but
> oviously HTML is not rendered, only plain text ).
>
> It seems there is an issue with HTML rendering in my QGIS context with QT.
> What would you advise me to do to understand what is going on here ? What
> can I try ?
>
> NB: is here my QGIS "about" information data:
> Version de QGIS
> 2.16.1-Nødebo
> Révision du code
> 8545b3b
> Compilé avec Qt
> 4.8.7
> Utilisant Qt
> 4.8.7
> Compilé avec GDAL/OGR
> 1.11.3
> Utilisé avec GDAL/OGR
> 1.11.3
> Compilé avec GEOS
> 3.5.0-CAPI-1.9.0
> Utilisé avec GEOS
> 3.5.0-CAPI-1.9.0 r4084
> Version du client PostgreSQL
> 9.5.2
> Version de SpatiaLite
> 4.3.0a
> Version de QWT
> 5.2.3
> Version de PROJ.4 :
> 492
> Version de QScintilla2
> 2.9.1
>
>
> Regards,
> Michaël
>
>
___
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] Pyqgis - QgsComposerLabel issues with Html rendering (state = 2) in QGIS 2.16

2016-08-11 Thread kimaidou
​​
Hi folks,

In one of my plugins I create a QgsComposition and fill it with some
QgsComposerLabel items. Extract of code :

http://paste.debian.net/788195/

In 2.14, this works fast and well -> my HTML is well rendered when
exporting the composition to pdf.

In 2.16, generation take ages, and the exported PDF shows blank labels with
no rendered content.

If I comment the line 17 ( with : cl.setHtmlState(2) ) and test again in
2.16, PDF generation is as fast as in 2.14, and text is rendered (but
oviously HTML is not rendered, only plain text ).

It seems there is an issue with HTML rendering in my QGIS context with QT.
What would you advise me to do to understand what is going on here ? What
can I try ?

NB: is here my QGIS "about" information data:
Version de QGIS
2.16.1-Nødebo
Révision du code
8545b3b
Compilé avec Qt
4.8.7
Utilisant Qt
4.8.7
Compilé avec GDAL/OGR
1.11.3
Utilisé avec GDAL/OGR
1.11.3
Compilé avec GEOS
3.5.0-CAPI-1.9.0
Utilisé avec GEOS
3.5.0-CAPI-1.9.0 r4084
Version du client PostgreSQL
9.5.2
Version de SpatiaLite
4.3.0a
Version de QWT
5.2.3
Version de PROJ.4 :
492
Version de QScintilla2
2.9.1


Regards,
Michaël
___
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] Expressions - performances of spatial operators

2016-07-05 Thread kimaidou
Hi Matthias,

Thanks a lot for your answer. Unfortunately, I have no sponsors for this. I
asked to improve my knowledge on this topic ;)
Perhaps we could raise a crowdfunding for this improvement ?

Cheers,
Michaël


2016-07-05 15:31 GMT+02:00 Matthias Kuhn <matth...@opengis.ch>:

> Hi Michaël,
>
> There are a couple of possibilities to improve the performance of
> operations in two ways (which both help here AFAICS)
>
>  * Give QgsExpression::prepare() more power
>  * Compile functions (where possible)
>
> The send one depends to some degree on the first one.
>
> Let me know if you have sponsors, I've got some experimental code
> somewhere and I am very interested in working on this project.
>
> FYI, a first test - only the prepare part - some months ago improved the
> 2.5D rendering by ~30%.
>
> Regards
> Matthias
>
> On 07/05/2016 03:11 PM, kimaidou wrote:
> > Hi all,
> >
> > I am a bit curious about performances concerning the use of Spatial
> > expressions in QGIS, for example to select features like this
> >
> >  intersects(
> > $geometry,
> > geom_from_wkt( 'MultiPolygon (((649308.282793968
> > 6978002.0599959021807, 649295.325809048
> > 6977994.5499981373549, 649235.924190952
> > 6978013.5099977648258, 649182.532793968
> > 6978077.3200029802322, 649212.347671694
> > 6978159.5300026077032,  649308.282793968
> > 6978002.0599959021807)))')
> > )
> >
> > NB: I have simplified the WKT representation here
> >
> > I am running this expression inside QGIS 2.14, for a layer containing
> > approx. 100 000 features ( buildings).
> > The WKT polygon represents a very small area compared to the whole
> > layer: 500 features only are selected.
> >
> > It seems to me no spatial index is used, because it takes some time to
> > run ~ 3 minutes.
> >
> > I have checked the option to run expressions server side, and all the
> > layers are PostGIS layers.
> >
> > What could be done to improve this kind of expressions, which can be
> > used elsewhere in QGIS ( to toggle labels for example ) ?
> >
> > Regards
> > Michaël
> >
> >
> > ___
> > 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] Expressions - performances of spatial operators

2016-07-05 Thread kimaidou
Hi all,

I am a bit curious about performances concerning the use of Spatial
expressions in QGIS, for example to select features like this

 intersects(
$geometry,
geom_from_wkt( 'MultiPolygon (((649308.282793968
6978002.0599959021807, 649295.325809048
6977994.5499981373549, 649235.924190952
6978013.5099977648258, 649182.532793968
6978077.3200029802322, 649212.347671694
6978159.5300026077032,  649308.282793968
6978002.0599959021807)))')
)

NB: I have simplified the WKT representation here

I am running this expression inside QGIS 2.14, for a layer containing
approx. 100 000 features ( buildings).
The WKT polygon represents a very small area compared to the whole layer:
500 features only are selected.

It seems to me no spatial index is used, because it takes some time to run
~ 3 minutes.

I have checked the option to run expressions server side, and all the
layers are PostGIS layers.

What could be done to improve this kind of expressions, which can be used
elsewhere in QGIS ( to toggle labels for example ) ?

Regards
Michaël
___
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] custom charts?

2016-06-24 Thread kimaidou
Hi all,

Great idea indeed.
Here is another example of "dynamic" SVG, used here to render PNG as
symbols in QGIS. Not with expressions but with a Python method.
https://gist.github.com/mdouchin/d66191ccfadd74cff3f0

It is derived of the work of Nathan Woodrow:
http://nathanw.net/2016/02/04/live-svgs/

This could be adapted to create a SVG from a template via Python tools like
template:
https://docs.python.org/2/library/string.html#template-strings
or more advanced template engines


​Cheers,
Michaël​
___
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] Build issue on Ubuntu 16.04 xenial with release-2_14 : crssync target failed

2016-06-08 Thread kimaidou
Hi all,

Setting the compilation variables via ccmake to point to libgdal 1.11.3
worked like a charm. QGIS 2.14 has successfully been built against gdal
1.11.3

Bas, you are right, I inverted them in my previous email. Here are the vars
used in ccmake to build QGIS successfully on my machine

GDAL_CONFIG  /usr/bin/gdal-config
GDAL_INCLUDE_DIR /usr/include/gda
GDAL_LIBRARY /usr/lib/libgdal.so

Thanks again, both Bas and Yves, for you kind help

Cheers
Michaël

2016-06-08 14:36 GMT+02:00 Bas Couwenberg <sebas...@xs4all.nl>:

> On 2016-06-08 14:17, kimaidou wrote:
>
>> It appears I had 2 gdal installed :
>>
>> one by qgis from qgis.org repository ( 1.11) which corresponds to
>> /usr/lib/libgdal.so
>> and one installed via apt-get install gdal-bin from repositories (2.1)
>> which corresponds to : /usr/local/lib/libgdal.so
>>
>
> You got this the wrong way around, the package gdal is installed in
> /usr/lib, you custom build in /usr/local/lib.
>
> The /usr/local hierarchy is reserverd for the local administrator, /usr
> for the system.
>
>
> Kind Regards,
>
> Bas
> ___
> 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] Build issue on Ubuntu 16.04 xenial with release-2_14 : crssync target failed

2016-06-08 Thread kimaidou
Hi Bas,

Thanks for your answer.
It appears I built gdal on year ago to check GeoJson write capabilities in
QGIS.

Now, I have indeed just upgraded to last Ubuntu xenial, and I am trying to
get rid of old GDAL build and reinstall GDAL from repositories. So I
removed all symlinks made earlier today, I remove old Gdal build, remove
all lines concerning GDAL in /etc/ld.so.conf.d/. I ran ldconfig

Then uninstalled qgis and gdal-bin + libgdal and others, restarted my
computer

It still does not work.
mdouchin@mdouchin-Lenovo-U41-70:~$ ldd /usr/local/bin/gdalinfo | grep "not
found"
libnetcdf.so.7 => not found
libgif.so.4 => not found

I will do some more googling
___
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] Build issue on Ubuntu 16.04 xenial with release-2_14 : crssync target failed

2016-06-08 Thread kimaidou
Ok, I think I found the issue. I have a problem with GDAL

gdalinfo --formats

returns

gdalinfo: error while loading shared libraries: libnetcdf.so.7: cannot open
shared object file: No such file or directory

Here are the command lines used to make gdalinfo happy (quite hackish ... )

ln -s /usr/lib/x86_64-linux-gnu/libgif.so
/usr/lib/x86_64-linux-gnu/libgif.so.4
ln -s /usr/lib/x86_64-linux-gnu/libnetcdf.so
/usr/lib/x86_64-linux-gnu/libnetcdf.so.7
echo "/usr/lib/x86_64-linux-gnu/" >> /etc/ld.so.conf.d/qgis.conf
ldconfig

Now gdalinfo does not complain anymore, but the build does not succeed
either, see
https://paste.sh/l2Jdh0Bt#5wrhkbMFV3nUwfnsHdLhfZ5U



2016-06-08 11:14 GMT+02:00 kimaidou <kimai...@gmail.com>:

> I just tested if with one proc only, which helps to see the errors. Here
> they are
>
> https://paste.sh/24JYwaQj#WXMylljn7ATP3KB7UM2TdbhZ
>
>
>
> 2016-06-08 10:45 GMT+02:00 kimaidou <kimai...@gmail.com>:
>
>> Hi all
>>
>> I am trying to build QGIS release-2_14 in my Ubuntu 16.04. I have
>> installed dependencies listed in the INSTALL.md file, and tried it with a
>> clean build directory and ccache emptied
>>
>> I use QGIS official repo
>> deb   http://qgis.org/debian xenial main
>> deb-src http://qgis.org/debian xenial main
>>
>>
>> Here is my ccmake cl :
>>
>> cd /home/mdouchin/src/qgis/build/2_14/
>> ccmake -DCMAKE_INSTALL_PREFIX=/home/mdouchin/src/qgis/build/2_14
>> -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=False
>> -DWITH_INTERNAL_QWTPOLAR=True -DWITH_SERVER=True -DWITH_GRASS=False
>> -DWITH_GRASS7=False ../../source/QGIS/
>>
>> Here are the errors during the build process
>>
>> src/crssync/CMakeFiles/crssync.dir/build.make:112 : la recette pour la
>> cible « output/bin/crssync » a échouée
>>
>> I have no really other helpfull erros here. Has anyone had problem with
>> crssync with last ubuntu ?
>>
>>
>> Thanks in advance
>> Michaël
>>
>
>
___
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] Build issue on Ubuntu 16.04 xenial with release-2_14 : crssync target failed

2016-06-08 Thread kimaidou
I just tested if with one proc only, which helps to see the errors. Here
they are

https://paste.sh/24JYwaQj#WXMylljn7ATP3KB7UM2TdbhZ



2016-06-08 10:45 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Hi all
>
> I am trying to build QGIS release-2_14 in my Ubuntu 16.04. I have
> installed dependencies listed in the INSTALL.md file, and tried it with a
> clean build directory and ccache emptied
>
> I use QGIS official repo
> deb   http://qgis.org/debian xenial main
> deb-src http://qgis.org/debian xenial main
>
>
> Here is my ccmake cl :
>
> cd /home/mdouchin/src/qgis/build/2_14/
> ccmake -DCMAKE_INSTALL_PREFIX=/home/mdouchin/src/qgis/build/2_14
> -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=False
> -DWITH_INTERNAL_QWTPOLAR=True -DWITH_SERVER=True -DWITH_GRASS=False
> -DWITH_GRASS7=False ../../source/QGIS/
>
> Here are the errors during the build process
>
> src/crssync/CMakeFiles/crssync.dir/build.make:112 : la recette pour la
> cible « output/bin/crssync » a échouée
>
> I have no really other helpfull erros here. Has anyone had problem with
> crssync with last ubuntu ?
>
>
> Thanks in advance
> Michaël
>
___
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] Build issue on Ubuntu 16.04 xenial with release-2_14 : crssync target failed

2016-06-08 Thread kimaidou
Hi all

I am trying to build QGIS release-2_14 in my Ubuntu 16.04. I have installed
dependencies listed in the INSTALL.md file, and tried it with a clean build
directory and ccache emptied

I use QGIS official repo
deb   http://qgis.org/debian xenial main
deb-src http://qgis.org/debian xenial main


Here is my ccmake cl :

cd /home/mdouchin/src/qgis/build/2_14/
ccmake -DCMAKE_INSTALL_PREFIX=/home/mdouchin/src/qgis/build/2_14
-DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=False
-DWITH_INTERNAL_QWTPOLAR=True -DWITH_SERVER=True -DWITH_GRASS=False
-DWITH_GRASS7=False ../../source/QGIS/

Here are the errors during the build process

src/crssync/CMakeFiles/crssync.dir/build.make:112 : la recette pour la
cible « output/bin/crssync » a échouée

I have no really other helpfull erros here. Has anyone had problem with
crssync with last ubuntu ?


Thanks in advance
Michaël
___
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 Layer Search Plugin

2016-06-07 Thread kimaidou
Hi Paolo,

I just answered before, following Victor mantra "Processing Processing
Processing"

2016-06-07 15:51 GMT+02:00 Paolo Cavallini :

> Il 06/06/2016 22:54, Richard Duivenvoorde ha scritto:
> > On 06-06-16 22:44, C Hamilton wrote:
>
> >> https://github.com/NationalSecurityAgency/qgis-layersearch-plugin
> >
> > Yep, but you can also wait for the approver(s) to find some time to have
> > a look into it and approve it (making it public), or else he/she will
> > contact the author to check for certain details (like info about author,
> > repo or issue tracker etc etc)
> >
> > Approving is often not more then a couple of days (often faster)
>
> Hi all,
> I suspended approval because I' like to examine the possibility of
> reducing the overlap with the functionally similar QuickFind plugin.
> I hope that this discussion will bring us there soon.
> QuickFind devs, anyone there?
> All the best, and thanks.
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> ___
> 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 Layer Search Plugin

2016-06-07 Thread kimaidou
Hi all,

I think it is not really profitable to have multiple plugins. In my
opinion, efforts must be made to merge plugins when possible. In this case,
we have

* Quick Finder : Full Text Search is used here, which allows fuzzy search,
and is very efficient compared to scanning all features for a match. A
drawback, you must fill in the "FTS vectors" for each layer you want to be
able to search within. I think it is not so bad because the process is
fast. I also think there is nothing preventing to add more than one field
in the search ( it is possible with FTS in PostgreSQL, must also be the
case with sqlite)

* Layer search : Great to have a quick way to search among all the fields
of all loaded layers, with no configuration. Drawback : I think this can be
very slow for big datasets, and it is not "fuzzy", as regexp are used while
iterating on each feature. Another drawback : for external vector sources
like PostgreSQL, all features must been fetched !

IMHO, the way to go could be

* Add the FTS pregenerator of Quick Finder in Processing, as an alg
available for anyone to use
* Add the FTS search of Quick Finder as a Processing Alg
* Add the "layer search" worker as an Alg in Processing
* Have a combined plugin which let the user choose the search type : FTS
with pregeneration, or direct search with features iteration. This will
then run the corresponding alg

Cheers,
Michaël

2016-06-07 7:16 GMT+02:00 Jeremy Palmer :

>
> >
> > I would personally prefer keeping it as a separate plugin, but what do
> you
> > think? Should it be integrated with another plugin?
> >
>
> It seems like it has value over the other plugins. Another issue I’ve had
> is searching all layer fields and pushing the query filter down the
> provider (e.g PostGIS or WFS) to increase the performance and usability.
> Using the approach of iterating through all features client side with a
> large dataset can be a killer in terms of bandwidth, memory and time. Does
> your new plugin do that? If so then it would be really useful :)
>
>
>
> This message contains information, which may be in confidence and may be
> subject to legal privilege. If you are not the intended recipient, you must
> not peruse, use, disseminate, distribute or copy this message. If you have
> received this message in error, please notify us immediately (Phone 0800
> 665 463 or i...@linz.govt.nz) and destroy the original message. LINZ
> accepts no responsibility for changes to this email, or for any
> attachments, after its transmission from LINZ. Thank You.
> ___
> 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] Processing - current status of "in-between" layers while running models

2016-05-19 Thread kimaidou
Hi all,

Thanks Paolo and Tom for your interest in this topic !

Anyone has any idea about the current status : spatialite, memory, etc. (cf
my first email) ?
Sorry for answering again, but this is still not very clear for me.

Thanks in advance

Michaël

2016-05-16 14:43 GMT+02:00 Tom Chadwin :

> I hope this isn't irrelevant, but I wonder if change here might help me
> with
> an issue I've had with using processing algorithms in sequence in Python. I
> never got any answer to my SE question
> (
> http://gis.stackexchange.com/questions/175952/pyqgis-save-raster-as-rendered-image-then-use-gdal-tools-on-it
> ),
> and I've never been able to solve the problem.
>
> If file-locking is the cause of the problem, moving to either memory layers
> or Spatialite could potentially solve this. But I could be completely
> wrong.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Processing-current-status-of-in-between-layers-while-running-models-tp5266633p5266638.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> ___
> 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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-16 Thread kimaidou
Hi Nyall,

I have seen you have just backported the commits into release-2_14. Thanks
a lot !

Michaël

2016-05-14 14:57 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Ok, thanks a lot !
>
> 2016-05-14 12:41 GMT+02:00 Nyall Dawson <nyall.daw...@gmail.com>:
>
>>
>> On 14 May 2016 19:39, "kimaidou" <kimai...@gmail.com> wrote:
>> >
>> > Hi Nyall,
>> >
>> > I have just tested it with today's master, and there is no memory leak
>> any more. Thanks a lot for helping solving this nasty one.
>> > Could you please backport the related "memory leak" commits to the 2.14
>> release branch ?
>>
>> Thanks for the confirmation. I'll backport sometime next week (got a
>> bunch of commits I need to do this for)
>>
>> Nyall
>>
>> >
>> > Cheers,
>> > Michaël
>> >
>> > 2016-05-10 14:10 GMT+02:00 kimaidou <kimai...@gmail.com>:
>> >>
>> >> Thanks Nyall,
>> >>
>> >> I will build last master and check it asap.
>> >>
>> >> Cheers,
>> >> Michaël
>> >>
>> >> 2016-05-10 6:25 GMT+02:00 Nyall Dawson <nyall.daw...@gmail.com>:
>> >>>
>> >>> On 10 May 2016 at 03:38, kimaidou <kimai...@gmail.com> wrote:
>> >>> > Hi
>> >>> >
>> >>> > I just tested with a freshly built QGIS release-2_14 , and the issue
>> >>> > remains.
>> >>> > The easiest way to reproduce is to zoom back and forth from big
>> scales ( ~
>> >>> > 1:25 000 ) to layer extent scale ( ~ 1:600 000 )
>> >>>
>> >>> Should be fixed by
>> >>>
>> https://github.com/qgis/QGIS/commit/6b80518a5b55ab30fb19493266d5626d0f89d26b
>> >>>
>> >>> There was a leak in the OGR provider when a feature had null geometry
>> >>> and a filter rect was set on a feature request (such as when rendering
>> >>> a map).
>> >>>
>> >>> I also fixed another (potentially huge?) memory leak in the python
>> code.
>> >>>
>> >>> Would appreciate testing and feedback on whether this has made a big
>> >>> difference for you!
>> >>>
>> >>> Nyall
>> >>>
>> >>> >
>> >>> > Good evening/morning
>> >>> > Michaël
>> >>> >
>> >>> > 2016-05-09 15:02 GMT+02:00 kimaidou <kimai...@gmail.com>:
>> >>> >>
>> >>> >> Hi Matthias,
>> >>> >>
>> >>> >> Not yet, I need to build QGIS master before being able to report
>> back
>> >>> >> Thanks for your answer
>> >>> >>
>> >>> >> 2016-05-09 14:59 GMT+02:00 Matthias Kuhn <matth...@opengis.ch>:
>> >>> >>>
>> >>> >>> Have you tested with either the latest 2.14 nightly or master
>> nightly?
>> >>> >>> An issue with OGR connection pooling has been resolved recently.
>> And I
>> >>> >>> wonder if that could be related.
>> >>> >>>
>> >>> >>>  -- Matthias
>> >>> >>>
>> >>> >>>
>> >>> >>> On 05/09/2016 02:28 PM, kimaidou wrote:
>> >>> >>>
>> >>> >>> I created an issue about it : http://hub.qgis.org/issues/14792
>> >>> >>>
>> >>> >>> 2016-05-09 11:48 GMT+02:00 kimaidou <kimai...@gmail.com>:
>> >>> >>>>
>> >>> >>>> Hi again,
>> >>> >>>>
>> >>> >>>> I also forgot to mention that I have no memory leak when using
>> the same
>> >>> >>>> dataset in PostGIS ( tested by importing the Shapefile in
>> PostGIS with
>> >>> >>>> shape2pgsql )
>> >>> >>>>
>> >>> >>>> Michaël
>> >>> >>>>
>> >>> >>>> 2016-05-09 11:07 GMT+02:00 kimaidou <kimai...@gmail.com>:
>> >>> >>>>>
>> >>> >>>>> I forgot to mention the steps to reproduce the bug, and the
>> precautions
>> >>> >>>>> to take :
>> >>> >>>>>
>> >>> &

[Qgis-developer] Processing - current status of "in-between" layers while running models

2016-05-16 Thread kimaidou
Hi all !

I was wondering what was the current status for layers created as ouput of
algs and used as input in child algs ? I remember reading some new feature
in this area, but I cannot remember what was the conclusion. Is there some
options allowing to do the following :

* use memory layers for all intermediate layers -> could be very fast, but
there should be some way to prevent bloating the computer if the input data
is too big ( the user would prefer to avoid memory layer if it leads to
swap )

* use a unique spatialite database to store the intermediate layers. In
this case
  - create automatically spatial indexes ( it is fast )
  - use rasterlite to store raster layers ? Or use a kind of foreign data
wrapper for sqlite ?

* For both options, obviously keep the long field names along the process,
and the complex data types ( and do not restrict to the 4 datatypes
available in DBF )

* I am aware that the use of Grass or other rich algs provider (Saga,
Taudem) can lead to using their internal format. What are the possibilities
and limits in this case ? For example for vector, Grass needs to import the
data, but what about for raster like GeoTiffs ?

Thanks in advance for your sharing your opinions and knowledge on this.

Regards,
Michaël
___
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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-14 Thread kimaidou
Ok, thanks a lot !

2016-05-14 12:41 GMT+02:00 Nyall Dawson <nyall.daw...@gmail.com>:

>
> On 14 May 2016 19:39, "kimaidou" <kimai...@gmail.com> wrote:
> >
> > Hi Nyall,
> >
> > I have just tested it with today's master, and there is no memory leak
> any more. Thanks a lot for helping solving this nasty one.
> > Could you please backport the related "memory leak" commits to the 2.14
> release branch ?
>
> Thanks for the confirmation. I'll backport sometime next week (got a bunch
> of commits I need to do this for)
>
> Nyall
>
> >
> > Cheers,
> > Michaël
> >
> > 2016-05-10 14:10 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>
> >> Thanks Nyall,
> >>
> >> I will build last master and check it asap.
> >>
> >> Cheers,
> >> Michaël
> >>
> >> 2016-05-10 6:25 GMT+02:00 Nyall Dawson <nyall.daw...@gmail.com>:
> >>>
> >>> On 10 May 2016 at 03:38, kimaidou <kimai...@gmail.com> wrote:
> >>> > Hi
> >>> >
> >>> > I just tested with a freshly built QGIS release-2_14 , and the issue
> >>> > remains.
> >>> > The easiest way to reproduce is to zoom back and forth from big
> scales ( ~
> >>> > 1:25 000 ) to layer extent scale ( ~ 1:600 000 )
> >>>
> >>> Should be fixed by
> >>>
> https://github.com/qgis/QGIS/commit/6b80518a5b55ab30fb19493266d5626d0f89d26b
> >>>
> >>> There was a leak in the OGR provider when a feature had null geometry
> >>> and a filter rect was set on a feature request (such as when rendering
> >>> a map).
> >>>
> >>> I also fixed another (potentially huge?) memory leak in the python
> code.
> >>>
> >>> Would appreciate testing and feedback on whether this has made a big
> >>> difference for you!
> >>>
> >>> Nyall
> >>>
> >>> >
> >>> > Good evening/morning
> >>> > Michaël
> >>> >
> >>> > 2016-05-09 15:02 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>> >>
> >>> >> Hi Matthias,
> >>> >>
> >>> >> Not yet, I need to build QGIS master before being able to report
> back
> >>> >> Thanks for your answer
> >>> >>
> >>> >> 2016-05-09 14:59 GMT+02:00 Matthias Kuhn <matth...@opengis.ch>:
> >>> >>>
> >>> >>> Have you tested with either the latest 2.14 nightly or master
> nightly?
> >>> >>> An issue with OGR connection pooling has been resolved recently.
> And I
> >>> >>> wonder if that could be related.
> >>> >>>
> >>> >>>  -- Matthias
> >>> >>>
> >>> >>>
> >>> >>> On 05/09/2016 02:28 PM, kimaidou wrote:
> >>> >>>
> >>> >>> I created an issue about it : http://hub.qgis.org/issues/14792
> >>> >>>
> >>> >>> 2016-05-09 11:48 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>> >>>>
> >>> >>>> Hi again,
> >>> >>>>
> >>> >>>> I also forgot to mention that I have no memory leak when using
> the same
> >>> >>>> dataset in PostGIS ( tested by importing the Shapefile in PostGIS
> with
> >>> >>>> shape2pgsql )
> >>> >>>>
> >>> >>>> Michaël
> >>> >>>>
> >>> >>>> 2016-05-09 11:07 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>> >>>>>
> >>> >>>>> I forgot to mention the steps to reproduce the bug, and the
> precautions
> >>> >>>>> to take :
> >>> >>>>>
> >>> >>>>> * open the project in QGIS 2.14 ( I have not tested with older
> >>> >>>>> versions)
> >>> >>>>>
> >>> >>>>> * open a terminal and use this kind of command to monitor QGIS
> memory
> >>> >>>>> consumption : htop, or ps with
> >>> >>>>> watch -n1 'ps -aux --sort -pmem | head -5'
> >>> >>>>>
> >>> >>>>> * Navigate through the project by zooming in and out, pan, etc.
> I think
> >>> &g

Re: [Qgis-developer] Qt5 and Python 3

2016-05-14 Thread kimaidou
\o/ Bravo , and thanks a lot for making this migration possible !

Michaël

2016-05-14 0:02 GMT+02:00 Matthias Kuhn :

> Hi all,
>
> I'm happy to announce that we found a way to integrate proper NULL value
> support for also for pre-PyQt 5.7 versions.
>
> This fix has been sponsored by OPENGIS.ch - like many others to pave the
> road towards proper python 3 and Qt5 support.
>
> --
> Matthias Kuhn
> OPENGIS.ch - https://www.opengis.ch
> Spatial • (Q)GIS • PostGIS • Open Source
>
> ___
> 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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-10 Thread kimaidou
Thanks Nyall,

I will build last master and check it asap.

Cheers,
Michaël

2016-05-10 6:25 GMT+02:00 Nyall Dawson <nyall.daw...@gmail.com>:

> On 10 May 2016 at 03:38, kimaidou <kimai...@gmail.com> wrote:
> > Hi
> >
> > I just tested with a freshly built QGIS release-2_14 , and the issue
> > remains.
> > The easiest way to reproduce is to zoom back and forth from big scales (
> ~
> > 1:25 000 ) to layer extent scale ( ~ 1:600 000 )
>
> Should be fixed by
>
> https://github.com/qgis/QGIS/commit/6b80518a5b55ab30fb19493266d5626d0f89d26b
>
> There was a leak in the OGR provider when a feature had null geometry
> and a filter rect was set on a feature request (such as when rendering
> a map).
>
> I also fixed another (potentially huge?) memory leak in the python code.
>
> Would appreciate testing and feedback on whether this has made a big
> difference for you!
>
> Nyall
>
> >
> > Good evening/morning
> > Michaël
> >
> > 2016-05-09 15:02 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>
> >> Hi Matthias,
> >>
> >> Not yet, I need to build QGIS master before being able to report back
> >> Thanks for your answer
> >>
> >> 2016-05-09 14:59 GMT+02:00 Matthias Kuhn <matth...@opengis.ch>:
> >>>
> >>> Have you tested with either the latest 2.14 nightly or master nightly?
> >>> An issue with OGR connection pooling has been resolved recently. And I
> >>> wonder if that could be related.
> >>>
> >>>  -- Matthias
> >>>
> >>>
> >>> On 05/09/2016 02:28 PM, kimaidou wrote:
> >>>
> >>> I created an issue about it : http://hub.qgis.org/issues/14792
> >>>
> >>> 2016-05-09 11:48 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>>>
> >>>> Hi again,
> >>>>
> >>>> I also forgot to mention that I have no memory leak when using the
> same
> >>>> dataset in PostGIS ( tested by importing the Shapefile in PostGIS with
> >>>> shape2pgsql )
> >>>>
> >>>> Michaël
> >>>>
> >>>> 2016-05-09 11:07 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>>>>
> >>>>> I forgot to mention the steps to reproduce the bug, and the
> precautions
> >>>>> to take :
> >>>>>
> >>>>> * open the project in QGIS 2.14 ( I have not tested with older
> >>>>> versions)
> >>>>>
> >>>>> * open a terminal and use this kind of command to monitor QGIS memory
> >>>>> consumption : htop, or ps with
> >>>>> watch -n1 'ps -aux --sort -pmem | head -5'
> >>>>>
> >>>>> * Navigate through the project by zooming in and out, pan, etc. I
> think
> >>>>> you emphasize the memory leak by displaying the layer at small scale
> ( with
> >>>>> many buildings displayed)
> >>>>>
> >>>>> * Be aware that this will increase the memory, so keep an eye on the
> >>>>> memory consumption so that your system has enough free memory to work
> >>>>> properly.
> >>>>>
> >>>>> Michaël
> >>>>>
> >>>>> 2016-05-09 11:00 GMT+02:00 kimaidou <kimai...@gmail.com>:
> >>>>>>
> >>>>>> Hi devs,
> >>>>>>
> >>>>>> I have just found a memory leak in QGIS Desktop (and server) with
> the
> >>>>>> project available in [1] ( a 20Mo tar.bz2 )
> >>>>>>
> >>>>>> This is a very simple project with only one buildings Shapefile (
> SHP
> >>>>>> 68Mo). This layer has been exported from PostGIS from a query wich
> aimed to
> >>>>>> simplify the building for fast rendering.
> >>>>>>
> >>>>>> The geometries have been simplified ( I used SnapToGrid, then
> >>>>>> (St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )
> >>>>>>
> >>>>>> The layers has ~ 700 000 features.
> >>>>>>
> >>>>>> Has anyone encoutered such a leak ?
> >>>>>>
> >>>>>> [1]
> >>>>>>
> https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=
> >>>>>>
> >>>>>> Cheers,
> >>>>>>
> >>>>>> Michaël
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>>
> >>> ___
> >>> 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
> >>>
> >>>
> >>> --
> >>> Matthias Kuhn
> >>> OPENGIS.ch - https://www.opengis.ch
> >>> Spatial • (Q)GIS • PostGIS • Open Source
> >>>
> >>>
> >>> ___
> >>> 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

Re: [Qgis-developer] Memory leak in QGIS 2.14 with a Shapefile

2016-05-09 Thread kimaidou
Hi

I just tested with a freshly built QGIS release-2_14 , and the issue
remains.
The easiest way to reproduce is to zoom back and forth from big scales ( ~
1:25 000 ) to layer extent scale ( ~ 1:600 000 )

Good evening/morning
Michaël

2016-05-09 15:02 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Hi Matthias,
>
> Not yet, I need to build QGIS master before being able to report back
> Thanks for your answer
>
> 2016-05-09 14:59 GMT+02:00 Matthias Kuhn <matth...@opengis.ch>:
>
>> Have you tested with either the latest 2.14 nightly or master nightly?
>> An issue with OGR connection pooling has been resolved recently. And I
>> wonder if that could be related.
>>
>>  -- Matthias
>>
>>
>> On 05/09/2016 02:28 PM, kimaidou wrote:
>>
>> I created an issue about it : <http://hub.qgis.org/issues/14792>
>> http://hub.qgis.org/issues/14792
>>
>> 2016-05-09 11:48 GMT+02:00 kimaidou <kimai...@gmail.com>:
>>
>>> Hi again,
>>>
>>> I also forgot to mention that I have no memory leak when using the same
>>> dataset in PostGIS ( tested by importing the Shapefile in PostGIS with
>>> shape2pgsql )
>>>
>>> Michaël
>>>
>>> 2016-05-09 11:07 GMT+02:00 kimaidou < <kimai...@gmail.com>
>>> kimai...@gmail.com>:
>>>
>>>> I forgot to mention the steps to reproduce the bug, and the precautions
>>>> to take :
>>>>
>>>> * open the project in QGIS 2.14 ( I have not tested with older versions)
>>>>
>>>> * open a terminal and use this kind of command to monitor QGIS memory
>>>> consumption : htop, or ps with
>>>> watch -n1 'ps -aux --sort -pmem | head -5'
>>>>
>>>> * Navigate through the project by zooming in and out, pan, etc. I think
>>>> you emphasize the memory leak by displaying the layer at small scale ( with
>>>> many buildings displayed)
>>>>
>>>> * Be aware that this will increase the memory, so keep an eye on the
>>>> memory consumption so that your system has enough free memory to work
>>>> properly.
>>>>
>>>> Michaël
>>>>
>>>> 2016-05-09 11:00 GMT+02:00 kimaidou < <kimai...@gmail.com>
>>>> kimai...@gmail.com>:
>>>>
>>>>> Hi devs,
>>>>>
>>>>> I have just found a memory leak in QGIS Desktop (and server) with the
>>>>> project available in [1] ( a 20Mo tar.bz2 )
>>>>>
>>>>> This is a very simple project with only one buildings Shapefile ( SHP
>>>>> 68Mo). This layer has been exported from PostGIS from a query wich aimed 
>>>>> to
>>>>> simplify the building for fast rendering.
>>>>>
>>>>> The geometries have been simplified ( I used SnapToGrid, then
>>>>> (St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )
>>>>>
>>>>> The layers has ~ 700 000 features.
>>>>>
>>>>> Has anyone encoutered such a leak ?
>>>>>
>>>>> [1]
>>>>> https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Michaël
>>>>>
>>>>
>>>>
>>>
>>
>>
>> ___
>> Qgis-developer mailing listqgis-develo...@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>> --
>> Matthias Kuhn
>> OPENGIS.ch - https://www.opengis.ch
>> Spatial • (Q)GIS • PostGIS • Open Source
>>
>>
>> ___
>> 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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-09 Thread kimaidou
Hi Matthias,

Not yet, I need to build QGIS master before being able to report back
Thanks for your answer

2016-05-09 14:59 GMT+02:00 Matthias Kuhn <matth...@opengis.ch>:

> Have you tested with either the latest 2.14 nightly or master nightly?
> An issue with OGR connection pooling has been resolved recently. And I
> wonder if that could be related.
>
>  -- Matthias
>
>
> On 05/09/2016 02:28 PM, kimaidou wrote:
>
> I created an issue about it : <http://hub.qgis.org/issues/14792>
> http://hub.qgis.org/issues/14792
>
> 2016-05-09 11:48 GMT+02:00 kimaidou <kimai...@gmail.com>:
>
>> Hi again,
>>
>> I also forgot to mention that I have no memory leak when using the same
>> dataset in PostGIS ( tested by importing the Shapefile in PostGIS with
>> shape2pgsql )
>>
>> Michaël
>>
>> 2016-05-09 11:07 GMT+02:00 kimaidou < <kimai...@gmail.com>
>> kimai...@gmail.com>:
>>
>>> I forgot to mention the steps to reproduce the bug, and the precautions
>>> to take :
>>>
>>> * open the project in QGIS 2.14 ( I have not tested with older versions)
>>>
>>> * open a terminal and use this kind of command to monitor QGIS memory
>>> consumption : htop, or ps with
>>> watch -n1 'ps -aux --sort -pmem | head -5'
>>>
>>> * Navigate through the project by zooming in and out, pan, etc. I think
>>> you emphasize the memory leak by displaying the layer at small scale ( with
>>> many buildings displayed)
>>>
>>> * Be aware that this will increase the memory, so keep an eye on the
>>> memory consumption so that your system has enough free memory to work
>>> properly.
>>>
>>> Michaël
>>>
>>> 2016-05-09 11:00 GMT+02:00 kimaidou < <kimai...@gmail.com>
>>> kimai...@gmail.com>:
>>>
>>>> Hi devs,
>>>>
>>>> I have just found a memory leak in QGIS Desktop (and server) with the
>>>> project available in [1] ( a 20Mo tar.bz2 )
>>>>
>>>> This is a very simple project with only one buildings Shapefile ( SHP
>>>> 68Mo). This layer has been exported from PostGIS from a query wich aimed to
>>>> simplify the building for fast rendering.
>>>>
>>>> The geometries have been simplified ( I used SnapToGrid, then
>>>> (St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )
>>>>
>>>> The layers has ~ 700 000 features.
>>>>
>>>> Has anyone encoutered such a leak ?
>>>>
>>>> [1]
>>>> https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=
>>>>
>>>> Cheers,
>>>>
>>>> Michaël
>>>>
>>>
>>>
>>
>
>
> ___
> Qgis-developer mailing listqgis-develo...@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> --
> Matthias Kuhn
> OPENGIS.ch - https://www.opengis.ch
> Spatial • (Q)GIS • PostGIS • Open Source
>
>
> ___
> 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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-09 Thread kimaidou
I created an issue about it : http://hub.qgis.org/issues/14792

2016-05-09 11:48 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Hi again,
>
> I also forgot to mention that I have no memory leak when using the same
> dataset in PostGIS ( tested by importing the Shapefile in PostGIS with
> shape2pgsql )
>
> Michaël
>
> 2016-05-09 11:07 GMT+02:00 kimaidou <kimai...@gmail.com>:
>
>> I forgot to mention the steps to reproduce the bug, and the precautions
>> to take :
>>
>> * open the project in QGIS 2.14 ( I have not tested with older versions)
>>
>> * open a terminal and use this kind of command to monitor QGIS memory
>> consumption : htop, or ps with
>> watch -n1 'ps -aux --sort -pmem | head -5'
>>
>> * Navigate through the project by zooming in and out, pan, etc. I think
>> you emphasize the memory leak by displaying the layer at small scale ( with
>> many buildings displayed)
>>
>> * Be aware that this will increase the memory, so keep an eye on the
>> memory consumption so that your system has enough free memory to work
>> properly.
>>
>> Michaël
>>
>> 2016-05-09 11:00 GMT+02:00 kimaidou <kimai...@gmail.com>:
>>
>>> Hi devs,
>>>
>>> I have just found a memory leak in QGIS Desktop (and server) with the
>>> project available in [1] ( a 20Mo tar.bz2 )
>>>
>>> This is a very simple project with only one buildings Shapefile ( SHP
>>> 68Mo). This layer has been exported from PostGIS from a query wich aimed to
>>> simplify the building for fast rendering.
>>>
>>> The geometries have been simplified ( I used SnapToGrid, then
>>> (St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )
>>>
>>> The layers has ~ 700 000 features.
>>>
>>> Has anyone encoutered such a leak ?
>>>
>>> [1]
>>> https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=
>>>
>>> Cheers,
>>>
>>> Michaël
>>>
>>
>>
>
___
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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-09 Thread kimaidou
Hi again,

I also forgot to mention that I have no memory leak when using the same
dataset in PostGIS ( tested by importing the Shapefile in PostGIS with
shape2pgsql )

Michaël

2016-05-09 11:07 GMT+02:00 kimaidou <kimai...@gmail.com>:

> I forgot to mention the steps to reproduce the bug, and the precautions to
> take :
>
> * open the project in QGIS 2.14 ( I have not tested with older versions)
>
> * open a terminal and use this kind of command to monitor QGIS memory
> consumption : htop, or ps with
> watch -n1 'ps -aux --sort -pmem | head -5'
>
> * Navigate through the project by zooming in and out, pan, etc. I think
> you emphasize the memory leak by displaying the layer at small scale ( with
> many buildings displayed)
>
> * Be aware that this will increase the memory, so keep an eye on the
> memory consumption so that your system has enough free memory to work
> properly.
>
> Michaël
>
> 2016-05-09 11:00 GMT+02:00 kimaidou <kimai...@gmail.com>:
>
>> Hi devs,
>>
>> I have just found a memory leak in QGIS Desktop (and server) with the
>> project available in [1] ( a 20Mo tar.bz2 )
>>
>> This is a very simple project with only one buildings Shapefile ( SHP
>> 68Mo). This layer has been exported from PostGIS from a query wich aimed to
>> simplify the building for fast rendering.
>>
>> The geometries have been simplified ( I used SnapToGrid, then
>> (St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )
>>
>> The layers has ~ 700 000 features.
>>
>> Has anyone encoutered such a leak ?
>>
>> [1]
>> https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=
>>
>> Cheers,
>>
>> Michaël
>>
>
>
___
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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-09 Thread kimaidou
I forgot to mention the steps to reproduce the bug, and the precautions to
take :

* open the project in QGIS 2.14 ( I have not tested with older versions)

* open a terminal and use this kind of command to monitor QGIS memory
consumption : htop, or ps with
watch -n1 'ps -aux --sort -pmem | head -5'

* Navigate through the project by zooming in and out, pan, etc. I think you
emphasize the memory leak by displaying the layer at small scale ( with
many buildings displayed)

* Be aware that this will increase the memory, so keep an eye on the memory
consumption so that your system has enough free memory to work properly.

Michaël

2016-05-09 11:00 GMT+02:00 kimaidou <kimai...@gmail.com>:

> Hi devs,
>
> I have just found a memory leak in QGIS Desktop (and server) with the
> project available in [1] ( a 20Mo tar.bz2 )
>
> This is a very simple project with only one buildings Shapefile ( SHP
> 68Mo). This layer has been exported from PostGIS from a query wich aimed to
> simplify the building for fast rendering.
>
> The geometries have been simplified ( I used SnapToGrid, then
> (St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )
>
> The layers has ~ 700 000 features.
>
> Has anyone encoutered such a leak ?
>
> [1]
> https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=
>
> Cheers,
>
> Michaël
>
___
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] Memory leak in QGIS 2.14 with a Shapefile

2016-05-09 Thread kimaidou
Hi devs,

I have just found a memory leak in QGIS Desktop (and server) with the
project available in [1] ( a 20Mo tar.bz2 )

This is a very simple project with only one buildings Shapefile ( SHP
68Mo). This layer has been exported from PostGIS from a query wich aimed to
simplify the building for fast rendering.

The geometries have been simplified ( I used SnapToGrid, then
(St_Dump(St_Union(a.geom)))  to remove as many nodes as possible )

The layers has ~ 700 000 features.

Has anyone encoutered such a leak ?

[1]
https://framadrop.org/r/_7VsZtvzdU#+eJHHPPOIdVcgj/AUp8V91T9m6gmO7/XCh6uOhzP7ro=

Cheers,

Michaël
___
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] Preserving joined fields in Processing outputs

2016-04-11 Thread kimaidou
Hi all

I think we could have an option to allow keeping the joined fields, uncheck
by default.
This way the user will be able to choose.

Cheers
Michaël

2016-04-11 15:57 GMT+02:00 roy roy :

> I think in general a tool should not overcome his own purpose,
> why does joins exists? to maintain data in different tables i think.
>
> my 2c. roy
>
> Il 11/04/2016 11.46, Alexander Bruy ha scritto:
> > Hi all,
> >
> > and sorry for cross-posting.
> >
> > When cleaning Processing bug queue I found issue [0] about preserving
> > joined fields in Procesing outputs. Before implementing this I want to
> hear
> > opinions, does it makes sense at all or better to leave things as is:
> output
> > layer contains only provider (non-joined, not virtual) fields from input
> layer?
> >
> > Thanks
> >
> > [0] https://hub.qgis.org/issues/12893
> >
>
> ___
> 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

  1   2   3   4   5   >