Re: [QGIS-Developer] Vector destination vs feature sink

2022-10-22 Thread Thomas Gratier via QGIS-Developer
Hi,

Although, I do know the intend to recommend one against the other, doing
some code differences helps to sort out things.
They both inherits from same classes but the constructor for
QgsProcessingParameterFeatureSink accepts an additionnal arg bool
supportsAppend
<https://api.qgis.org/api/3.22/classQgsProcessingParameterFeatureSink.html#acae2863d5dab37aec4c5466d7d3a84d9>
=false

You also find the additional methods in QgsProcessingParameterFeatureSink
to manipulate the same supportsAppend.

```
a = QgsProcessingParameterVectorDestination(
  'OUTPUT',
  'Sortie'
)

b = QgsProcessingParameterFeatureSink(
  'OUTPUT',
  'Sortie'
)

methods_a = dir(a)
methods_b = dir(b)
common_methods = set(methods_a).intersection(methods_b)
print(common_methods)

only_in_a = set(methods_a).difference(methods_b)
print(only_in_a)

only_in_b = set(methods_b).difference(methods_a)
print(only_in_b)
```

Regards

Thomas Gratier

Le ven. 21 oct. 2022 à 18:07, Anita Graser via QGIS-Developer <
qgis-developer@lists.osgeo.org> a écrit :

> Thank you Stefan,
>
> I saw that note but was hoping some developer could shed light on what
> they mean by "more flexible" and "wherever possible". I guess otherwise
> it's just trial and error.
>
> Regards,
> Anita
>
>
> On Wednesday, 19. October 2022 07:44:05 (+02:00), Stefan Giese
> (WhereGroup) wrote:
>
> Hi Anita,
>
> they are very similar, but the API Documentation says to
> QgsProcessingParameterVectorDestination: "Note: Consider using the more
> flexible QgsProcessingParameterFeatureSink
> <https://api.qgis.org/api/3.22/classQgsProcessingParameterFeatureSink.html>
> wherever possible." (
> https://api.qgis.org/api/3.22/classQgsProcessingParameterVectorDestination.html#details
> )
>
> Best regards
>
> Stefan
> Am 18.10.2022 um 20:35 schrieb Anita Graser via QGIS-Developer:
>
> Hi.
>
> Does any one of you know the real difference between
> QgsProcessingParameterVectorDestination versus
> QgsProcessingParameterFeatureSink? They seem to be used interchangably in
> the resources I can find.
>
> Thank you.
>
> Anita
>
> ___
> 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
>
> --
> Mit freundlichen Grüßen
> Stefan Giese
> Projektleiter/Consultant
> -
> Aufwind durch Wissen!
> Jetzt neu: Web-Seminare und Online-Schulungen
> bei der www.foss-academy.com
> -
> WhereGroup GmbH
> Schwimmbadstr. 2
> 79100 Freiburg
> Germany
>
> Tel.: +49 (0)761 / 519 102 - 61
> Fax: +49 (0)761 / 519 102 - 11
> stefan.gi...@wheregroup.comwww.wheregroup.com
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
>
>
> --
> --
> Anita Graser
> Home: http://anitagraser.com
> Twitter: @underdarkgis
> ___
> QGIS-Developer mailing list
> 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] OSGEO4W and fully reproducible open source build recipes?

2022-02-17 Thread Thomas Gratier
Hi,

*## The context*:

OSGEO4W  is not mentioned to install GDAL at
https://gdal.org/download.html#binaries
I want to add it to the doc e.g
https://lists.osgeo.org/pipermail/gdal-dev/2022-February/055460.html
I posted here as Jürgen Fischer is lurking around this mailing list and I
was not sure the best place was here or the repo
https://github.com/jef-n/OSGeo4W to get an answer concerning below
requirements for docs on GDAL side (already got an answer for gisinternal
part on the original post)

*## Answer in the mailing list *(following my question):

> One criterion currently for inclusion is: "In this section we list a
> number of the binary distributions of GDAL all of which should have
> fully reproducible open source build recipes."
>
> I've not evaluated what the current situation of OSGeo4W or gisinternals
> is regarding this, especially regarding all direct and indirect
> dependencies of GDAL (or course, that must stop at the compiler level
> when using Visual Studio). I believe nowadays OSGeo4W must be closer to
> that aim of having fully reproducible builds, but I'm not sure to which
> extent. For gisinternals I'm not sure. It was my impression that the
> build recipees for the dependencies were not available, but maybe I'm
> wrong. I'll let the developers of those distributions comment further if
> they wish.
>
> Even


Thanks for your feedback if any


Regards

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


Re: [QGIS-Developer] Qgis 3.20 x Windows 7

2021-08-06 Thread Thomas Gratier
Hi Jorge,

QGIS Windows installers use now Python 3.9 as stated in
https://qgis.org/fr/site/forusers/download.html
Also, as stated in the same link when clicking on Windows.

*CAUTION:* Windows 7 no longer works as we are now using Python 3.9,
which dropped support for it.

That explains why QGIS 3.20 does not work as expected on Windows 7. Use
"old OSGeo4W" installers to install QGIS 3.16 with older Python version as
QGIS 3.20 is only available with new installer and a Python version
incompatible with Windows 7.


Regards

Thomas

Le jeu. 5 août 2021 à 14:08,  a écrit :

> Hi folks,
>
>
>
> Is Qgis 3.20 not compatible with windows 7?
>
> Is that true?
>
> I installed it yesterday and have no processing tool or python command
> line working!
>
> Did I do something wrong?
>
>
>
> Regards,
>
>
>
> Jorge Almerio
>
>
> ___
> QGIS-Developer mailing list
> 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] Using environment variables in QGIS.ini

2021-07-11 Thread Thomas Gratier
Hi,

I'm not aware QSettings provided by Qt can do it. Your %APPDATA% is not
portable as would only work on Windows

You can always try generate the QGIS.ini file using a templating system

File QGIS.ini.j2 with following content

Configuration\MODELS_FOLDER={{APPDATA}}\\QGIS\\QGIS3\\profiles\\default\\processing\\models
Configuration\SCRIPTS_FOLDERS={{APPDATA}}\\QGIS\\QGIS3\\profiles\\default\\processing\\scripts


File generate_ini.py with following content

import os
import jinja2

templateLoader = jinja2.FileSystemLoader(searchpath="./")
templateEnv = jinja2.Environment(loader=templateLoader)
TEMPLATE_FILE = "QGIS.ini.j2"
template = templateEnv.get_template(TEMPLATE_FILE)
mydict = {
"APPDATA": os.environ.get("APPDATA")
}
outputText = template.render(**mydict)
with open('QGIS.ini', 'w') as outputfile:
outputfile.write(outputText)

Then, to write your QGIS.ini file, do


python3 generate_ini.py


The possible deal breakers with this approach are:
- you depend from jinja2, a third party Python library,
- you can't later reuse the mechanism if for instance QGIS changes the
QGIS.ini file later on


Regards

Thomas


Le mar. 6 juil. 2021 à 09:18, Bo Victor Thomsen 
a écrit :

> To the list -
>
> Is there a method to use OS (Linux, Windows...) environment variables in
> the QGIS.ini setup file ?
>
> I had a number of customers asking for a method to "generalize" QGIS.ini,
> so it doesn't contain any "user" specific file and directory references, i.e
>
> (From qgis.ini)
>
> Configuration\MODELS_FOLDER=*C:\\Users\\Bo Victor
> Thomsen\\AppData\\Roaming*
> \\QGIS\\QGIS3\\profiles\\default\\processing\\models
> Configuration\SCRIPTS_FOLDERS=*C:\\Users\\Bo Victor
> Thomsen\\AppData\\Roaming*
> \\QGIS\\QGIS3\\profiles\\default\\processing\\scripts
>
> could be:
>
> Configuration\MODELS_FOLDER=*%APPDATA%*
> \\QGIS\\QGIS3\\profiles\\default\\processing\\models
> Configuration\SCRIPTS_FOLDERS=*%APPDATA%*
> \\QGIS\\QGIS3\\profiles\\default\\processing\\scripts
>
> or likewise.
>
> The ultimate reason is to have a method to distribute a "standard" setup
> for QGIS, complete with plugins and specialized setup parameters. This can
> be done by making a standard QGIS installation (which the IT departments
> love, especially with the new .msi package) and afterwards replace the
> "default" profile directory with at  directory specific for the
> organisation. However, the process of making the new profile will place a
> lot of file/directory references in QGIS.ini that is specific for the
> super-user developing the new profile.
>
> --
> Med venlig hilsen / Kind regards
>
> Bo Victor Thomsen
>
> ___
> QGIS-Developer mailing list
> 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 export in GeoJson with option RFC7946=True

2020-11-27 Thread Thomas Gratier
Hi,

You should run the following considering you selected a vector layer

from qgis.core import QgsVectorFileWriter

layer = iface.activeLayer()
QgsVectorFileWriter.writeAsVectorFormat(layer, '/tmp/out.geojson', 'utf-8',
layer.crs(), 'GeoJSON', layerOptions=['RFC7946=True'])

Regards

Thomas Gratier


Le mer. 25 nov. 2020 à 18:47, PALMIER Patrick (Responsable de groupe) -
CEREMA/DTerNP/DATHa/MT  a écrit :

> Hello,
>
> I'm using Qgis 3.14.16 with WIndows 10
>
> I'm trying in a python script to export a layer in geojSon with the
> option RFC7946=True
> It works well with the gui, but I don't know how to write it in a python
> script
> Is there someone who could send me a sample of code which do this
>
>
> Thanks
>
>
> Patrick
>
> ___
> QGIS-Developer mailing list
> 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: how to start the Temporal Animation?

2020-08-27 Thread Thomas Gratier
Hi,

Could be wrong but you may need to "sync" canvas with your
QgsTemporalController e.g below method

iface.mapCanvas().setTemporalController(yourTemporalControllerInstance)


Regards

Thomas


Le jeu. 27 août 2020 à 13:48, Richard Duivenvoorde  a
écrit :

> On 8/27/20 12:45 PM, Richard Duivenvoorde wrote:
> > Hi,
> >
> > I'm registring a Temporal Layer fine now, but want to start the
> 'Temporal Controller' to start via PyQGIS (in a plugin).
> >
> > This class: QgsTemporalNavigationObject has the 'play()' methods etc.
> >
> > The QgsTemporalControllerWidget returns a temporalController..
> >
> > So I was guessing I need to ask current Temporal Widget to hand me it's
> controller or navigation object to be able to start to 'play'.
>
> Ok, just found out that I can get the temporalController of the MapCanvas,
> and then at least play and stop the animations:
>
> c = iface.mapCanvas().temporalController()
> c.setFrameDuration(2)
> c.rewindToStart()
> #c.skipToEnd()
> #c.next()
> #c.previous()
> c.playForward()
>
> But on this instance of QgsTemporalController, I can NOT
> see https://qgis.org/pyqgis/master/core/QgsTemporalNavigationObject.html
> use
> c.setTemporalExtents(range)
> or ask for the extents
> c.setTemporalExtents()
> or set the framerate
> c.setFramesPerSecond(2.0)
> etc:
>
> anybody can enlighten me?
>
> Regards,
>
> Richard
> ___
> QGIS-Developer mailing list
> 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] Programmaticaly open the Log Panel

2019-03-01 Thread Thomas Gratier
Hi,

Richard, the following works although restricted to opening the MessageLog
panel

iface.openMessageLog()


Thomas

Le mar. 26 févr. 2019 à 09:06, Tejas L  a écrit :

> Hi Richard,
>
> That worked perfectly, thanks!
>
> When developing plugins I always find myself opening the Log window and
> the Python console, after I start up QGIS. It would be nice to have a way
> to save the panel layout. At the moment though, your code snippet is
> sufficient for my needs.
>
> Regards,
> Tej
>
> --
> *From:* Richard Duivenvoorde 
> *Sent:* Tuesday, February 26, 2019 3:19 AM
> *To:* qgis-developer@lists.osgeo.org
> *Cc:* tej...@live.com
> *Subject:* Re: [QGIS-Developer] Programmaticaly open the Log Panel
>
> On 25/02/2019 09.57, Tejas L wrote:
> > Hello team,
> >
> > I would like to automatically open the Log Panel whenever Qgis starts.
> > Is there a way to do this?
>
> Hi,
>
> For what I know there is no api call for it directly, but you can search
> for child widgets in the main panel, something like this:
>
> for widget in iface.mainWindow().children():
> if widget.objectName() == 'MessageLog':
> widget.show()
>
> Or shorter (but trickier):
>
> iface.mainWindow().findChild(QDockWidget, 'MessageLog').show()
>
> With me this pops up the Messagelog Panel (though then you do not have
> your tab yet, but that is a child of that one probably...)
>
> Regards,
>
> Richard Duivenvoorde
>
> Ps what do you want to use it for, because more people see the use of it
> maybe we can just add it (or ask to be added?)?
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QGIS Python API doc: add QgsInterface

2018-02-20 Thread Thomas Gratier
Hi,

I would suggest to add to the documentation the QgisInterface
https://qgis.org/api/classQgisInterface.html mentioning it's only available
when doing plugins as it would be annoying to go back and forth between C++
and Python API just for this.

Waiting for feedback. If Ok, then I will open a ticket to ask for the
improvement. I'm also wondering if there is a category for PyQGIS API
documentation?


Cheers

Thomas Gratier
___
QGIS-Developer mailing list
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 D3 DataVis Plugin Status Report

2016-09-30 Thread Thomas Gratier
Hi,

Did you ever try Vega https://vega.github.io/vega/? As stated, "With Vega,
you can describe the visual appearance and interactive behavior of a
visualization in a JSON format, and generate views using HTML5 Canvas or
SVG."

You can see a sandbox to try it
http://vega.github.io/vega-editor/?mode=vega&spec=bar
It uses D3. With this approach, less need to code, more need to
configure/create a configuration.

FYI, ESRI company has a product based on it called Cedar
http://esri.github.io/cedar/ for creating online charts with their online
maps


Cheers

Thomas Gratier



2016-10-01 0:04 GMT+02:00 Matteo Ghetta :

> Hi Calvin,
>
> well thanks to the complete refactoring code made by Micheal and Etienne
> the ui is completely changed.
>
> Just clone the last version of the repository and try it.
>
> No more external tmp file. The plots are directly shown inside a webview.
> Moreover the plot is interactive with the map cavas objects.
>
> Give it a try! Adding other plot types is realy easy too.
>
> If we can put the efforts togheter it will be awesome.
>
> Cheers
>
> Matteo
> Il 30/set/2016 20:58 "C Hamilton"  ha scritto:
>
>> Matteo,
>>
>> I was able to sort of get it running. It does not appear to be able to
>> display in the QGIS window. I am not sure if it was suppose to or not, but
>> I saw where it was saving the temporary file and was able to view it in a
>> web browser. I had to make some small changes to the one .ui file to make
>> it come up and I see in some of the python modules (not sure they are
>> actually used) referencing some .ui files that are not there. Do you have a
>> functioning DataPlot that you could zip up and send to me?
>>
>> My main concern is it is dependent upon a python library that is not a
>> part of the QGIS distribution. I can't have users install plotly in order
>> to get the plugin to work. I don't know plotly, but can it be in a folder
>> within the plugin directory and executed from there or does it have to be
>> installed into the python distribution.
>>
>> Thanks!!!
>>
>> On Fri, Sep 30, 2016 at 11:15 AM, matteo  wrote:
>>
>>> Hi Hamilton,
>>>
>>> a few months ago, during the QGIS Hackfest in Girona, me and Michael
>>> Douchin of LizMap started a D3 plugin based on the plotly library.
>>>
>>> unfortunately we did not have to much time to continue the work, but it
>>> is still here
>>>
>>> https://github.com/ghtmtt/DataPlot
>>>
>>> if you want to give it a try, you just have to install the plotly
>>> library with pip and clone the repo in the plugin folder
>>>
>>> fell free to make any suggestion!
>>>
>>> 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] What is the API for opening and displaying HDF5 files through native python console in QGIS?

2016-06-19 Thread Thomas Gratier
Hi,

Just use the following


from qgis.core import QgsRasterLayer

layer = QgsRasterLayer(u"/your/path/your_hdf5_file")
if (len(layer.subLayers()) > 1):
sub_layer = QgsRasterLayer(layer.subLayers()[1], 'sub layer') # Choose
arbitrarily the 2nd sub layer
QgsMapLayerRegistry.instance().addMapLayer(sub_layer)

You can see more code about HDF5 at
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/dataobjects.py#L393

Cheers


Thomas Gratier

2016-06-13 17:05 GMT+02:00 Adrián Lugo Bendezú <
adrian.lugo.bend...@gmail.com>:

> Hello,
>
> I would like to kindly ask for help opening a .h5 file, which is the
> extension for HDF5 file format, through the python console. Specifically I
> would like to open and display a dataset object (specific object type in
> HDF5) nested inside a group object (other specific object type in HDF5). I
> know that QGIS existing functionality allows HDF5 files to be opened and
> displayed through the GUI. When I use the Layer > Add Layer > Add Raster
> layer tool and open my desired HDF5 file, a window called “Select raster
> layers to add…” pops up listing all dataset objects inside my file that
> would ultimately open as raster files on QGIS. Selecting any of them
> effectively displays them in the map canvas. However, I would like to know
> the API for opening and displaying the HDF5 file dataset object through the
> native python console rather than the toolbar. I expect to be able to use
> the API to open and display any of the dataset objects within the HDF5 file
> and potentially provide proper CRS (Coordinate Reference System) for proper
> georeference. I am using QGIS 2.12.1 Lyon on Windows.
>
> Thanks,
>
>
> Adrián Lugo Bendezú
> Airborne Observation Platform Intern
> (NEON) National Ecological Observatory Network
> Office: 720.921.2726
> www.neonscience.org
> [image: cid:DFE8F099-73CA-444B-8146-6182E78AEFA4]
>
> ___
> 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] Any plans for implementing vector tile generation on QGIS Server?

2016-06-18 Thread Thomas Gratier
Hi,

Although it will not change the issue to support vector tiles in QGIS
Server, TileStache does support PBF. It's just that you need the forked
version from Mapzen e.g
https://github.com/mapzen/TileStache/blob/integration-1/TileStache/Goodies/VecTiles/mvt.py

Cheers

Thomas Gratier

2016-06-19 1:51 GMT+02:00 Nikolai Bezdna :

> Hi Marco,
>
> As far as I know vector tiles can’t be generated out of WMS services,
> because WMS spec is mostly used for getting raster images (GetMap request)
> or feature information (GetFeatureInfo request) and some others.
> I guess you meant WFS really, but I don’t know any caching server
> implementations that use WFS as a background and generate vector tiled PBFs
> (particularly in Mapbox Vector Tiles spec
> <https://github.com/mapbox/vector-tile-spec>).
> I didn’t use MapServer MapCache <http://www.mapserver.org/mapcache/>, but
> according to the docs it doesn’t support vector tiles, only raster ones.
> MapProxy and TileCache don’t support them either. TileStache can produce
> vector tiles out of OGR datasource, but in GeoJSON format, which is way
> heavier than PBF, even gzipped.
> So the good way to go would be to use the OGR MVT driver, but
> unfortunately it’s not released and the status of it’s development is
> unknown. While web is moving fast towards in-browser rendering (OpenLayers3
> and Mapbox GL already utilise WebGL for that) it’s becoming clear QGIS
> server should support vector tiles at some point. Should I start with a
> feature request maybe?
>
> Regards,
> Nick
>
> From: Marco Hugentobler 
> To: qgis-developer@lists.osgeo.org
> Subject: Re: [Qgis-developer] Any plans for implementing vector tile
> generation on QGIS Server?
> Message-ID: <5765066c.3000...@sourcepole.ch>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi Nikolai
>
> Most vector tile generators can work with any WMS in the background.
> E.g. using MapCache with QGIS server should be perfectly possible.
>
> Regards,
> Marco
>
> On 06/18/16 10:13, Nikolai Bezdna wrote:
>
> I’d like to know if there are any plans for enabling serving vector
> tiles from QGIS Server, so they can be used in client libraries like
> Mapbox GL afterwards. Seems like GDAL (OGR really) MVT driver is stuck
> in development and there already are some stand-alone implementations,
> like utilery (https://github.com/tilery/utilery) or Mapnik vector tile
> (https://github.com/mapbox/mapnik-vector-tile), but nothing is
> integrated with QGIS server. Since Mapbox and ESRI adopted MVT, and
> most major web basemaps (like Google, Apple etc.) are already vector
> tile based, it seems like QGIS is running a bit behind in this field.
> So it would be great to start a discussion on utilising vector tile
> spec within QGIS.
>
> Cheers
>
>
> ___
> 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] Normal behaviour for QgsDial?

2016-06-10 Thread Thomas Gratier
Hi,

Trying in the Python QGIS Console the following:

from qgis.gui import QgsDial
dial = QgsDial()
dial.show()

it returns:

Traceback (most recent call last):
  File "", line 1, in 
TypeError: qgis._gui.QgsDial cannot be instantiated or sub-classed

This is weird IMO because it's not an abstract class and the class has a
constructor according to the documentation e.g
http://www.qgis.org/api/classQgsDial.html

Is it a choice, a Python binding issue, or something else?
Any feedback?


FYI, I've tried with QGIS master c578f3a and 2.14.3 on an Ubuntu 14.04 x64


Cheers


Thomas Gratier
___
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] JS error popup on PyQGIS dev cookbook page

2016-04-21 Thread Thomas Gratier
Hi,

How did you land on this page?

The URL to access is supposed to be
http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/crs.html

In your link, in the js

if (langPlusPage==undefined){
currentPage = currentPage.replace('index.html','')
search = new RegExp('\/[a-zA-Z_]{2,8}\/'+ currentPage, 'gi');
langPlusPage = window.location.href.match(search);
}

but currentPage contains currentPage value is
"docs/pyqgis_developer_cookbook/crs.html"

As your url is
http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/crs,
window.location.href.match(search); failed and you get your alert popup.


Cheers


Thomas Gratier

2016-04-20 10:09 GMT+02:00 Tom Chadwin :

> I'm getting a popup on this page:
>
> http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/crs
>
> "There is an documentation error, please report back to QGIS devs."
>
> Not visited the page before, so I don't know whether the problem has just
> occurred.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/JS-error-popup-on-PyQGIS-dev-cookbook-page-tp5262013.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] Ubuntu build dependencies

2016-03-10 Thread Thomas Gratier
Hi,

Just look at the INSTALL file from the qgis official repository e.g
https://github.com/qgis/QGIS/blob/master/INSTALL#L179

Cheers


Thomas Gratier

2016-03-10 19:08 GMT+01:00 David Adler :

> Using sudo apt-get build-dep qgis finds/installs many dependencies but
> there were still some missing like libqca2-dev and libqca-plugin-ossl.
>
> Running ccmake, /usr/lib/libqscintilla2.so is not found.  What package is
> this in?
>
> A while back, someone pointed us to a page that had QGIS dependencies for
> different versions of Ubuntu but I seem to have lost the link.
>
> Is there some simple place to figure out how to get all needed
> dependencies and to set various ccmake values that need to be added/set?
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> 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] Setting snapping settings via Python

2016-01-21 Thread Thomas Gratier
Hi,

I'm maybe wrong but you'd better look at QgsSnappingUtils
http://qgis.org/api/classQgsSnappingUtils.html
It seems more simple and should do the job for you.

Cheers

Thomas Gratier

2016-01-20 20:32 GMT+01:00 Tom Chadwin :

> This old thread might also help:
>
>
> http://osgeo-org.1560.x6.nabble.com/getting-QgsMapCanvasSnapper-to-work-td4147067.html
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Setting-snapping-settings-via-Python-tp5246362p5246373.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

[Qgis-developer] Inconsistencies between API documentation and code for groups?

2015-11-21 Thread Thomas Gratier
Hi,

If I go to http://qgis.org/api/2.12/classQgsBlendModeComboBox.html
I see that the class has been classified in
http://qgis.org/api/2.12/group__gui.html

If I go to http://qgis.org/api/2.12/classQgsMapLayerComboBox.html, the
class does not have any group whereas I would expect this class to be in
the same gui group.

Why? Both are in the same src/gui directory and in Python QGIS API, doing
the following

print [c for c in dir(qgis.gui) if 'QgsMapLayerComboBox' in c] # return the
QgsMapLayerComboBox class but it's Python not C++...

Any idea if it's normal? How can I help to improve this part if it's not
normal?

FYI, I didn't find an obvious keyword in *.h and *.c files for both classes
explaining why one is included in the doc and the other not. I also looked
at the doxy file template (
https://github.com/qgis/QGIS/blob/master/cmake_templates/Doxyfile.in
without success.

Cheers and regards

Thomas Gratier
___
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] Export to web: OpenLayers, Leaflet, Threejs

2015-01-22 Thread Thomas Gratier
Hi,

I maybe misunderstandood but I think Victor was already speaking about ol3
e.g https://github.com/volaya/qgis-ol3

Thomas

2015-01-22 16:39 GMT+01:00 Luca Delucchi :

> On 22 January 2015 at 16:36, Victor Olaya  wrote:
> > I am discussing with the author of the qgis2leaflet plugin about the
> > possibility of merging our plugins into a single one. Adding threejs
> > as well would be great, and i am sure we would get more testing and
> > feedback if its was a single plugin (and eventually maybe become a
> > core one)
> >
>
> maybe adding also OL3 could be useful
>
> --
> ciao
> Luca
>
> http://gis.cri.fmach.it/delucchi/
> www.lucadelu.org
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Get rid of Shapefiles ! Go SpatiaLite !

2012-11-26 Thread Thomas Gratier
Hello all,

+1 for Spatialite

You can also have a look on Geopackages announcement at OGC e.g
http://www.opengeospatial.org/pressroom/pressreleases/1710
It seems to be a future standard for geospatial data

Regards

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


Re: [Qgis-developer] Editing rst files

2012-05-05 Thread Thomas Gratier
Hello,

Yes, no debian package
Concerning enthought editor, a fast how to:

Go throught an
apt-get install python-vtk vtk
cd /wherever/you/want/
git clone https://github.com/enthought/rested
cd rested
python setup.py install (install ets as a depency too, if not go throught a
pip install -U ets before installing editor)
Launch the app throught "rested" command line


Regards

ThomasG

PS: Thanks Salvatore, I wasn't aware of the last soft link you post ;)
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Editing rst files

2012-05-05 Thread Thomas Gratier
Hello,

*For online*
For this, you can take a look on this online app http://rst.ninjs.org/
You can also think about embed in a custom online app a call to this kind
of api http://rst.projectfondue.com/

*For Desktop*
You can use Enthought editor available on
https://github.com/enthought/rested. It depends from ets (entought) and ets
need python-vtk.
After you install it, type "rested" in command line

Regards

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


Re: [Qgis-developer] Confusion over QGIS API versions

2011-08-06 Thread Thomas Gratier
Hello,

I don't know how you do but when I need the trunk api, I do a clone


git clone https://github.com/qgis/Quantum-GIS.git


After I use doxygen (graphviz is needed too) to generate my API docs
You can find a minimum doc about it at
http://www-scf.usc.edu/~peterchd/doxygen/

So after your clone, you go into Quantum-GIS dir with

--
cd Quantum-GIS
--

If you want a particular branch, for example, do a


git branch final-1_7_0


and you finish with

---
doxygen Doxyfile
---

Go into api_doc and open the browser with

---
cd api_doc
firefox index.html
---

At the end, you will no depend from online docs.
I agree that info about the right API version is not well explained so +1 to
add it in docs.

Regards

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


Re: [Qgis-developer] Developing a custom PyQGIS desktop application

2011-06-18 Thread Thomas Gratier
Hello,

Some clues

(2) I have looked for existing PyQGIS custom applications without success.
Do any exist?
>> Quantum navigator http://www.mapserver.sk/~wonder/qnavigator/
>> OpenOceanMap https://launchpad.net/openoceanmap
The two examples are listed from the "Desktop GIS" book (see below for
reference)

(3) Does anyone have suggestions for how best to proceed (i.e. is there a
good book on the QGIS and QT APIs?)
>> Desktop GIS: Mapping the Planet with Open Source Tools
http://pragprog.com/titles/gsdgis/desktop-gis
Some infos about Qgis plugin programming (some pages about, see table of
contents to make choice)
>> Python cookbook http://www.qgis.org/pyqgis-cookbook/ (I supose you're
already aware of it...)
>> Rapid GUI Programming with Python and Qt
http://www.qtrac.eu/pyqtbook.html (the best one on PyQT)
>> GUI Programming with Python: QT Edition
http://www.commandprompt.com/community/pyqt/
>> PyQT documentation (right navigation bar)
http://www.riverbankcomputing.co.uk/

Regards

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


[Qgis-developer] WMS Python again...

2011-06-13 Thread Thomas Gratier
Hello list,

I was looking for pyqgis cookbook and on wms step, I'm stuck in my test.
I search in archives and see
http://osgeo-org.1803224.n2.nabble.com/Re-RE-Qgis-user-WMS-in-python-td2039236.htmland
http://osgeo-org.1803224.n2.nabble.com/Re-WMS-in-python-td2048465.html
but the first link is the cookbook recipe and the FRMT sample won't work too
for me.
It's related to my install? only my code ? Someone get clues to solve this,
please?
You will find below my tests both in command line and qgis python console.
I'm working on Ubuntu 10.04 and my Qgis (1.6) is from on
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable

Regards

ThomasG
GIS specialist

# IN COMMAND LINE

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
import os
# Import our GUI
# Environment variable QGISHOME must be set to the install directory
# before running the application
qgis_prefix = os.getenv("QGISHOME") # Set to /usr (on Ubuntu 10.04)

QgsApplication.setPrefixPath(qgis_prefix, True)
QgsApplication.initQgis()

# Cookbook sample
url = 'http://wms.jpl.nasa.gov/wms.cgi'
layers = ['global_mosaic']
styles = ['pseudo']
format = 'image/jpeg'
crs = 'EPSG:4326'
rlayer = QgsRasterLayer(0, url, 'some layer name', 'wms', layers, format,
crs) # Freeze here
QgsMapLayerRegistry.instance().addMapLayer(rlayer)
if not rlayer.isValid():
  print "Layer failed to load!"

# Test with GDAL driver
rLayer2 =
QgsRasterLayer('/home/thomas/git/frmt_wms_onearth_global_mosaic.xml','Test')
# using file from http://www.gdal.org/frmt_wms_onearth_global_mosaic.xml
QgsMapLayerRegistry.instance().addMapLayer(rlayer2)

QgsApplication.exitQgis()

# QGIS PYTHON CONSOLE

# Cookbook sample
url = 'http://wms.jpl.nasa.gov/wms.cgi'
layers = ['global_mosaic']
styles = ['pseudo']
format = 'image/jpeg'
crs = 'EPSG:4326'
rlayer = QgsRasterLayer(0, url, 'some layer name', 'wms', layers, format,
crs) # Freeze here
rlayer.isValid() # Return true
QgsMapLayerRegistry.instance().addMapLayer(rlayer) # Don't see anything
rendering
#or
qgis.utils.iface.addRasterLayer(url, 'some layer name', 'wms', layers,
styles, format, crs)

# Test with GDAL driver
rLayer2 =
QgsRasterLayer('/home/thomas/git/frmt_wms_onearth_global_mosaic.xml','Test')
# using file from http://www.gdal.org/frmt_wms_onearth_global_mosaic.xml #
Failed with layer is not defined
QgsMapLayerRegistry.instance().addMapLayer(rlayer2)
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer