Re: [QGIS-Developer] [Qgis-user] CAD and QGIS - Working with archaeological sites

2018-08-09 Thread Denis Rouzaud
Hi Calvin,

Not sure it is exactly what you need, but I would have a look at two
plugins Olivier Dalang wrote some time ago
https://github.com/olivierdalang/VectorBender
https://github.com/olivierdalang/RasterBender

He is the original author of the advanced digitizing panel as a plugin.
These are QGIS 2 but it should not be a great effort to port them.

Cheers
Denis

Le ven. 10 août 2018 à 03:18, Nyall Dawson  a
écrit :

> On Fri, 10 Aug 2018 at 11:11, C Hamilton  wrote:
> >
> > Thanks!!! That is a good idea to use the layout panel.
> >
> > The advanced digitizing panel was the piece that I was missing. Yes the
> tools in QGIS 3 are much better.
>
> This is certainly a novel task to do in QGIS. I'd love to see a write
> up/case study/blog post detailing your experiences after you've
> finished!
>
> Nyall
>
> >
> > On Thu, Aug 9, 2018 at 7:49 PM, Nyall Dawson 
> wrote:
> >>
> >> On Fri, 10 Aug 2018 at 08:01, Alexandre Neto 
> wrote:
> >> >
> >> > Hi,
> >> >
> >> > On Thu, Aug 9, 2018, 22:27 C Hamilton  wrote:
> >> >>
> >> >>
> >> >> Also is there a way a non georegistered image be imported, make it
> somewhat transparent, and then interactively drag and resize it on the map
> somewhat like Google Earth? When you don't really have anything to
> reference the image to you can't use georeferencer.
> >> >
> >> >
> >> > I guess you could do that on layout mode. Adding an imagem, set some
> transparency and then try to fit it somewhere.
> >> >
> >> > Once it's on the right spot. Save the layout as image storing a world
> file. Then you can add it back, and use georeferencer on the original image.
> >>
> >> Actually if you save the world file you shouldn't need to use
> >> georeferencer - it should be placed in the correct place immediately
> >> after loading in QGIS.
> >>
> >> > I am not a CAD guy, so I would trace it using QGIS.
> >>
> >> Just to add to this - the digitizing tools in QGIS are very powerful
> >> now (especially with the new shape digitizing toolbar in 3.0, and the
> >> Advanced Digitizing dock. I'd go with that approach as doing it in the
> >> GIS means that it's inherently spatial data - vs doing it in CAD,
> >> which means you've gotta manage the spatial reference manually.
> >>
> >> 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

-- 

Denis Rouzaud
de...@opengis.ch  
+41 76 370 21 22
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] [Qgis-user] CAD and QGIS - Working with archaeological sites

2018-08-09 Thread Nyall Dawson
On Fri, 10 Aug 2018 at 11:11, C Hamilton  wrote:
>
> Thanks!!! That is a good idea to use the layout panel.
>
> The advanced digitizing panel was the piece that I was missing. Yes the tools 
> in QGIS 3 are much better.

This is certainly a novel task to do in QGIS. I'd love to see a write
up/case study/blog post detailing your experiences after you've
finished!

Nyall

>
> On Thu, Aug 9, 2018 at 7:49 PM, Nyall Dawson  wrote:
>>
>> On Fri, 10 Aug 2018 at 08:01, Alexandre Neto  wrote:
>> >
>> > Hi,
>> >
>> > On Thu, Aug 9, 2018, 22:27 C Hamilton  wrote:
>> >>
>> >>
>> >> Also is there a way a non georegistered image be imported, make it 
>> >> somewhat transparent, and then interactively drag and resize it on the 
>> >> map somewhat like Google Earth? When you don't really have anything to 
>> >> reference the image to you can't use georeferencer.
>> >
>> >
>> > I guess you could do that on layout mode. Adding an imagem, set some 
>> > transparency and then try to fit it somewhere.
>> >
>> > Once it's on the right spot. Save the layout as image storing a world 
>> > file. Then you can add it back, and use georeferencer on the original 
>> > image.
>>
>> Actually if you save the world file you shouldn't need to use
>> georeferencer - it should be placed in the correct place immediately
>> after loading in QGIS.
>>
>> > I am not a CAD guy, so I would trace it using QGIS.
>>
>> Just to add to this - the digitizing tools in QGIS are very powerful
>> now (especially with the new shape digitizing toolbar in 3.0, and the
>> Advanced Digitizing dock. I'd go with that approach as doing it in the
>> GIS means that it's inherently spatial data - vs doing it in CAD,
>> which means you've gotta manage the spatial reference manually.
>>
>> 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] [Qgis-user] CAD and QGIS - Working with archaeological sites

2018-08-09 Thread C Hamilton
Thanks!!! That is a good idea to use the layout panel.

The advanced digitizing panel was the piece that I was missing. Yes the
tools in QGIS 3 are much better.

On Thu, Aug 9, 2018 at 7:49 PM, Nyall Dawson  wrote:

> On Fri, 10 Aug 2018 at 08:01, Alexandre Neto 
> wrote:
> >
> > Hi,
> >
> > On Thu, Aug 9, 2018, 22:27 C Hamilton  wrote:
> >>
> >>
> >> Also is there a way a non georegistered image be imported, make it
> somewhat transparent, and then interactively drag and resize it on the map
> somewhat like Google Earth? When you don't really have anything to
> reference the image to you can't use georeferencer.
> >
> >
> > I guess you could do that on layout mode. Adding an imagem, set some
> transparency and then try to fit it somewhere.
> >
> > Once it's on the right spot. Save the layout as image storing a world
> file. Then you can add it back, and use georeferencer on the original image.
>
> Actually if you save the world file you shouldn't need to use
> georeferencer - it should be placed in the correct place immediately
> after loading in QGIS.
>
> > I am not a CAD guy, so I would trace it using QGIS.
>
> Just to add to this - the digitizing tools in QGIS are very powerful
> now (especially with the new shape digitizing toolbar in 3.0, and the
> Advanced Digitizing dock. I'd go with that approach as doing it in the
> GIS means that it's inherently spatial data - vs doing it in CAD,
> which means you've gotta manage the spatial reference manually.
>
> 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: Can two different plugins have a common processing provider?

2018-08-09 Thread Nyall Dawson
On Fri, 10 Aug 2018 at 02:31, Tejas L  wrote:
>
> Hello!
>
> We are releasing multiple QGIS3 plugins, each with their own processing 
> algorithms. We would like the processing algorithms of these plugins to 
> appear under a single Processing provider in the Processing toolbox. How can 
> we achieve this?
>

To clarify: Are you wanting the exact same provider to be included in
multiple plugins (with the same algorithms)

OR

A single provider, but multiple plugins which each add different sets
of algorithms to this same provider?

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] [Qgis-user] CAD and QGIS - Working with archaeological sites

2018-08-09 Thread Nyall Dawson
On Fri, 10 Aug 2018 at 08:01, Alexandre Neto  wrote:
>
> Hi,
>
> On Thu, Aug 9, 2018, 22:27 C Hamilton  wrote:
>>
>>
>> Also is there a way a non georegistered image be imported, make it somewhat 
>> transparent, and then interactively drag and resize it on the map somewhat 
>> like Google Earth? When you don't really have anything to reference the 
>> image to you can't use georeferencer.
>
>
> I guess you could do that on layout mode. Adding an imagem, set some 
> transparency and then try to fit it somewhere.
>
> Once it's on the right spot. Save the layout as image storing a world file. 
> Then you can add it back, and use georeferencer on the original image.

Actually if you save the world file you shouldn't need to use
georeferencer - it should be placed in the correct place immediately
after loading in QGIS.

> I am not a CAD guy, so I would trace it using QGIS.

Just to add to this - the digitizing tools in QGIS are very powerful
now (especially with the new shape digitizing toolbar in 3.0, and the
Advanced Digitizing dock. I'd go with that approach as doing it in the
GIS means that it's inherently spatial data - vs doing it in CAD,
which means you've gotta manage the spatial reference manually.

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] [Qgis-user] CAD and QGIS - Working with archaeological sites

2018-08-09 Thread Alexandre Neto
Hi,

On Thu, Aug 9, 2018, 22:27 C Hamilton  wrote:

>
> Also is there a way a non georegistered image be imported, make it
> somewhat transparent, and then interactively drag and resize it on the map
> somewhat like Google Earth? When you don't really have anything to
> reference the image to you can't use georeferencer.
>

I guess you could do that on layout mode. Adding an imagem, set some
transparency and then try to fit it somewhere.

Once it's on the right spot. Save the layout as image storing a world file.
Then you can add it back, and use georeferencer on the original image.

I am not a CAD guy, so I would trace it using QGIS.

Hope it helps,

Alexandre Neto


> Thanks,
>
> Calvin Hamilton
> ___
> Qgis-user mailing list
> qgis-u...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Alexandre Neto
-
@AlexNetoGeo
http://sigsemgrilhetas.wordpress.com
http://gisunchained.wordpress.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] CAD and QGIS - Working with archaeological sites

2018-08-09 Thread C Hamilton
I need to be able to trace out some old surveys of ancient Indian
earthworks such as:

http://scienceviews.com/squier/ancientmonuments3-19.html

I would like to have them properly scaled and then somehow import them into
QGIS. Because many of these sites have been destroyed we don't know
precisely where some are located. The ultimate goal is to use magnetometry
to help find them.

What I would like to do is to import the shape and then drag it around to
see where it best fits.

Any suggestions on how to do this? What can I draw it in and how to import
the shape and retain its proper dimensions?

Also is there a way a non georegistered image be imported, make it somewhat
transparent, and then interactively drag and resize it on the map somewhat
like Google Earth? When you don't really have anything to reference the
image to you can't use georeferencer.

Thanks,

Calvin Hamilton
___
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: Can two different plugins have a common processing provider?

2018-08-09 Thread Etienne Trimaille
I would say:
At plugin load time, check if your other plugins are already loaded. If
yes, don't load the processing provider, it's already loaded by the first
loaded plugin.

You need to use the same provider name (id). So your models won't be broken.

Don't forget to update each processing algorithms when you edit one file.

Le jeu. 9 août 2018 à 12:31, Tejas L  a écrit :

> Hello!
>
> We are releasing multiple QGIS3 plugins, each with their own processing
> algorithms. We would like the processing algorithms of these plugins to
> appear under a single Processing provider in the Processing toolbox. How
> can we achieve this?
>
> Regards,
> Tej
>
> ___
> 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-Developer Digest, Vol 154, Issue 15

2018-08-09 Thread Алексей Головизин
Всем привет! Я сейчас в отпуске, вернусь примерно 25 августа.

Интернет здесь возят на оленях, так что почту читаю редко и нерегулярно.

По всем вопросам можете писать Денису Нефёдову: nefedov...@mipt.ru

По вопросам разработки -- к Руслану Емельянову: rusla...@gmail.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] Plugin [135] mmqgis approval notification.

2018-08-09 Thread noreply

Plugin mmqgis approval by pcav.
The plugin version "[135] mmqgis 2018.8.9" is now approved
Link: http://plugins.qgis.org/plugins/mmqgis/
___
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-Developer Digest, Vol 154, Issue 14

2018-08-09 Thread Алексей Головизин
Всем привет! Я сейчас в отпуске, вернусь примерно 25 августа.

Интернет здесь возят на оленях, так что почту читаю редко и нерегулярно.

По всем вопросам можете писать Денису Нефёдову: nefedov...@mipt.ru

По вопросам разработки -- к Руслану Емельянову: rusla...@gmail.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] QGIS3: Can two different plugins have a common processing provider?

2018-08-09 Thread Tejas L
Hello!

We are releasing multiple QGIS3 plugins, each with their own processing 
algorithms. We would like the processing algorithms of these plugins to appear 
under a single Processing provider in the Processing toolbox. How can we 
achieve this?

Regards,
Tej

___
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] How to create a simple processing script in QGIS 3.x, eg just a buffer

2018-08-09 Thread Andrew C
Hi Anita,

Thanks very much for this. I am still lost though. If I replace the sink
and add your code I don't get an output in the dialog box - it needs to be
a parameter for that to happen right?

I found this
https://gis.stackexchange.com/questions/282773/writing-a-python-processing-script-with-qgis-3-0
which lead me to this
https://github.com/qgis/QGIS/blob/master/doc/porting_processing.dox

Which is recommending "Best practice in 3.x Processing algorithms is to use
"feature sinks" instead of vector layer outputs"


Kind Regards
Andrew



On Thu, Aug 9, 2018 at 2:23 PM Anita Graser  wrote:

> Hi Andrew,
>
> On Thu, Aug 9, 2018 at 2:57 PM Andrew C  wrote:
>
>> I am not clear on how QgsFeatureSinkis working, perhaps that is why I am
>> not getting the buffered layer? Normally in a script I could try printing
>> variables I cannot see where these are printed either when I tested.
>>
>
> I think you'd need an output layer instead of a feature sink. Have a look
> at
> https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py
>
> self.addOutput(QgsProcessingOutputVectorLayer(
>
> self.OUTPUT,
>
> self.tr("Output layer"),
>
> QgsProcessing.TypeVectorAnyGeometry))
>
> Regards,
> Anita
>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Alessandro Pasotti
On Thu, Aug 9, 2018 at 5:05 PM, Tom Elwertowski 
wrote:

> The directory found by CMake 
> (/System/Library/Frameworks/OpenCL.framework/Headers/)
> contains only .h files.
>
> The khronos site mentioned by Denis offers cl.hpp for v1 and cl2.hpp for
> v2. qgsopenclutils.h includes cl2.hpp.
>
> Should I download and try cl.hpp on my mac?


Sorry but I don't know if that will work (I'm not a mac user), what I know
is that you need cl2.hpp (note that this header supports 1.1 and 1.0) in
order to build QGIS with opencl support and you also need the opencl
library to link to.

Once you've built it, to actually run opencl stuff you need (one or more)
other runtime library that is hardware (intel, AMD, NVidia etc.) and system
dependent and it is dynamically loaded by opencl library.



> If it compiles, how can I test running it.
>


There are tests in the tests folder that you can build and run,
specifically: qgsninecellsfiltertest.cpp and qgsopenclutilstest.cpp

You can also open the QGIS options dialog and check under "Acceleration":
see
https://user-images.githubusercontent.com/142164/43066104-08b6880e-8e64-11e8-8a46-103e368119e5.png

As you can see in the picture OpenCL supported version of that particular
library is 1.1


Let me know how it goes!




>
> Tom
>
>
> On 8/9/18 10:12 AM, Denis Rouzaud wrote:
>
>> I think the issue is that there is no header installed on mac
>> https://stackoverflow.com/a/23079478/1548052
>>
>> Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti > > a écrit :
>>
>> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski
>> mailto:telwertow...@comcast.net>> wrote:
>>
>> Hi all,
>>
>> A recent change added OpenCL. Compilation fails on macOS because
>> Apple provides v1.2 (macOS 10.13) while QGIS seems to require v2.
>>
>>
>> That's wierd: 1.1 is what should be required can you file a ticket
>> and provide full logs?
>>
>> Adding a version to FIND_PACKAGE will fix the macOS compile and
>> not use OpenCL.
>>
>> Apple has deprecated OpenCL in favor of its own Metal
>> technology. OpenCL will remain for macOS 10.14 (Mojave, fall
>> 2018) but may be removed after fall 2019.
>>
>> For the future, either OpenCL must remain an optional QGIS
>> feature in order to support macOS or the API needs to be
>> abstracted so that macOS can use Metal while other OSs use OpenCL.
>>
>>
>>
>> OpenCL is an optional feature and there is no plan to change that.
>>
>>
>>
>> Tom
>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> 
>> List info: https://lists.osgeo.org/mailma
>> n/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailma
>> n/listinfo/qgis-developer
>>
>>
>>
>>
>> -- Alessandro Pasotti
>> w3: www.itopen.it 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org > >
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> --
>>
>> Denis Rouzaud
>> de...@opengis.ch 
>> +41 76 370 21 22
>>
>>
>>


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

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Tom Elwertowski
The directory found by CMake 
(/System/Library/Frameworks/OpenCL.framework/Headers/) contains only .h 
files.


The khronos site mentioned by Denis offers cl.hpp for v1 and cl2.hpp for 
v2. qgsopenclutils.h includes cl2.hpp.


Should I download and try cl.hpp on my mac? If it compiles, how can I 
test running it.


Tom


On 8/9/18 10:12 AM, Denis Rouzaud wrote:

I think the issue is that there is no header installed on mac
https://stackoverflow.com/a/23079478/1548052

Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti > a écrit :


On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski
mailto:telwertow...@comcast.net>> wrote:

Hi all,

A recent change added OpenCL. Compilation fails on macOS because
Apple provides v1.2 (macOS 10.13) while QGIS seems to require v2. 




That's wierd: 1.1 is what should be required can you file a ticket
and provide full logs?

Adding a version to FIND_PACKAGE will fix the macOS compile and
not use OpenCL.

Apple has deprecated OpenCL in favor of its own Metal
technology. OpenCL will remain for macOS 10.14 (Mojave, fall
2018) but may be removed after fall 2019.

For the future, either OpenCL must remain an optional QGIS
feature in order to support macOS or the API needs to be
abstracted so that macOS can use Metal while other OSs use OpenCL.



OpenCL is an optional feature and there is no plan to change that.



Tom
LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org

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




-- 
Alessandro Pasotti

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

--

Denis Rouzaud
de...@opengis.ch 
+41 76 370 21 22



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

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Denis Rouzaud
I would just make it disable by default on mac for the moment.


Le jeu. 9 août 2018 à 16:12, Denis Rouzaud  a
écrit :

> I think the issue is that there is no header installed on mac
> https://stackoverflow.com/a/23079478/1548052
>
> Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti  a
> écrit :
>
>> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski > > wrote:
>>
>>> Hi all,
>>>
>>> A recent change added OpenCL. Compilation fails on macOS because Apple
>>> provides v1.2 (macOS 10.13) while QGIS seems to require v2.
>>
>>
>>
>> That's wierd: 1.1 is what should be required can you file a ticket and
>> provide full logs?
>>
>>
>>
>>> Adding a version to FIND_PACKAGE will fix the macOS compile and not use
>>> OpenCL.
>>>
>>> Apple has deprecated OpenCL in favor of its own Metal technology. OpenCL
>>> will remain for macOS 10.14 (Mojave, fall 2018) but may be removed after
>>> fall 2019.
>>>
>>> For the future, either OpenCL must remain an optional QGIS feature in
>>> order to support macOS or the API needs to be abstracted so that macOS can
>>> use Metal while other OSs use OpenCL.
>>>
>>
>>
>> OpenCL is an optional feature and there is no plan to change that.
>>
>>
>>
>>
>>>
>>> Tom
>>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>>
>> --
>> Alessandro Pasotti
>> w3:   www.itopen.it
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> --
>
> Denis Rouzaud
> de...@opengis.ch  
> +41 76 370 21 22
>
>
> --

Denis Rouzaud
de...@opengis.ch  
+41 76 370 21 22
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Denis Rouzaud
I think the issue is that there is no header installed on mac
https://stackoverflow.com/a/23079478/1548052

Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti  a
écrit :

> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski 
> wrote:
>
>> Hi all,
>>
>> A recent change added OpenCL. Compilation fails on macOS because Apple
>> provides v1.2 (macOS 10.13) while QGIS seems to require v2.
>
>
>
> That's wierd: 1.1 is what should be required can you file a ticket and
> provide full logs?
>
>
>
>> Adding a version to FIND_PACKAGE will fix the macOS compile and not use
>> OpenCL.
>>
>> Apple has deprecated OpenCL in favor of its own Metal technology. OpenCL
>> will remain for macOS 10.14 (Mojave, fall 2018) but may be removed after
>> fall 2019.
>>
>> For the future, either OpenCL must remain an optional QGIS feature in
>> order to support macOS or the API needs to be abstracted so that macOS can
>> use Metal while other OSs use OpenCL.
>>
>
>
> OpenCL is an optional feature and there is no plan to change that.
>
>
>
>
>>
>> Tom
>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 

Denis Rouzaud
de...@opengis.ch  
+41 76 370 21 22
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Alessandro Pasotti
On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski 
wrote:

> Hi all,
>
> A recent change added OpenCL. Compilation fails on macOS because Apple
> provides v1.2 (macOS 10.13) while QGIS seems to require v2.



That's wierd: 1.1 is what should be required can you file a ticket and
provide full logs?



> Adding a version to FIND_PACKAGE will fix the macOS compile and not use
> OpenCL.
>
> Apple has deprecated OpenCL in favor of its own Metal technology. OpenCL
> will remain for macOS 10.14 (Mojave, fall 2018) but may be removed after
> fall 2019.
>
> For the future, either OpenCL must remain an optional QGIS feature in
> order to support macOS or the API needs to be abstracted so that macOS can
> use Metal while other OSs use OpenCL.
>


OpenCL is an optional feature and there is no plan to change that.




>
> Tom
> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




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

[QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Tom Elwertowski

Hi all,

A recent change added OpenCL. Compilation fails on macOS because Apple 
provides v1.2 (macOS 10.13) while QGIS seems to require v2. Adding a 
version to FIND_PACKAGE will fix the macOS compile and not use OpenCL.


Apple has deprecated OpenCL in favor of its own Metal technology. OpenCL 
will remain for macOS 10.14 (Mojave, fall 2018) but may be removed after 
fall 2019.


For the future, either OpenCL must remain an optional QGIS feature in 
order to support macOS or the API needs to be abstracted so that macOS 
can use Metal while other OSs use OpenCL.


Tom
LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
___
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] How to create a simple processing script in QGIS 3.x, eg just a buffer

2018-08-09 Thread Anita Graser
Hi Andrew,

On Thu, Aug 9, 2018 at 2:57 PM Andrew C  wrote:

> I am not clear on how QgsFeatureSinkis working, perhaps that is why I am
> not getting the buffered layer? Normally in a script I could try printing
> variables I cannot see where these are printed either when I tested.
>

I think you'd need an output layer instead of a feature sink. Have a look
at
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py

self.addOutput(QgsProcessingOutputVectorLayer(

self.OUTPUT,

self.tr("Output layer"),

QgsProcessing.TypeVectorAnyGeometry))

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

[QGIS-Developer] How to create a simple processing script in QGIS 3.x, eg just a buffer

2018-08-09 Thread Andrew C
Hi All,

Can someone offer me some guidance on the new scripting process in QGIS 3x?

If I take the create script from template option and make some very minor
changes (below), why am I not writing a buffer? The script will execute
with no errors, is this line buffered_layer =
processing.run("native:buffer",.. even being run?

The lines I have changed from the template are show with ###

I am not clear on how QgsFeatureSinkis working, perhaps that is why I am
not getting the buffered layer? Normally in a script I could try printing
variables I cannot see where these are printed either when I tested.

Ultimately I'd like to expand the script, but first I am hoping to just be
able to call a simple buffer.

Thanks in advance for any help

Kind Regards
Andrew



"""
***
* *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or *
*   (at your option) any later version.   *
* *
***
"""

from PyQt5.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
   QgsFeatureSink,
   QgsProcessingException,
   QgsProcessingAlgorithm,
   QgsProcessingParameterFeatureSource,
   QgsProcessingParameterFeatureSink)
import processing


class ExampleProcessingAlgorithm(QgsProcessingAlgorithm):
"""
This is an example algorithm that takes a vector layer and
creates a new identical one.

It is meant to be used as an example of how to create your own
algorithms and explain methods and variables used to do it. An
algorithm like this will be available in all elements, and there
is not need for additional work.

All Processing algorithms should extend the QgsProcessingAlgorithm
class.
"""

# Constants used to refer to parameters and outputs. They will be
# used when calling the algorithm from another algorithm, or when
# calling from the QGIS console.

INPUT = 'INPUT'
OUTPUT = 'OUTPUT'

def tr(self, string):
"""
Returns a translatable string with the self.tr() function.
"""
return QCoreApplication.translate('Processing', string)

def createInstance(self):
return ExampleProcessingAlgorithm()

def name(self):
"""
Returns the algorithm name, used for identifying the algorithm. This
string should be fixed for the algorithm, and must not be localised.
The name should be unique within each provider. Names should contain
lowercase alphanumeric characters only and no spaces or other
formatting characters.
"""
return 'myscript'

def displayName(self):
"""
Returns the translated algorithm name, which should be used for any
user-visible display of the algorithm name.
"""
return self.tr('My Script')

def group(self):
"""
Returns the name of the group this algorithm belongs to. This string
should be localised.
"""
return self.tr('Example scripts')

def groupId(self):
"""
Returns the unique ID of the group this algorithm belongs to. This
string should be fixed for the algorithm, and must not be localised.
The group id should be unique within each provider. Group id should
contain lowercase alphanumeric characters only and no spaces or
other
formatting characters.
"""
return 'examplescripts'

def shortHelpString(self):
"""
Returns a localised short helper string for the algorithm. This
string
should provide a basic description about what the algorithm does
and the
parameters and outputs associated with it..
"""
return self.tr("Example algorithm short description")

def initAlgorithm(self, config=None):
"""
Here we define the inputs and output of the algorithm, along
with some other properties.
"""

# We add the input vector features source. It can have any kind of
# geometry.
self.addParameter(
QgsProcessingParameterFeatureSource(
self.INPUT,
self.tr('Input layer'),
[QgsProcessing.TypeVectorAnyGeometry]
)
)

# We add a feature sink in which to store our processed features
(this
# usually takes the form of a newly created vector layer when the
# algorithm is run in QGIS).
self.addParameter(

Re: [QGIS-Developer] GeoPackages with constraint problems

2018-08-09 Thread Mark Johnson
>> Executing PRAGMA foreign_keys = ON
This is also done for Spatialite in the SpatialiteProvider, so this is not
a general GeoPackage issue.

The need to keep this on is important, since the TRIGGERS enforces the
'sanity' of the data (such as same srid and geometry-type rules).

Also the Database-Designer can add there own rules, make a general, semi
automatic  'repair' routines basically impossible.

Mark
___
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] GeoPackages with constraint problems

2018-08-09 Thread Even Rouault
On jeudi 9 août 2018 07:07:10 CEST Matthias Kuhn wrote:
> Thanks Even,
> 
> Executing PRAGMA foreign_keys = ON sounds interesting, one thing we'll
> then need to check on the relation editing end is that we make proper
> use of deferred foreign key constraints.
> 
> What do you think about the way to go concerning handling broken files?
> The current situation is that there's very limited information for a
> user concerning the problems and it requires advanced sqlite skills to
> investigate and fix those problems. I am a bit worried that this might
> impact overall acceptance of gpkg.
> 
> * It looks like the error message is around (since it's in the message
> log), so that's mostly a visibility / UI problem
> * There is no clear "path of action" for a user. It would be nice to
> offer to open the dataset anyway when that happens. Is it possible to
> prevent OGR from running the PRAGMA foreign_key_check?

Yep, this is indicated in the GDAL error message ;-) : set the 
OGR_GPKG_FOREIGN_KEY_CHECK configuration option to NO

CPLSetConfigOption("OGR_GPKG_FOREIGN_KEY_CHECK", "NO"); (or as environment 
variable)

This check is done because of requirement 7 of http://www.geopackage.org/spec/
"""
The SQLite PRAGMA foreign_key_check SQL with no parameter value SHALL return 
an empty result set indicating no invalid foreign key values for a GeoPackage 
file.
"""

One way would be to systematically set OGR_GPKG_FOREIGN_KEY_CHECK=NO and after 
the file is open run GDALDatasetExecuteSQL("pragma foreign_key_check"). If it 
returns an empty layer, then fine, otherwise emit a warning to the user.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.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] Build error: output/bin/crssync: Permission denied

2018-08-09 Thread tao
I found pre-compiled qgis-2.18.17 had a problem under OpenBSD 6.3 mentioned
in following thread 
http://openbsd-archive.7691.n7.nabble.com/Probelm-when-building-QGIS-td347994.html


So I have to build QGIS myself. 
Some problems were encountered, but I succeeded to fix them. 

However, I can not figure out the following errors: 

[ 35%] Built target gpxprovider 
Scanning dependencies of target synccrsdb 
/bin/sh: ../../output/bin/crssync: Permission denied 
*** Error 1 in . (src/crssync/CMakeFiles/synccrsdb.dir/build.make:57
'src/crssync/CMakeFiles/synccrsdb': cd /home/tao/Software/qgis/build-2) 
*** Error 2 in . (CMakeFiles/Makefile2:2732
'src/crssync/CMakeFiles/synccrsdb.dir/all') 
*** Error 2 in /home/tao/Software/qgis/build-2.18.22 (Makefile:163 'all') 

I totally did this under user mode, and permission right is okay like: 

tao$ ./crssync 
ksh: ./crssync: Permission denied 
tao$ ls -l ./crssync   
-rwxr-xr-x  1 tao  tao  23149 Aug  9 14:18 ./crssync 

This really beat me. 

Anyone can help? 
Thanks a lot!



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

Re: [QGIS-Developer] Save project in Python

2018-08-09 Thread Nyall Dawson
On Wed, 8 Aug 2018 at 23:58, Kasper  wrote:
> self.map_canvas = QgsMapCanvas()
> 
> self.map_canvas.setDestinationCrs(QgsCoordinateReferenceSystem("epsg:4326"))
>
> self.project = QgsProject()

Insert here:

self.project.writeProject.connect(self.map_canvas.writeProject)

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] GRASS r.kappa not working in QGIS plugin

2018-08-09 Thread Nyall Dawson
On Mon, 6 Aug 2018 at 17:38, Sophie Crommelinck
 wrote:
>
> I just noted that everything works fine, when the module r.kappa is run once 
> manually via the toolbox in QGIS before running the plugin. When I open QGIS 
> (I am using the latest QGIS 3.3.0 nightly build version) and run the plugin 
> directly, the GRASS module r.kappa in the plugin doesn't work. When I open 
> QGIS, run r.kappa via the toolbox and run the plugin then, the GRASS module 
> r.kappa in the plugin works fine. Not sure how to fix this.
>
> Best,
> Sophie
>
> On Mon, 6 Aug 2018 at 08:10, Sophie Crommelinck 
>  wrote:
>>
>> Hello,
>>
>>
>> I am working on a QGIS plugin, that should use the module r.kappa from 
>> GRASS. It looks like this in my plugin source code:
>>
>> processing.run('grass7:r.kappa',
>>{"classification": classificationLayer,
>> "reference": referenceLayer,
>> "title": 'ACCURACY ASSESSMENT',
>> "-h": False,
>> "-w": False,
>> "GRASS_REGION_CELLSIZE_PARAMETER": cellSize,
>> "GRASS_REGION_PARAMETER": None,
>> "output": outputFile})
>>
>> As an error, I get a QgsProcessingException saying 'There were errors 
>> executing the algorithm'.

Can you try putting somewhere near the start of your script:

from processing.algs.grass7.Grass7Utils import Grass7Utils
assert Grass7Utils.installedVersion()

And see if the assert passes, and whether that fixes your issue?

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] Difference in area calculation using memory vs output layer

2018-08-09 Thread Nyall Dawson
On Wed, 8 Aug 2018 at 18:06, Rudi von Staden  wrote:

>
> I did also calculate a range of zonal stats on the layer (which has only one 
> multipolygon feature), but those results were consistent between output / 
> memory layers.
>
> Is the area difference expected because of how shapefiles store geometry vs 
> how they are handled by memory layers, or could there be a bug somewhere? 
> Maybe this isn't the recommended way to calculate area? In case it matters, 
> I'm using a custom CRS:
>
> "+proj=aea +lat_1=-24 +lat_2=-32 +lat_0=0 +lon_0=24 +x_0=0 +y_0=0 
> +datum=WGS84 +units=m +no_defs"

This may be a silly question -- but can you confirm that both layers
are definitely in the same CRS?

If so, I'd try exporting the two geometries to WKT and inspect for
differences. I can't think of any other reason for the area to be
different! (Since you're directly calculating the euclidean area
ellipsoid settings won't come into play, which is the most common
source of "different area calculations").

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