Re: [Qgis-developer] Processing tests for gdal:extractprojection -> no output file

2017-01-12 Thread Nyall Dawson
On 13 January 2017 at 00:18, matteo  wrote:
> Hi Matthias,
>
> thanks for the complete answer.
>
> However I added the qgis:createspatialindex algorithm that does not
> produce any output (but it is still "linked" to the input layer) and the
> test runs fine with the parameter

There's already a test for this - see

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

Basically you need to flag that an algorithm modifies a given dataset
in place by adding the 'in_place: true' line to an input dataset.
Then, you also need to indicate that the result file should match the
modified in place dataset by adding 'in_place_result: true' to the
expected result.

This is all done manually - the 'create test' option in the processing
log doesn't have anyway to automatically handle this.

Doing this allows the processing test to know that it needs to make a
temporary copy of the input dataset, run the alg, and then compare
results against the modified input dataset. So basically it tests both
that the algorithm ran and also checks that the results are as
expected.

Nyall




>
> result: {}
>
> in this way I thought it is possible to check the output (without
> testing it) but testing the algorithm itself, i.e. the algorithm runs
> fine and creates the output.
>
>
> Thanks again for the availability
>
> Cheers
>
> Matteo
> ___
> 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] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Tom Chadwin
This looks ideal. Thanks, both. Plus I could make ExactIntersect an option in
the GUI, as sometimes dotted could be more critical than accuracy.

Thanks again

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Create-memory-layer-containing-only-features-visible-in-current-canvas-extent-tp5303218p5303246.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

Re: [Qgis-developer] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Martin Dobias
Hi Tom

Try something like this:

request = QgsFeatureRequest(iface.mapCanvas().extent())
request.setFlags(QgsFeatureRequest.ExactIntersect)
for f in layer.getFeatures(r):
  print f.id()

This feature request will only use features that intersect canvas
view. The extra flag ExactIntersect is there to make sure that true
intersection test is done, rather just doing fast intersection of
geometry's bounding box with the canvas extent recangle.

Cheers
Martin

On Fri, Jan 13, 2017 at 12:07 AM, Tom Chadwin  wrote:
> Hello all
>
> I currently create a memory layer from an existing layer as follows
> ('usedFields' is a subset of the original layer's attributes/fields):
>
> newlayer = QgsVectorLayer(uri, layer.name(), 'memory')
> writer = newlayer.dataProvider()
> outFeat = QgsFeature()
> for feature in layer.getFeatures():
> if feature.geometry() is not None:
> outFeat.setGeometry(feature.geometry())
> attrs = [feature[f] for f in usedFields]
> if attrs:
> outFeat.setAttributes(attrs)
> writer.addFeatures([outFeat])
>
> What is the best way to add only features visible in the current QGIS view
> of the canvas, rather than every feature in the layer?
>
> Thanks
>
> Tom
>
>
>
> -
> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/Create-memory-layer-containing-only-features-visible-in-current-canvas-extent-tp5303218.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] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Matthias Kuhn
http://www.qgis.org/api/classQgsFeatureRequest.html#ac7c734b9cab6939a706ea53040afe6b3

that might help

On January 12, 2017 5:20:07 PM GMT+01:00, Tom Chadwin  
wrote:
>I've found this method:
>
>viewportPolygon =
>QgsGeometry().fromWkt(iface.mapCanvas().extent().asWktPolygon())
>layer = iface.activeLayer()
>
>resultlayer = QgsVectorLayer("Polygon", "result", "memory")
>resultlayer.dataProvider().addAttributes(list(layer.dataProvider().fields()))
>
>clippedFeatures = []
>for feature in layer.dataProvider().getFeatures():
>clippedGeometry = feature.geometry().intersection(viewportPolygon)
>
>
>From http://gis.stackexchange.com/a/74471/36921
>
>However, this loops through all features. I'm concerned that this will
>struggle with large layers. Is there a more efficient method?
>
>
>
>-
>Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
>--
>View this message in context:
>http://osgeo-org.1560.x6.nabble.com/Create-memory-layer-containing-only-features-visible-in-current-canvas-extent-tp5303218p5303223.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

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.___
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] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Paolo Cavallini
Il 12/01/2017 17:20, Tom Chadwin ha scritto:

> However, this loops through all features. I'm concerned that this will
> struggle with large layers. Is there a more efficient method?

I guess that's unsuitable for layers of millions of records.
all the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Tom Chadwin
I've found this method:

viewportPolygon =
QgsGeometry().fromWkt(iface.mapCanvas().extent().asWktPolygon())
layer = iface.activeLayer()

resultlayer = QgsVectorLayer("Polygon", "result", "memory")
resultlayer.dataProvider().addAttributes(list(layer.dataProvider().fields()))

clippedFeatures = []
for feature in layer.dataProvider().getFeatures():
clippedGeometry = feature.geometry().intersection(viewportPolygon)


From http://gis.stackexchange.com/a/74471/36921

However, this loops through all features. I'm concerned that this will
struggle with large layers. Is there a more efficient method?



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Create-memory-layer-containing-only-features-visible-in-current-canvas-extent-tp5303218p5303223.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] Create memory layer containing only features visible in current canvas extent

2017-01-12 Thread Tom Chadwin
Hello all

I currently create a memory layer from an existing layer as follows
('usedFields' is a subset of the original layer's attributes/fields):

newlayer = QgsVectorLayer(uri, layer.name(), 'memory')
writer = newlayer.dataProvider()
outFeat = QgsFeature()
for feature in layer.getFeatures():
if feature.geometry() is not None:
outFeat.setGeometry(feature.geometry())
attrs = [feature[f] for f in usedFields]
if attrs:
outFeat.setAttributes(attrs)
writer.addFeatures([outFeat])

What is the best way to add only features visible in the current QGIS view
of the canvas, rather than every feature in the layer?

Thanks

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Create-memory-layer-containing-only-features-visible-in-current-canvas-extent-tp5303218.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

Re: [Qgis-developer] Processing tests for gdal:extractprojection -> no output file

2017-01-12 Thread Matthias Kuhn
Hi Matteo,

I never tested this kind of smoke tests. Best to check yourself if it
works. Add a line that will raise an excpetion in an algorithm and check
if the test fails. Something like `int('oops')` as first line in
processAlgorithm() should do the trick.

You are right, there's no html file. I guess in this case it's even on
purpose that the .wld file has the same name as the original file and
another smoke test is ok. I was just thinking about an .html file based
on the content of your first message.

Matthias

On 01/12/2017 04:47 PM, matteo wrote:
> Hi Matthias,
> 
>> Adding a simple "smoke test" for createspatialindex sounds fine. One
>> that does not check results but rings the alarm if an exception is thrown.
> 
> ok fine.. just to be sure that there is the chance to just check the
> algorithm run without checking the result
> 
>> In the case of extractprojection that would work as well of course.
>> But if you are at it already, I think it's better to do things properly.
>>
>> I think there is a html file created which could be
>> * checked for correctness in a test
>> * and potentially used as input for other algorithms
> 
> I only see a dem.wld file created (or a dem.prj if the prj checkbox is
> selected) no html fiels around here
> 
>>
>> so I think that's a different case and it should be fairly simple to fix
>> the algorithm.
> 
> so are you suggesting to fix somehow the algorithm or the test related
> to the it?
> 
> Thanks again
> 
> Matteo
> 
___
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 tests for gdal:extractprojection -> no output file

2017-01-12 Thread matteo


binVxSo9af26K.bin
Description: PGP/MIME version identification


encrypted.asc
Description: OpenPGP encrypted message
___
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 tests for gdal:extractprojection -> no output file

2017-01-12 Thread Matthias Kuhn
Hi Matteo,

Not sure if I can follow, was that another question?

Adding a simple "smoke test" for createspatialindex sounds fine. One
that does not check results but rings the alarm if an exception is thrown.

In the case of extractprojection that would work as well of course.
But if you are at it already, I think it's better to do things properly.

I think there is a html file created which could be
* checked for correctness in a test
* and potentially used as input for other algorithms

so I think that's a different case and it should be fairly simple to fix
the algorithm.

Best
Matthias

On 01/12/2017 03:18 PM, matteo wrote:
> Hi Matthias,
> 
> thanks for the complete answer.
> 
> However I added the qgis:createspatialindex algorithm that does not
> produce any output (but it is still "linked" to the input layer) and the
> test runs fine with the parameter
> 
> result: {}
> 
> in this way I thought it is possible to check the output (without
> testing it) but testing the algorithm itself, i.e. the algorithm runs
> fine and creates the output.
> 
> 
> Thanks again for the availability
> 
> Cheers
> 
> Matteo
> 
___
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 tests for gdal:extractprojection -> no output file

2017-01-12 Thread matteo
Hi Matthias,

thanks for the complete answer.

However I added the qgis:createspatialindex algorithm that does not
produce any output (but it is still "linked" to the input layer) and the
test runs fine with the parameter

result: {}

in this way I thought it is possible to check the output (without
testing it) but testing the algorithm itself, i.e. the algorithm runs
fine and creates the output.


Thanks again for the availability

Cheers

Matteo
___
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] Processing tests for gdal:extractprojection -> no output file

2017-01-12 Thread Matthias Kuhn
Hi Matteo,

A quick look at the algorithm code shows, that there is no output with
the name OUTPUT defined in the algorithm. The name of the output file is
determined based on the input file.

There is no logic in place to handle such a case without writing custom
test logic (i.e. no yaml based test).

I wonder if it wouldn't be better to effectively "fix" the algorithm so
it will write the result to a defined location (configurable with an
output parameter). As far as I can tell, it's impossible to use the
output of this algorithm as input in another algorithm in a model the
way it currently stands.

Best regards
Matthias

On 01/11/2017 12:06 PM, matteo wrote:
> Hi Matthias (again),
> I'm facing some troubles with some gdal test in Processing when the
> output of the algorithm is a file and is not an html file (e.g. extract
> projection alg).
> 
> The output of the test is:
> 
>   - algorithm: gdal:extractprojection
> name: Test (gdal:extractprojection)
> params:
>   INPUT:
> name: dem.tif
> type: raster
>   PRJ_FILE: true
> results: {}
> 
> 
> so i changed the result row in order to match (as regex) the single line
> of the prj file
> 
> results:
>   OUTPUT:
> name: expected/gdal/dem.html
> type: regex
> rules:
>  -
> 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]'
> 
> 
> but when I run the test, I always get this error:
> 
> : Traceback (most recent call last):
> 5:   File
> "/home/matteo/lavori/QGIS/QGIS/python/plugins/processing/tests/AlgorithmsTestBase.py",
> line 124, in check_algorithm
> 5: self.check_results(alg.getOutputValuesAsDictionary(),
> defs['params'], defs['results'])
> 5:   File
> "/home/matteo/lavori/QGIS/QGIS/python/plugins/processing/tests/AlgorithmsTestBase.py",
> line 255, in check_results
> 5: with open(results[id], 'r') as file:
> 5: KeyError: 'OUTPUT'
> 
> 
> 
> do ypu have any idea on how to solve this?
> 
> 
> Thanks again for your time!
> 
> Cheers
> 
> Matteo
> 
___
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] Renaming QML (style file) to something else

2017-01-12 Thread Nathan Woodrow
Yeah it shoud keep loading them find, in the end it's just the extension
that changes.

On Thu, Jan 12, 2017 at 9:17 PM, Alessandro Pasotti 
wrote:

>
> On Thu, Jan 12, 2017 at 12:12 PM, Alexander Bruy  > wrote:
>
>> Before proceeding with changes, which suffix should we choose?
>> For me QLP proposed by Alexandre Neto looks more suitable, as
>> currently .qml contains not only styling setting. So we can leave
>> QSL for future when/if we decide to export only style/labeling
>> settings into shareable file.
>>
>>
>
> What do you think about leaving QML for some time as a (deprecated)
> recognized extension for import?
>
> I'm worried about users not being able to import their old style QML files.
>
>
>
>
>
>> 2017-01-11 15:52 GMT+02:00 Alexandre Neto :
>> > +1
>> >
>> > qlp - Qgis layer properties
>> >
>> > Luigi Pirelli  escreveu no dia quarta, 11/01/2017 às
>> > 10:12:
>> >>
>> >> .qdl - Qgis Description Language
>> >> .qrl - Qgis Representation Language
>> >>
>> >> ad more ;)
>> >>
>> >> .qoogle - Qgis Oniric Open General Language Expression
>> >> .qdal - QGis Descript All Language
>> >> Luigi Pirelli
>> >>
>> >>
>> >> 
>> **
>> >> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
>> >> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>> >> * Stackexchange: http://gis.stackexchange.com/u
>> sers/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 11 January 2017 at 07:27, Nathan Woodrow 
>> wrote:
>> >> > As the QML has now turned into more then just style I think a full
>> >> > rename is
>> >> > in order for what it is, which is really all the layer properties.
>> >> >
>> >> > We can then have a new file type for just style information.
>> >> >
>> >> >
>> >> > On Wed, 11 Jan 2017 4:25 pm Alexander Bruy > >
>> >> > wrote:
>> >> >>
>> >> >> Hi all,
>> >> >>
>> >> >> Seems suffix we use for QGIS style files (QML) conflicts with
>> >> >> QtQuick/QtQML files which have same QML suffix. This results to
>> wrong
>> >> >> file associations and wrong icons, see for example [0].
>> >> >>
>> >> >> Should we rename our QML files to something else like QSL, QMM or
>> >> >> something else?
>> >> >>
>> >> >> [0] https://github.com/qgis/QGIS/pull/3266
>> >> >>
>> >> >> --
>> >> >> Alexander Bruy
>> >> >> ___
>> >> >> 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
>> >
>> > --
>> > Alexandre Neto
>> > -
>> > @AlexNetoGeo
>> > http://sigsemgrilhetas.wordpress.com
>> > http://gisunchained.wordpress.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
>>
>>
>>
>> --
>> Alexander Bruy
>> ___
>> 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
>>
>
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>
> ___
> 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] Renaming QML (style file) to something else

2017-01-12 Thread Alexandre Neto
Just checked and QLP is the extention for some printer drivers files. Not
sure if that's a big problem or not.

A qui, 12/01/2017, 11:12, Alexander Bruy 
escreveu:

> Before proceeding with changes, which suffix should we choose?
> For me QLP proposed by Alexandre Neto looks more suitable, as
> currently .qml contains not only styling setting. So we can leave
> QSL for future when/if we decide to export only style/labeling
> settings into shareable file.
>
> 2017-01-11 15:52 GMT+02:00 Alexandre Neto :
> > +1
> >
> > qlp - Qgis layer properties
> >
> > Luigi Pirelli  escreveu no dia quarta, 11/01/2017 às
> > 10:12:
> >>
> >> .qdl - Qgis Description Language
> >> .qrl - Qgis Representation Language
> >>
> >> ad more ;)
> >>
> >> .qoogle - Qgis Oniric Open General Language Expression
> >> .qdal - QGis Descript All Language
> >> 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 11 January 2017 at 07:27, Nathan Woodrow 
> wrote:
> >> > As the QML has now turned into more then just style I think a full
> >> > rename is
> >> > in order for what it is, which is really all the layer properties.
> >> >
> >> > We can then have a new file type for just style information.
> >> >
> >> >
> >> > On Wed, 11 Jan 2017 4:25 pm Alexander Bruy 
> >> > wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> Seems suffix we use for QGIS style files (QML) conflicts with
> >> >> QtQuick/QtQML files which have same QML suffix. This results to wrong
> >> >> file associations and wrong icons, see for example [0].
> >> >>
> >> >> Should we rename our QML files to something else like QSL, QMM or
> >> >> something else?
> >> >>
> >> >> [0] https://github.com/qgis/QGIS/pull/3266
> >> >>
> >> >> --
> >> >> Alexander Bruy
> >> >> ___
> >> >> 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
> >
> > --
> > Alexandre Neto
> > -
> > @AlexNetoGeo
> > http://sigsemgrilhetas.wordpress.com
> > http://gisunchained.wordpress.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
>
>
>
> --
> Alexander Bruy
>
-- 
Alexandre Neto
-
@AlexNetoGeo
http://sigsemgrilhetas.wordpress.com
http://gisunchained.wordpress.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

Re: [Qgis-developer] Symbolizing a discrete or a boolean raster

2017-01-12 Thread Alexandre Neto
Great, thanks!

A qui, 12/01/2017, 10:44, Stéphane Henriod  escreveu:

> Hi all
>
> upon advice from Andreas, I started a formal description of the
> requirements for such a feature:
>
>
> https://docs.google.com/document/d/1cDemM2m88_mbs65sYzfBbVdHI_ObOjf_i35ne3OKsRs/edit?usp=sharing
>
> Please, anyone interested, do check, comment, add, correct,... Once we
> have a "final" version, I will inquire a more precise financial estimation.
> Then let's see how we can move forward!
>
> Thanks and cheers
>
> Stéphane
>
>
> Le jeudi 12 janvier 2017, Stéphane Henriod  a
> écrit :
>
> Hi Alexandre
>
> (also posting on user-)
>
> I 100% agree with you and I would love to somehow give back to QGIS (I did
> already, but at a small scale).
>
> I mostly wanted to know if I am the only one to wish for this feature.
> Apparently not the case: many have expressed the same wish!
>
> Now funding: I would love to have a rough idea what "not very expensive"
> means. If there are any dev around who could have the interest / skills to
> implement this feature, can we somehow go concrete and work together on a
> feature description and tentative budget? The situation is obviously very
> different if we talk about 1.000 or 20.000€
>
> Cheers
>
> Stéphane
>
>
> Le jeudi 12 janvier 2017, Alexandre Neto  a écrit :
>
> Hello Stéphane,
>
> IMHO, since it seems that you are not able/willing to sponsor the feature
> yourself, sounds like a good opportunity for a small crowdfunding.
>
> That way you would be able to contribute back to QGIS by giving your time
> in finding a developer able to do it, setting up the crowdfunding,
> advertise it, pay for part of it and so on.
>
> It looks like a simple feature. it should not be very expensive (much less
> than an ArcGIS license for sure), and if you think many people need this,
> then the money will be easy to raise.
>
> Alexandre Neto
>
> Stéphane Henriod  escreveu no dia quarta,
> 11/01/2017 às 11:37:
>
> One last message for today (sorry for spamming!)
>
> It seems that this feature would actually be wished by "many" people (see
> the ticket and the talks on user-). I just gave a try to 2.99-nightly and,
> as far as I can see, nothing has been done in this direction (yet?).
>
> I am wondering if there are massive challenges that I am overlooking or if
> this could be implemented quite easily. In any case, do you think this is a
> request that can be taken on to 3.0?
>
> Thanks a lot to all the devs here... I feel quite bad for asking for a new
> feature while not having the competences to contribute a tiny bit to its
> development but I really feel this is one of the few major missing features
> in QGIS right now (and will be happy to help on the feature requirements,
> the tests, etc.).
>
> All the best!
>
> Stéphane
>
>
> Le mercredi 11 janvier 2017, Stéphane Henriod  a
> écrit :
>
> Hi again
>
> it seems that the requirements are related (although not 100% similar) to
> this other open (and assigned) ticket: http://hub.qgis.org/issues/14449
>
> I really hope to see this very needed feature in a coming version of QGIS
> and happy to help wherever I can!
>
> Cheers
>
> Stéphane
>
>
> Le mardi 10 janvier 2017, Stéphane Henriod  a
> écrit :
>
> Hi
>
> let me move here a request that has been shortly discussed on the
> user-mailing list:
> http://lists.osgeo.org/pipermail/qgis-user/2017-January/038793.html
> http://lists.osgeo.org/pipermail/qgis-user/2017-January/038795.html
> http://lists.osgeo.org/pipermail/qgis-user/2017-January/038801.html
>
> and for which a ticket is open:
> http://hub.qgis.org/issues/14845
>
> I was said that some work has been done in this direction for 3.0 but I
> don't know if it completely covers the feature request
>
> --
>
> When styling a discrete or boolean raster, there seems to be no direct
> method, only a few workarounds. The feature I dream of would do the
> following:
>
>- A new render type "Discrete raster"
>- One button allows to fetch all unique values form the raster (with a
>warning message if there are more than XXX unique values)
>- A color ramp is applied by default
>- I can multi-select values and apply them the same style and / or the
>same label
>- I can remove values. The pixels with those values will simply not be
>displayed
>- I can save my color map and load an existing color map
>
> So pretty much like the ArcGIS implementation:
> http://resources.arcgis.com/en/help/main/10.1/index.html#/representing_unique_categories_such_as_land_use/009t007400/
>
> The current limitations I see (in 2.14):
>
>- The discrete values must be entered manually, which is a pain for a
>raster with many unique values (or if I don't know in advance what all
>values are)
>- If I click on *Classify*, QGIS will choose X values (based on the
>number of classes and the classification method (continuous or equal
>interval)), which no longer match the "exact" values of my raster. It
>

Re: [Qgis-developer] Renaming QML (style file) to something else

2017-01-12 Thread Alessandro Pasotti
On Thu, Jan 12, 2017 at 12:12 PM, Alexander Bruy 
wrote:

> Before proceeding with changes, which suffix should we choose?
> For me QLP proposed by Alexandre Neto looks more suitable, as
> currently .qml contains not only styling setting. So we can leave
> QSL for future when/if we decide to export only style/labeling
> settings into shareable file.
>
>

What do you think about leaving QML for some time as a (deprecated)
recognized extension for import?

I'm worried about users not being able to import their old style QML files.





> 2017-01-11 15:52 GMT+02:00 Alexandre Neto :
> > +1
> >
> > qlp - Qgis layer properties
> >
> > Luigi Pirelli  escreveu no dia quarta, 11/01/2017 às
> > 10:12:
> >>
> >> .qdl - Qgis Description Language
> >> .qrl - Qgis Representation Language
> >>
> >> ad more ;)
> >>
> >> .qoogle - Qgis Oniric Open General Language Expression
> >> .qdal - QGis Descript All Language
> >> 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 11 January 2017 at 07:27, Nathan Woodrow 
> wrote:
> >> > As the QML has now turned into more then just style I think a full
> >> > rename is
> >> > in order for what it is, which is really all the layer properties.
> >> >
> >> > We can then have a new file type for just style information.
> >> >
> >> >
> >> > On Wed, 11 Jan 2017 4:25 pm Alexander Bruy 
> >> > wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> Seems suffix we use for QGIS style files (QML) conflicts with
> >> >> QtQuick/QtQML files which have same QML suffix. This results to wrong
> >> >> file associations and wrong icons, see for example [0].
> >> >>
> >> >> Should we rename our QML files to something else like QSL, QMM or
> >> >> something else?
> >> >>
> >> >> [0] https://github.com/qgis/QGIS/pull/3266
> >> >>
> >> >> --
> >> >> Alexander Bruy
> >> >> ___
> >> >> 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
> >
> > --
> > Alexandre Neto
> > -
> > @AlexNetoGeo
> > http://sigsemgrilhetas.wordpress.com
> > http://gisunchained.wordpress.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
>
>
>
> --
> Alexander Bruy
> ___
> 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
>



-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] Renaming QML (style file) to something else

2017-01-12 Thread Nathan Woodrow
I like QLP for QGIS Layer Properties

On Thu, Jan 12, 2017 at 9:12 PM, Alexander Bruy 
wrote:

> Before proceeding with changes, which suffix should we choose?
> For me QLP proposed by Alexandre Neto looks more suitable, as
> currently .qml contains not only styling setting. So we can leave
> QSL for future when/if we decide to export only style/labeling
> settings into shareable file.
>
> 2017-01-11 15:52 GMT+02:00 Alexandre Neto :
> > +1
> >
> > qlp - Qgis layer properties
> >
> > Luigi Pirelli  escreveu no dia quarta, 11/01/2017 às
> > 10:12:
> >>
> >> .qdl - Qgis Description Language
> >> .qrl - Qgis Representation Language
> >>
> >> ad more ;)
> >>
> >> .qoogle - Qgis Oniric Open General Language Expression
> >> .qdal - QGis Descript All Language
> >> 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 11 January 2017 at 07:27, Nathan Woodrow 
> wrote:
> >> > As the QML has now turned into more then just style I think a full
> >> > rename is
> >> > in order for what it is, which is really all the layer properties.
> >> >
> >> > We can then have a new file type for just style information.
> >> >
> >> >
> >> > On Wed, 11 Jan 2017 4:25 pm Alexander Bruy 
> >> > wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> Seems suffix we use for QGIS style files (QML) conflicts with
> >> >> QtQuick/QtQML files which have same QML suffix. This results to wrong
> >> >> file associations and wrong icons, see for example [0].
> >> >>
> >> >> Should we rename our QML files to something else like QSL, QMM or
> >> >> something else?
> >> >>
> >> >> [0] https://github.com/qgis/QGIS/pull/3266
> >> >>
> >> >> --
> >> >> Alexander Bruy
> >> >> ___
> >> >> 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
> >
> > --
> > Alexandre Neto
> > -
> > @AlexNetoGeo
> > http://sigsemgrilhetas.wordpress.com
> > http://gisunchained.wordpress.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
>
>
>
> --
> Alexander Bruy
>
___
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] Renaming QML (style file) to something else

2017-01-12 Thread Alexander Bruy
Before proceeding with changes, which suffix should we choose?
For me QLP proposed by Alexandre Neto looks more suitable, as
currently .qml contains not only styling setting. So we can leave
QSL for future when/if we decide to export only style/labeling
settings into shareable file.

2017-01-11 15:52 GMT+02:00 Alexandre Neto :
> +1
>
> qlp - Qgis layer properties
>
> Luigi Pirelli  escreveu no dia quarta, 11/01/2017 às
> 10:12:
>>
>> .qdl - Qgis Description Language
>> .qrl - Qgis Representation Language
>>
>> ad more ;)
>>
>> .qoogle - Qgis Oniric Open General Language Expression
>> .qdal - QGis Descript All Language
>> 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 11 January 2017 at 07:27, Nathan Woodrow  wrote:
>> > As the QML has now turned into more then just style I think a full
>> > rename is
>> > in order for what it is, which is really all the layer properties.
>> >
>> > We can then have a new file type for just style information.
>> >
>> >
>> > On Wed, 11 Jan 2017 4:25 pm Alexander Bruy 
>> > wrote:
>> >>
>> >> Hi all,
>> >>
>> >> Seems suffix we use for QGIS style files (QML) conflicts with
>> >> QtQuick/QtQML files which have same QML suffix. This results to wrong
>> >> file associations and wrong icons, see for example [0].
>> >>
>> >> Should we rename our QML files to something else like QSL, QMM or
>> >> something else?
>> >>
>> >> [0] https://github.com/qgis/QGIS/pull/3266
>> >>
>> >> --
>> >> Alexander Bruy
>> >> ___
>> >> 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
>
> --
> Alexandre Neto
> -
> @AlexNetoGeo
> http://sigsemgrilhetas.wordpress.com
> http://gisunchained.wordpress.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



-- 
Alexander Bruy
___
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] Symbolizing a discrete or a boolean raster

2017-01-12 Thread Stéphane Henriod
Hi all

upon advice from Andreas, I started a formal description of the
requirements for such a feature:

https://docs.google.com/document/d/1cDemM2m88_mbs65sYzfBbVdHI_ObOjf_i35ne3OKsRs/edit?usp=sharing

Please, anyone interested, do check, comment, add, correct,... Once we have
a "final" version, I will inquire a more precise financial estimation. Then
let's see how we can move forward!

Thanks and cheers

Stéphane


Le jeudi 12 janvier 2017, Stéphane Henriod  a écrit :

> Hi Alexandre
>
> (also posting on user-)
>
> I 100% agree with you and I would love to somehow give back to QGIS (I did
> already, but at a small scale).
>
> I mostly wanted to know if I am the only one to wish for this feature.
> Apparently not the case: many have expressed the same wish!
>
> Now funding: I would love to have a rough idea what "not very expensive"
> means. If there are any dev around who could have the interest / skills to
> implement this feature, can we somehow go concrete and work together on a
> feature description and tentative budget? The situation is obviously very
> different if we talk about 1.000 or 20.000€
>
> Cheers
>
> Stéphane
>
>
> Le jeudi 12 janvier 2017, Alexandre Neto  > a écrit :
>
>> Hello Stéphane,
>>
>> IMHO, since it seems that you are not able/willing to sponsor the feature
>> yourself, sounds like a good opportunity for a small crowdfunding.
>>
>> That way you would be able to contribute back to QGIS by giving your time
>> in finding a developer able to do it, setting up the crowdfunding,
>> advertise it, pay for part of it and so on.
>>
>> It looks like a simple feature. it should not be very expensive (much
>> less than an ArcGIS license for sure), and if you think many people need
>> this, then the money will be easy to raise.
>>
>> Alexandre Neto
>>
>> Stéphane Henriod  escreveu no dia quarta,
>> 11/01/2017 às 11:37:
>>
>>> One last message for today (sorry for spamming!)
>>>
>>> It seems that this feature would actually be wished by "many" people
>>> (see the ticket and the talks on user-). I just gave a try to 2.99-nightly
>>> and, as far as I can see, nothing has been done in this direction (yet?).
>>>
>>> I am wondering if there are massive challenges that I am overlooking or
>>> if this could be implemented quite easily. In any case, do you think this
>>> is a request that can be taken on to 3.0?
>>>
>>> Thanks a lot to all the devs here... I feel quite bad for asking for a
>>> new feature while not having the competences to contribute a tiny bit to
>>> its development but I really feel this is one of the few major missing
>>> features in QGIS right now (and will be happy to help on the feature
>>> requirements, the tests, etc.).
>>>
>>> All the best!
>>>
>>> Stéphane
>>>
>>>
>>> Le mercredi 11 janvier 2017, Stéphane Henriod  a
>>> écrit :
>>>
 Hi again

 it seems that the requirements are related (although not 100% similar)
 to this other open (and assigned) ticket:
 http://hub.qgis.org/issues/14449

 I really hope to see this very needed feature in a coming version of
 QGIS and happy to help wherever I can!

 Cheers

 Stéphane


 Le mardi 10 janvier 2017, Stéphane Henriod  a
 écrit :

> Hi
>
> let me move here a request that has been shortly discussed on the
> user-mailing list:
> http://lists.osgeo.org/pipermail/qgis-user/2017-January/038793.html
> http://lists.osgeo.org/pipermail/qgis-user/2017-January/038795.html
> http://lists.osgeo.org/pipermail/qgis-user/2017-January/038801.html
>
> and for which a ticket is open:
> http://hub.qgis.org/issues/14845
>
> I was said that some work has been done in this direction for 3.0 but
> I don't know if it completely covers the feature request
>
> --
>
> When styling a discrete or boolean raster, there seems to be no direct
> method, only a few workarounds. The feature I dream of would do the
> following:
>
>- A new render type "Discrete raster"
>- One button allows to fetch all unique values form the raster
>(with a warning message if there are more than XXX unique values)
>- A color ramp is applied by default
>- I can multi-select values and apply them the same style and / or
>the same label
>- I can remove values. The pixels with those values will simply
>not be displayed
>- I can save my color map and load an existing color map
>
> So pretty much like the ArcGIS implementation:
> http://resources.arcgis.com/en/help/main/10.1/index.html#/re
> presenting_unique_categories_such_as_land_use/009t007400/
>
> The current limitations I see (in 2.14):
>
>- The discrete values must be entered manually, which is a pain
>for a raster with many unique values (or if I don't know in advance 
> what
>all values are)
>- If I click on *Classify*, QG

[Qgis-developer] No GRASS7 In Processing in QGIS master

2017-01-12 Thread matteo
Hi devs,

when I try to run a GRASS algorithm with Processing the following
message appears:

super-class __init__() of type MessageBarProgress was never called See
log for more details


and then the default message that GRASS is not found on the system:

This algorithm cannot be run :-(
It seems that GRASS GIS 7 is not correctly installed and configured in
your system. Please install it before running GRASS GIS 7 algorithms.


GRASS is correctly detected when running cmake:

-- Found GRASS 7: /usr/lib/grass72 (7.2.0, off_t size = 8)

and I can normally use it as standalone.

Are there some issues with my installation or is that a global issue?

Thanks!

Matteo

___
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] Plugin [995] dzetsaka : Classification tool approval notification.

2017-01-12 Thread noreply

Plugin dzetsaka : Classification tool approval by pcav.
The plugin version "[995] dzetsaka : Classification tool 2.3.1" is now approved
Link: http://plugins.qgis.org/plugins/dzetsaka/
___
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