Re: [QGIS-Developer] Mitigating security risks of the Official Plugin Repository

2018-01-27 Thread Daniel Silk
From: Borys Jurgiel [mailto:li...@borysjurgiel.pl]
Sent: Friday, 26 January 2018 9:19 p.m.
To: qgis-developer@lists.osgeo.org
Cc: Daniel Silk; Luigi Pirelli
Subject: Re: [QGIS-Developer] Mitigating security risks of the Official Plugin 
Repository

> Last time when I submitted such PR (#5484), it ended up with removing the 
> distinction of trusted status from the manager ;)
>
> https://github.com/qgis/QGIS/commit/4b0607a71fb9f981bf50a
>
> For more info, see the conclusions of this discussion: https:// 
> lists.osgeo.org/pipermail/qgis-developer/2017-September/049695.html
>
> So I'm afraid the trusted status won't be useful any more.

Ah I see, thank you for letting me know!

Cheers
Daniel




This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Mitigating security risks of the Official Plugin Repository

2018-01-25 Thread Daniel Silk
From: Luigi Pirelli [lui...@gmail.com]
Sent: Friday, January 26, 2018 12:24 PM
To: Daniel Silk
Cc: qgis-developer@lists.osgeo.org
Subject: Re: [QGIS-Developer] Mitigating security risks of the Official Plugin 
Repository

> btw, di d you try to override with a custom function with filter capability?

Yes, I did this in my startup script:

import pyplugin_installer

repos = pyplugin_installer.installer_data.Repositories

def trusted_url_params(self):
"""Add trusted parameter to be included in every request"""
v = str(QGis.QGIS_VERSION_INT)
return "?qgis={}.{}&trusted=true".format(int(v[0]), int(v[1:3]))

repos.urlParams = trusted_url_params

and while trusted=true then appeared in the plugin manager interface,
it did not filter the repository list. So looks like that parameter wasn't
supported after all.



This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Mitigating security risks of the Official Plugin Repository

2018-01-25 Thread Daniel Silk
From: Luigi Pirelli [lui...@gmail.com]
Sent: Thursday, January 25, 2018 10:38 PM
To: Daniel Silk
Cc: qgis-developer@lists.osgeo.org
Subject: Re: [QGIS-Developer] Mitigating security risks of the Official Plugin 
Repository

> as you can see reading the code in
> https://github.com/qgis/QGIS/blob/release-2_18/python/pyplugin_installer/installer_data.py#L316-L326
>
> repos are get from Settings (that you can install a custom one via
> custom post install scripts) and repos are compared with officialRepo
> array that is global scope var that you can and set via python
>
> import pyplugin_installer
> print pyplugin_installer.installer_data.officialRepo
> (u'QGIS Official Plugin Repository',
> 'https://plugins.qgis.org/plugins/plugins.xml',
> 'https://plugins.qgis.org/plugins')
>
> because it's python you can overload/alias almost everithing, also
> that function that have hardcoded params

Thanks Luigi,

If I do:

import pyplugin_installer

pyplugin_installer.installer_data.officialRepo = (
QCoreApplication.translate(
'QgsPluginInstaller',
'QGIS Official Plugin Repository'),
new_url,
deprecated_url,
)

and also:

QSettings().setValue('Qgis/plugin-repos/QGIS Official Plugin Repository/url', 
new_url)

in my startup script then the official repository is successfully
replaced by our internal repository. Great!

> btw If you find useful an enhancement, please file a PR with you
> general solution that can be useful to other users.

If I submitted a PR that added a filter for trusted plugins similar to
the filters for experimental and deprecated plugins, could that only
be added to QGIS 3.2 (as a new feature)? Not 2.18?

Cheers
Daniel



This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Mitigating security risks of the Official Plugin Repository

2018-01-24 Thread Daniel Silk
Hi all

I am currently involved in rolling QGIS 2.18 out in a corporate environment. 
The security risk of a user installing a malicious plugin from the Official 
Plugin Repository has come up.

While we can ensure our corporate plugin repository is immediately visible to 
all corporate users via a startup.py script, it appears that we:
- cannot remove the Official Plugin Repository from the repository list (due to 
https://github.com/qgis/QGIS/blob/release-2_18/python/pyplugin_installer/installer_data.py#L316-L326)
- cannot disable the Official Plugin Repository via Python API (and the user 
would just be able to enable via the Plugin Manager interface anyway)
- cannot set the Plugin Manager interface to only show trusted plugins
- cannot set the url parameters to include trusted=true as the url params are 
hardcoded: 
https://github.com/qgis/QGIS/blob/release-2_18/python/pyplugin_installer/installer_data.py#L228

So is there any other way to remove the Official Plugin Repository or limit the 
plugins that we allow users to view and install?

Thanks
Daniel



This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Planning code sprint in Daytona Beach, FL (please vote on dates if interested)

2016-11-11 Thread Daniel Morissette

(I apologize in advance for the cross-posting.)

We are considering holding the annual "C Tribe" Code Sprint in Daytona 
Beach, FL and are currently considering two dates.


If you are interested in attending, then please confirm your interest 
and the dates that work for you in this Doodle. We will keep the doodle 
open until early next week:


http://doodle.com/poll/vyyew4ibbwcdp6ka

You can find out more about the plan as it evolves in the wiki:

https://wiki.osgeo.org/wiki/Daytona_Beach_Code_Sprint_2017

and follow the full discussion on the "tosprint" list:

https://lists.osgeo.org/pipermail/tosprint/2016-November/000644.html


* Note that the "C Tribe Sprint" is labelled this way only for 
historical reasons since and is really open to all "tribes". The goal is 
cross-project collaboration and all OSGeo projects are invited.


Daniel
___
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] raster to postgresql/postgis GUI plugin

2016-06-21 Thread Daniel Vicente Lühr Sierra
Hi,

El 21/06/16 a las 04:13, Luigi Pirelli escribió:
> becase of you are running raster2postgres command via subprocess, do
> you mind would be better to add it as Processing script/command?
Maybe... I mean, for now, as it is a "standalone" plugin which does not
connect to the database, it probably is a good idea.
But, if added as a processing sub-plugin, will it be able to find the db
connection selected either in the "sources-browser" tree or in
db-manager? That functionality will be needed when the raster2pgsql
output is sent directly to the db connection.
>
> remember that using an external command does not give you the help to
> have credential stored in the QGIS Authnetication Manager...
>
> another note, try to use subprocess.popen and not .call to avoid user
> interface block for long operations.
Sure, I just grabbed the first option that appeared on the python
manual. It would also be nice to show the progress, but apparently
raster2pgsql doesn't output some kind of feedback which could be used in
that way.

Thanks
>
> cheers
> 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:
> https://www.packtpub.com/application-development/mastering-qgis
> ******
>
>
> On 17 June 2016 at 23:51, Daniel Vicente Lühr Sierra  wrote:
>> Hi,
>>
>> I was unable to find a way to upload raster data to a PostGis DB from QGIS.
>>
>> I was aware of the raster2pgsql tool, but for the user-cases in my
>> projects, it is not an acceptable alternative (users do not have cli or
>> programming skills).
>>
>> So, to temporally workaround this shortcoming, I decided to implement a
>> QGIS plugin to act as a GUI to the raster2pgsql program.
>>
>> I have a working prototype available at
>> https://bitbucket.org/danielluehr/rastertopgsql/overview
>>
>> Please, note that it is the result of just a couple of days' work, and
>> it is my first attempt at writing a QGIS plugin. It is just a
>> quick&dirty implementation that is far from being complete or foolproof.
>>
>> My goal was to call the raster2pgsql program and pipe the output to the
>> DB directly, but I still don't know what is the best approach to send
>> data to an established connection (or maybe open one at that moment).
>> So, currently, the plugin just calls raster2pgsql on a file (with user
>> specified options from the plugin GUI) and saves the results to a SQL
>> file to be "manually" injected on the database (using some DB-manager
>> GUI, for instance).
>>
>> I think a good alternative would be to incorporate it as a sub-plugin in
>> the dbmanager plugin.
>>
>> I have briefly tested the plugin only against QGIS 2.8.9 and
>> PostGIS/raster2pgsql 2.1.4 which is my target environment.
>>
>> Any comments, suggestions, contributions are welcome.
>>
>> I used plugin-builder and I think it has the minimal requirements to be
>> uploaded to the plugin repository (at least, as an experimental plugin),
>> but I would prefer to have some feedback before uploading it there.
>>
>> Regards
>>
>> --
>> Daniel Vicente Lühr Sierra
>> IEEE Member
>> IEEE Student Branch Counselor - Universidad Austral de Chile
>>
>> ___
>> 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

-- 
Daniel Vicente Lühr Sierra
IEEE Member
IEEE Student Branch Counselor - Universidad Austral de Chile

___
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] raster to postgresql/postgis GUI plugin

2016-06-18 Thread Daniel Vicente Lühr Sierra

Hi Paolo,

I will definitely try merging it with dbmanager at some point, but I 
think some testing as a standalone plugin will not hurt.


Also, I am just a basic git user and as dbmanager is part of QGIS, I 
don't know how to fork just the plugin code and not the whole QGIS 
repository, for developing, testing and then submitting the pull-resquest.


Thanks

El 18/06/16 a las 00:31, Paolo Cavallini escribió:

Hi Daniel,

Il 18/06/2016 00:51, Daniel Vicente Lühr Sierra ha scritto:


I think a good alternative would be to incorporate it as a sub-plugin in
the dbmanager plugin.

Thanks for your plugin, much appreciate. I'm pretty sure it will be far
more useful if incorporated in Plugin Manager, so the behaviour would
mimic the one for vectors: could you please rework it as a patch of it?
Submitting a pull request through GitHub is quite easy.
All the best.


--
Daniel Vicente Lühr Sierra
IEEE Member
IEEE UACh Student Branch Counselor

___
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] raster to postgresql/postgis GUI plugin

2016-06-17 Thread Daniel Vicente Lühr Sierra
Hi,

I was unable to find a way to upload raster data to a PostGis DB from QGIS.

I was aware of the raster2pgsql tool, but for the user-cases in my
projects, it is not an acceptable alternative (users do not have cli or
programming skills).

So, to temporally workaround this shortcoming, I decided to implement a
QGIS plugin to act as a GUI to the raster2pgsql program.

I have a working prototype available at
https://bitbucket.org/danielluehr/rastertopgsql/overview

Please, note that it is the result of just a couple of days' work, and
it is my first attempt at writing a QGIS plugin. It is just a
quick&dirty implementation that is far from being complete or foolproof.

My goal was to call the raster2pgsql program and pipe the output to the
DB directly, but I still don't know what is the best approach to send
data to an established connection (or maybe open one at that moment).
So, currently, the plugin just calls raster2pgsql on a file (with user
specified options from the plugin GUI) and saves the results to a SQL
file to be "manually" injected on the database (using some DB-manager
GUI, for instance).

I think a good alternative would be to incorporate it as a sub-plugin in
the dbmanager plugin.

I have briefly tested the plugin only against QGIS 2.8.9 and
PostGIS/raster2pgsql 2.1.4 which is my target environment.

Any comments, suggestions, contributions are welcome.

I used plugin-builder and I think it has the minimal requirements to be
uploaded to the plugin repository (at least, as an experimental plugin),
but I would prefer to have some feedback before uploading it there.

Regards

-- 
Daniel Vicente Lühr Sierra
IEEE Member
IEEE Student Branch Counselor - Universidad Austral de Chile

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

Re: [Qgis-developer] Qgis-developer Digest, Vol 119, Issue 65

2015-09-26 Thread Owhologbo Daniel Emekene
Qaqa
On Sep 26, 2015 2:05 PM,  wrote:

> Send Qgis-developer mailing list submissions to
> qgis-developer@lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> or, via email, send a message with subject or body 'help' to
> qgis-developer-requ...@lists.osgeo.org
>
> You can reach the person managing the list at
> qgis-developer-ow...@lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qgis-developer digest..."
>
>
> Today's Topics:
>
>1. Re: Compilation error with geosextra (Tim Sutton)
>2. Re: Kriging interpolation functionality in QGIS?
>   (Barry Rowlingson)
>3. Re: New authentication system ready (Larry Shaffer)
>
>
> --
>
> Message: 1
> Date: Sat, 26 Sep 2015 16:51:55 +0200
> From: Tim Sutton 
> To: Matthias Kuhn 
> Cc: QGIS Developer Mailing List 
> Subject: Re: [Qgis-developer] Compilation error with geosextra
> Message-ID:
>  crt_f...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Thanks Matthias!
>
> Regards
>
> Tim
> On Sep 26, 2015 4:13 PM, "Matthias Kuhn"  wrote:
>
> > Hi Tim,
> >
> > * Edit CMacheCache.txt in your build directory and remove any line
> > starting with GEOS_
> > * Or start from a clean build directory
> >
> > Matthias
> >
> > On 09/26/2015 04:10 PM, Tim Sutton wrote:
> >
> > Hi All
> >
> > Compiling here on Fedora 22, git checkout
> > from 9df1a08d46229a92aa122eb06278dfbd273da54d
> >
> > Linking CXX shared library ../../output/lib/libqgis_core.so
> > CMakeFiles/qgis_core.dir/geosextra/geos_c_extra.cpp.o: In function
> > `GEOSPrecisionModel_create':
> > /home/timlinux/dev/cpp/QGIS/src/core/geosextra/geos_c_extra.cpp:25:
> > undefined reference to
> >
> `geos::geom::PrecisionModel::PrecisionModel(geos::geom::PrecisionModel::Type)'
> > CMakeFiles/qgis_core.dir/geosextra/geos_c_extra.cpp.o: In function
> > `GEOSPrecisionModel_createFixed':
> > /home/timlinux/dev/cpp/QGIS/src/core/geosextra/geos_c_extra.cpp:30:
> > undefined reference to
> `geos::geom::PrecisionModel::PrecisionModel(double)'
> > CMakeFiles/qgis_core.dir/geosextra/geos_c_extra.cpp.o: In function
> > `GEOSPrecisionModel_destroy':
> > /home/timlinux/dev/cpp/QGIS/src/core/geosextra/geos_c_extra.cpp:35:
> > undefined reference to `geos::geom::PrecisionModel::~PrecisionModel()'
> > CMakeFiles/qgis_core.dir/geosextra/geos_c_extra.cpp.o: In function
> > `GEOSGeometryPrecisionReducer_reduce':
> > /home/timlinux/dev/cpp/QGIS/src/core/geosextra/geos_c_extra.cpp:47:
> > undefined reference to
> > `geos::precision::GeometryPrecisionReducer::reduce(geos::geom::Geometry
> > const&)'
> > collect2: error: ld returned 1 exit status
> > src/core/CMakeFiles/qgis_core.dir/build.make:10986: recipe for target
> > 'output/lib/libqgis_core.so.2.11.0' failed
> > make[2]: *** [output/lib/libqgis_core.so.2.11.0] Error 1
> > CMakeFiles/Makefile2:1119: recipe for target
> > 'src/core/CMakeFiles/qgis_core.dir/all' failed
> > make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
> > Makefile:146: recipe for target 'all' failed
> > make: *** [all] Error 2
> >
> >
> > Does anyone else get this?
> >
> > Regards
> >
> > Tim
> >
> > ?
> >
> >
> >
> >
> > Tim Sutton
> >
> > Visit http://kartoza.com to find out about open source:
> >
> > * Desktop GIS programming services
> > * Geospatial web development
> > * GIS Training
> > * Consulting Services
> >
> > Skype: timlinux Irc: timlinux on #qgis at freenode.net
> > Tim is a member of the QGIS Project Steering Committee
> >
> > Kartoza is a merger between Linfiniti and Afrispatial
> >
> >
> >
> > ___
> > Qgis-developer mailing listQgis-developer@lists.osgeo.orghttp://
> lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> >
> >
> > ___
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150926/1a3f8348/attachment-0001.html
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: not available
> Type: image/png
> Size: 9324 bytes
> Desc: not available
> URL: <
> http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150926/1a3f8348/attachment-0001.png
> >
>
> --
>
> Message: 2
> Date: Sat, 26 Sep 2015 18:43:12 +0100
> From: Barry Rowlingson 
> To: Stefan Keller 
> Cc: "qgis-developer@lists.osgeo.org" 
> Subject: Re: [Qgis-developer] Kriging interpolation functionality in
> QGIS?
> Message-ID:
> <
> canvkcznym-kqit6gi3zu8u88hffbfmjz+djyvcgabcmtv4w...@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Fri, Sep 25

Re: [Qgis-developer] Compliation issues of sources using "make" on Linux Ubuntu

2015-05-11 Thread Florin-Daniel Cioloboc
Thank you, Hugo!

That was a good tip, as I was checking the files I enabled the "allow
executing file as program". Whether that was the magic trick, I am unsure
but in any case now it's working. Same goes for the import qgis.core in the
Ubuntu terminal, no more import errors.

Hopefully, I can actually start to work on my plugin.

Best regards

On Mon, May 11, 2015 at 2:13 PM, Hugo Mercier 
wrote:

> Hi,
>
> Make sure you are on a file system that support unix file execution
> permission (no ntfs) and that it is mounted correctly.
> Make also sure that the user running make is the same as the owner of
> all files.
>
> On 11/05/2015 12:16, Florin-Daniel Cioloboc wrote:
> > Apparently, neither chmod +x scripts/compile-strings.sh nor chmod 001
> > scripts/compile-strings.sh work.
> > Whenever I use make test:
> >
> > 
> > Compiled translation files to .qm files.
> > 
> > make: execvp: scripts/compile-strings.sh: Permission denied
> > make: *** [transcompile] Error 127
> >
> >
> > Does anyone know why?
> >
> >
> >
> >
> > On Mon, May 11, 2015 at 12:06 PM, Florin-Daniel Cioloboc
> > mailto:cioloboc.flo...@gmail.com>> wrote:
> >
> > Thanks for the reply Alessandro,
> >
> > Already done that. It still doesn't work yet, however I got the idea
> > to source it: source scripts/run-env-linux.sh /usr/bin/qgis-2.2/ and
> > it worked up, at least that command.
> >
> > Unfortunately, when running make test command it get the same
> > permission error so at the moment I'm trying to set it using chmod
> > but it doesn't seem to be working.
> >
> >
> >
> > On Mon, May 11, 2015 at 11:45 AM, Alessandro Pasotti
> > mailto:apaso...@gmail.com>> wrote:
> >
> > 2015-05-11 10:44 GMT+02:00 Florin-Daniel Cioloboc
> > mailto:cioloboc.flo...@gmail.com>>:
> >
> > Hello everyone,
> >
> > I am getting a rather strange message after using the make
> > command, which is preventing me from compiling my sources
> > for a plugin. As a result, the plugin doesn't show up in
> QGIS.
> >
> > Message:
> >
> > 
> > Compiled translation files to .qm files.
> > 
> > make: execvp: scripts/compile-strings.sh: Permission
> denied
> > make: *** [transcompile] Error 127
> >
> >
> > Had an earlier issue but it was partly solved by installing
> > PyQT4. I don't really understand what's wrong.
> >
> > I typed in prompt: /make test/ and got:
> >
> > |pyrcc4 -o resources_rc.py  resources.qrc
> > make: pyrcc4: Command not found
> > make: *** [resources_rc.py] Error 127|
> >
> > I could use really use some help.
> >
> >
> >
> > make: pyrcc4: Command not found
> >
> > You have to install pyrcc4, if you're on Linux Ubuntu  or Debian
> > it's in the pyqt4-dev-tools package.
> >
> >
> > --
> > Alessandro Pasotti
> > w3:   www.itopen.it <http://www.itopen.it>
> >
> >
> >
> >
> >
> > ___
> > 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
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Compliation issues of sources using "make" on Linux Ubuntu

2015-05-11 Thread Florin-Daniel Cioloboc
Apparently, neither chmod +x scripts/compile-strings.sh nor chmod 001
scripts/compile-strings.sh work.
Whenever I use make test:


> Compiled translation files to .qm files.
> 
> make: execvp: scripts/compile-strings.sh: Permission denied
> make: *** [transcompile] Error 127
>
>
Does anyone know why?




On Mon, May 11, 2015 at 12:06 PM, Florin-Daniel Cioloboc <
cioloboc.flo...@gmail.com> wrote:

> Thanks for the reply Alessandro,
>
> Already done that. It still doesn't work yet, however I got the idea to
> source it: source scripts/run-env-linux.sh /usr/bin/qgis-2.2/ and it worked
> up, at least that command.
>
> Unfortunately, when running make test command it get the same permission
> error so at the moment I'm trying to set it using chmod but it doesn't seem
> to be working.
>
>
>
> On Mon, May 11, 2015 at 11:45 AM, Alessandro Pasotti 
> wrote:
>
>> 2015-05-11 10:44 GMT+02:00 Florin-Daniel Cioloboc <
>> cioloboc.flo...@gmail.com>:
>>
>>> Hello everyone,
>>>
>>> I am getting a rather strange message after using the make command,
>>> which is preventing me from compiling my sources for a plugin. As a result,
>>> the plugin doesn't show up in QGIS.
>>>
>>> Message:
>>>
>>>> 
>>>> Compiled translation files to .qm files.
>>>> 
>>>> make: execvp: scripts/compile-strings.sh: Permission denied
>>>> make: *** [transcompile] Error 127
>>>>
>>>>
>>> Had an earlier issue but it was partly solved by installing PyQT4. I
>>> don't really understand what's wrong.
>>>
>>> I typed in prompt: *make test* and got:
>>>>
>>>> pyrcc4 -o resources_rc.py  resources.qrc
>>>> make: pyrcc4: Command not found
>>>> make: *** [resources_rc.py] Error 127
>>>>
>>>> I could use really use some help.
>>>
>>>
>>
>> make: pyrcc4: Command not found
>>
>> You have to install pyrcc4, if you're on Linux Ubuntu  or Debian it's in
>> the pyqt4-dev-tools package.
>>
>>
>> --
>> Alessandro Pasotti
>> w3:   www.itopen.it
>>
>
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Compliation issues of sources using "make" on Linux Ubuntu

2015-05-11 Thread Florin-Daniel Cioloboc
Thanks for the reply Alessandro,

Already done that. It still doesn't work yet, however I got the idea to
source it: source scripts/run-env-linux.sh /usr/bin/qgis-2.2/ and it worked
up, at least that command.

Unfortunately, when running make test command it get the same permission
error so at the moment I'm trying to set it using chmod but it doesn't seem
to be working.



On Mon, May 11, 2015 at 11:45 AM, Alessandro Pasotti 
wrote:

> 2015-05-11 10:44 GMT+02:00 Florin-Daniel Cioloboc <
> cioloboc.flo...@gmail.com>:
>
>> Hello everyone,
>>
>> I am getting a rather strange message after using the make command, which
>> is preventing me from compiling my sources for a plugin. As a result, the
>> plugin doesn't show up in QGIS.
>>
>> Message:
>>
>>> 
>>> Compiled translation files to .qm files.
>>> 
>>> make: execvp: scripts/compile-strings.sh: Permission denied
>>> make: *** [transcompile] Error 127
>>>
>>>
>> Had an earlier issue but it was partly solved by installing PyQT4. I
>> don't really understand what's wrong.
>>
>> I typed in prompt: *make test* and got:
>>>
>>> pyrcc4 -o resources_rc.py  resources.qrc
>>> make: pyrcc4: Command not found
>>> make: *** [resources_rc.py] Error 127
>>>
>>> I could use really use some help.
>>
>>
>
> make: pyrcc4: Command not found
>
> You have to install pyrcc4, if you're on Linux Ubuntu  or Debian it's in
> the pyqt4-dev-tools package.
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Compliation issues of sources using "make" on Linux Ubuntu

2015-05-11 Thread Florin-Daniel Cioloboc
Hello everyone,

I am getting a rather strange message after using the make command, which
is preventing me from compiling my sources for a plugin. As a result, the
plugin doesn't show up in QGIS.

Message:

> 
> Compiled translation files to .qm files.
> 
> make: execvp: scripts/compile-strings.sh: Permission denied
> make: *** [transcompile] Error 127
>
>
Had an earlier issue but it was partly solved by installing PyQT4. I don't
really understand what's wrong.

I typed in prompt: *make test* and got:
>
> pyrcc4 -o resources_rc.py  resources.qrc
> make: pyrcc4: Command not found
> make: *** [resources_rc.py] Error 127
>
> I could use really use some help.

Best wishes,
Florin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] How to set the PyQGIS environnement on Windows properly?

2015-05-05 Thread Florin-Daniel Cioloboc
Hello everyone,

I'm having problems with a specific error, which is pretty common from what
I can see but can't seem to find a solution.

When I try to import the qgis module the following error occurs:

ImportError: No module named 'qgis'

So far this is the guide  I'm using
and here's the settings for the .cmd, I'm assuming it has something to do
with this:

> @echo off
> SET OSGEO4W_ROOT=D:\OSGeo4W64
> call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
> call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.3\etc\env.bat@echo off
> path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
> path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass-6.4.3\lib
>
> set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;
> set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages
> set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\qgis
> set PATH=C:\Program Files (x86)\JetBrains\PyCharm Community Edition 
> 4.0.6\bin\pycharm.exe;%PATH%
> cd %HOMEPATH%\TER\development
> start "PyCharm aware of Quantum GIS" /B "C:\Program Files 
> (x86)\JetBrains\PyCharm Community Edition 4.0.6\bin\pycharm.exe" %*
>
> I realize this is quite a beginner's question but in any case I could use
some help.

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

[Qgis-developer] Attribute names and Strings are not displayed correctly

2015-02-24 Thread Daniel Lincke

Hi,

I guess this is not a bug but some problem with external libraries. In 
my qgis (using Ubuntu 14.10) and have the problem since a few weeks. I 
don't know when it started exactly,but I guess it was some update.


Whenever I look at the attribute table or at the attribute dialog for a 
shape, the attribute names are shown as _1,_2,_3, ... In the attributes, 
Strings are generally displayed as "NULL". Numbers are fine.


Since the Problem occurs, I have reinstalled qgis several times and also 
tried out several versions (2.2,2.6,2.8) but nothing changed.


In the message window, I found one warning by python:

warning:/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py:890: 
PendingDeprecationWarning: This method will be removed in future 
versions. Use 'elem.iter()' or 'list(elem.iter())' instead.


for include in elem.getiterator("include"):

traceback: File "", line 1, in 

File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 219, in 
startPlugin


plugins[packageName] = package.classFactory(iface)

File "/usr/share/qgis/python/plugins/MetaSearch/__init__.py", line 28, 
in classFactory


from MetaSearch.plugin import MetaSearchPlugin

File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 478, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "/usr/share/qgis/python/plugins/MetaSearch/plugin.py", line 31, in 



from MetaSearch.dialogs.maindialog import MetaSearchDialog

File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 478, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "/usr/share/qgis/python/plugins/MetaSearch/dialogs/maindialog.py", 
line 49, in 


from MetaSearch.dialogs.manageconnectionsdialog import 
ManageConnectionsDialog


File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 478, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File 
"/usr/share/qgis/python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py", 
line 39, in 


BASE_CLASS = get_ui_class('manageconnectionsdialog.ui')

File "/usr/share/qgis/python/plugins/MetaSearch/util.py", line 59, in 
get_ui_class


return loadUiType(ui_file_full)[0]

File "/usr/lib/python2.7/dist-packages/PyQt4/uic/__init__.py", line 210, 
in loadUiType


winfo = compiler.UICompiler().compileUi(uifile, code_string, 
from_imports, resource_suffix)


File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py", 
line 139, in compileUi


w = self.parse(input_stream, resource_suffix)

File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 992, 
in parse


actor(elem)

File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 890, 
in readResources


for include in elem.getiterator("include"):



I don't think that this causes the problem, but I don't know. Any 
developer with any suggestion? :)


Thanks!

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

Re: [Qgis-developer] Enabling map rotation in master

2015-01-09 Thread Daniel Kastl
>
>
> I was trying to enable map rotation in QGIS master, by setting
>
> QGIS_ENABLE_CANVAS_ROTATION
>
> to any value (tried 1 or true).
>
> However, it has no effect. The rotation GUI seems to stay hidden. Is the
> env-var still the way to enable rotation or is there another setting?
>
>
You just need to enable the checkbox in the "General" options and restart
QGIS.

Best,
Daniel


-- 
Georepublic UG & Georepublic Japan
eMail: daniel.ka...@georepublic.de
Web: http://georepublic.info
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Documentation for QGIS server

2014-12-12 Thread Daniel Scholten

Thanks Giovanni, Andreas and Alessandro for your help!

I got the QGIS-Server working now and have an idea about how I can do 
what I want.


Best wishes
Daniel


On 2014-12-11 13:24, Alessandro Pasotti wrote:

2014-12-11 10:47 GMT+01:00 Andreas Neumann :

Hi Daniel,

Am 2014-12-11 08:51, schrieb Daniel Scholten:


Dear QGIS developers,

I want to use QGIS-Server to
* create a WMS and a WFS,



This should be possible.


* perform some GIS analysis on-the-fly within my interactive online
map to dynamically create new layers and



This does not work out of the box. Will require some serverside 
scripting.

QGIS server is not yet a WPS server.


* enable users of my online map to manipulate some stored geodata.





Hi,

For server-side scripting, I would suggest you to check out the new
API for QGIS server Python plugins (I think it's only available in
master).

At the moment the documentation is still rare (I'm slowly working to
improve it).

By now you can start from here:

http://www.itopen.it/qgis/serverplugins/api/
https://github.com/elpaso/qgis-helloserver
http://www.itopen.it/2014/11/27/plugin-python-per-qgis-server/

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


[Qgis-developer] Documentation for QGIS server

2014-12-10 Thread Daniel Scholten

Dear QGIS developers,

I want to use QGIS-Server to
* create a WMS and a WFS,
* perform some GIS analysis on-the-fly within my interactive online map 
to dynamically create new layers and

* enable users of my online map to manipulate some stored geodata.

I found some documentation [1,2,3,4,5], but did not achive to install 
QGIS-server successfully locally on my Windows 7 machine. I also did not 
found any API documentation. Can somebody give me a hint where to find 
some more documentation? I am also interested in book recommondations.


Best wishes
Daniel

[1] http://hub.qgis.org/wiki/quantum-gis/QGIS_Server_Tutorial
[2] 
http://qgis-documentation.readthedocs.org/en/latest/server/server.html

[3] http://live.osgeo.org/de/overview/qgis_mapserver_overview.html
[4] 
http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/
[5] 
http://linfiniti.com/2010/08/qgis-mapserver-a-wms-server-for-the-masses/

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


Re: [Qgis-developer] Commercial ads on qgis.org

2014-07-29 Thread Daniel Scholten
On 07/29/2014 12:40 PM, Paolo Cavallini wrote:
> Hi all.
> We include some feeds on our HP. As a result, it occasionally happens
> that we display some commercial ads (right now we have the
> announcement of Faunalia courses). I think this is not appropriate,
> and should generally be avoided: thoughts?
> In case we agree it is not, how to implement this? I think it is

I imagine that feed posts can be equiped with custom tags and that
qgis.org can filter feeds by tags. Maybe the authors in question want to
support the noncommercial character of the qgis.org website through
tagging advertisements in their feeds as advertisements. QGIS as a
project would be a good identity to propose a standardized tag for this,
let's say "advertisement". :) I don't know about how many authors we
talk, but maybe someone could ask them all individually and that already
solves the issue.

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


Re: [Qgis-developer] error starting qgis (built from source)

2014-07-21 Thread Daniel Scholten
Installing python-gdal solved the issue for me.

One could check if the building guide
http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html#toc6
should be updated, i.e. python-gdal is added to the build dependencies.
I use Linux Mint so I don't know if it's exactly the same with Ubuntu.

Best wishes
Daniel

On 05/06/2014 12:59 PM, Daniel Scholten wrote:
> On 05/05/2014 07:16 PM, Larry Shaffer wrote:
>> Hi,
>>
>> On Mon, May 5, 2014 at 10:46 AM, Yves Jacolin > <mailto:yjaco...@free.fr>> wrote:
>>
>> Le lundi 5 mai 2014, 15:57:06 Daniel Scholten a écrit :
>> >[..]
>> >
>> > I've had the same problem and the above worked for me. Except that
>> now I
>> > found that some plugin libraries are missing. During start of QGIS
>> I get
>> > a message "Unable to load GdalTools plugin. The required "osgeo
>> > [python-gdal]" module is missing." and after a Python error "Couldn't
>> > load plugin 'processing' [...]". After QGIS startup in the plugin
>> > manager with GdalTools everything seems to be ok, whereas processing
>> > plugin is marked broken and the reinstall button is disabled. Any
>> > suggestions what to do? Daniel
>>
>> sudo apt-get install python3-pyqt4.qsci made the process plugin
>> working for
>> me.
>>
>> For Gdal plugin, I built GDAL with Python Binding but I guess you should
>> install python3-gdal
>>
>>
>> Python 3 is not supported by QGIS. Install the Python 2 support packages.
>>
>> Required third-party Python packages include psycopg2, matplotlib,
>> pyparsing and qscintilla2 for QGIS at runtime; and, numpy for GDAL
>> (raster support, I believe).
> 
> I first installed psycopg2, matplotlib, pyparsing, qscintilla2
> and numpy, which did not solve the problem. Then I installed
> python3-pyqt4.qsci, which also didn't solve it. Any further ideas? Daniel
> ___
> 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] error after building from source

2014-06-01 Thread Daniel Scholten
Thanks Matthias, removing the system installation and setting
LD_LIBRARY_PATH solved the issue. But now I have the already known problem:

During start of QGIS I get a Python error "Couldn't load plugin
'processing' [...]" and after a message "Unable to load GdalTools
plugin. The required "osgeo [python-gdal]" module is missing.". However,
QGIS starts and in the plugin manager with GdalTools everything seems to
be ok, whereas processing plugin is marked broken and the reinstall
button is disabled.

Any suggestions what to do? Daniel

I attach the full python error.
Couldn't load plugin 'processing' from ['/usr/local/share/qgis/python', 
'/home/user/.qgis2/python', '/home/user/.qgis2/python/plugins', 
'/usr/local/share/qgis/python/plugins', '/usr/lib/python2.7', 
'/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', 
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', 
'/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', 
'/usr/lib/python2.7/dist-packages/PIL', 
'/usr/lib/python2.7/dist-packages/gst-0.10', 
'/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', 
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']


Traceback (most recent call last):
  File "/usr/local/share/qgis/python/qgis/utils.py", line 182, in loadPlugin
__import__(packageName)
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/local/share/qgis/python/plugins/processing/__init__.py", line 29, 
in 
from processing.tools.general import *
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/local/share/qgis/python/plugins/processing/tools/general.py", line 
29, in 
from processing.core.Processing import Processing
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/local/share/qgis/python/plugins/processing/core/Processing.py", 
line 49, in 
from processing.algs.qgis.QGISAlgorithmProvider import QGISAlgorithmProvider
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File 
"/usr/local/share/qgis/python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py",
 line 77, in 
from RasterLayerStatistics import RasterLayerStatistics
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File 
"/usr/local/share/qgis/python/plugins/processing/algs/qgis/RasterLayerStatistics.py",
 line 36, in 
from processing.tools import raster
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/local/share/qgis/python/plugins/processing/tools/raster.py", line 
29, in 
from osgeo import gdal
  File "/usr/local/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named osgeo


Python version:
2.7.3 (default, Feb 27 2014, 20:11:37) 
[GCC 4.6.3]


QGIS version:
2.3.0-Master Master, 4670a16

Python path: ['/usr/local/share/qgis/python', u'/home/user/.qgis2/python', 
u'/home/user/.qgis2/python/plugins', '/usr/local/share/qgis/python/plugins', 
'/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', 
'/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', 
'/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', 
'/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', 
'/usr/lib/python2.7/dist-packages/gst-0.10', 
'/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', 
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] cannot run/ error after building from source

2014-06-01 Thread Daniel Scholten
After building from source (qgis 2.3 checked out yesterday), following
http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html#toc3
I try to start qgis from comand line, but on comand line I get
./qgis: symbol lookup error: ./qgis: undefined symbol:
_ZN17QgsLayerTreeGroup16staticMetaObjectE

This happens with a local build/ installation, while there is another
system wide installation of qgis. I use Linux Mint 13.

Any suggestions what to do? Thanks
Daniel
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] error starting qgis (built from source)

2014-05-06 Thread Daniel Scholten
On 05/05/2014 07:16 PM, Larry Shaffer wrote:
> Hi,
> 
> On Mon, May 5, 2014 at 10:46 AM, Yves Jacolin  <mailto:yjaco...@free.fr>> wrote:
> 
> Le lundi 5 mai 2014, 15:57:06 Daniel Scholten a écrit :
> >[..]
> >
> > I've had the same problem and the above worked for me. Except that
> now I
> > found that some plugin libraries are missing. During start of QGIS
> I get
> > a message "Unable to load GdalTools plugin. The required "osgeo
> > [python-gdal]" module is missing." and after a Python error "Couldn't
> > load plugin 'processing' [...]". After QGIS startup in the plugin
> > manager with GdalTools everything seems to be ok, whereas processing
> > plugin is marked broken and the reinstall button is disabled. Any
> > suggestions what to do? Daniel
> 
> sudo apt-get install python3-pyqt4.qsci made the process plugin
> working for
> me.
> 
> For Gdal plugin, I built GDAL with Python Binding but I guess you should
> install python3-gdal
> 
> 
> Python 3 is not supported by QGIS. Install the Python 2 support packages.
> 
> Required third-party Python packages include psycopg2, matplotlib,
> pyparsing and qscintilla2 for QGIS at runtime; and, numpy for GDAL
> (raster support, I believe).

I first installed psycopg2, matplotlib, pyparsing, qscintilla2
and numpy, which did not solve the problem. Then I installed
python3-pyqt4.qsci, which also didn't solve it. Any further ideas? Daniel
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] error starting qgis (built from source)

2014-05-05 Thread Daniel Scholten
On 05/03/2014 09:46 AM, Yves Jacolin wrote:
> Le samedi 3 mai 2014, 08:47:30 Nyall Dawson a écrit :
>>> Maybe you need to update your LD_LIBRARY_PATH so QGIS or Qt knows of the
>>> custom OCI lib path during runtime?
>>
>> Possibly running "sudo ldconfig" may help?
>>
>> Nyall
> probably not without adding a new file in /etc/ld.so.conf.d/ for example 
> qgis.conf containing: /usr/local/lib/
> 
> So yes after that update your lib PATH with sudo ldconfig.
> 
> Y.
> 

I've had the same problem and the above worked for me. Except that now I
found that some plugin libraries are missing. During start of QGIS I get
a message "Unable to load GdalTools plugin. The required "osgeo
[python-gdal]" module is missing." and after a Python error "Couldn't
load plugin 'processing' [...]". After QGIS startup in the plugin
manager with GdalTools everything seems to be ok, whereas processing
plugin is marked broken and the reinstall button is disabled. Any
suggestions what to do? Daniel
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Does spatial index improve performance using the class QgsGeometry.intersects()?

2013-11-04 Thread Daniel
Try it

http://nathanw.net/2013/01/04/using-a-qgis-spatial-index-to-speed-up-your-code/

Best regards.


On Mon, Nov 4, 2013 at 9:16 AM, Stefano Masera <
stefano.mas...@arpa.piemonte.it> wrote:

> Hi list,
>
> I don't know exactly how spatial index works, so I ask this question.
> I have two layers and I want to check which features of the first layer
> intersect the features of the second one.
> I write a simple script where I create the spatial index for both themes
> and I use the class QgsGeometry.intersects() to check the intersections.
>
> I cannot understand why the executing time is the same even if I create or
> I don't create the spatial index for the layers.
> Note:
> - The first layer (polilyne) has 2 features, the second (polygon) has
> 600 features.
> - To test the script insert the path of a check file
> - To compare time executing you have to comments the two lines (21 and 22)
> in which I create the spatial index and cancel the file *.qix on the hard
> disk.
>
> Thanks
> Stefano Masera
>
>
>
> 
> ##input_layer1_polyline=vector
> ##input_layer2_polygon=vector
>
> from qgis.core import *
> from PyQt4.QtCore import *
> from PyQt4.QtGui import *
> import processing
> import time
>
> # start time
> start_time = time.time()
>
> # opens a check file: insert path
> file = open("INSERT PATH","w")
>
> # gets vector layer
> layer1_polyline = processing.getobject(input_layer1_polyline)
> layer2_polygon = processing.getobject(input_layer2_polygon)
>
> # creates SpatialIndex
> layer1_polyline.dataProvider().createSpatialIndex()
> layer2_polygon.dataProvider().createSpatialIndex()
>
> # gets features from layers
> polyline_feat_all = layer1_polyline.dataProvider().getFeatures()
>
> for polyline in polyline_feat_all:
> # writes in a check file the polyline
> file.write("polyline: " + str(polyline.id()) + "\n")
>
> polygon_feat_all = layer2_polygon.dataProvider().getFeatures()
>
> for polygon in polygon_feat_all:
> if polyline.geometry().intersects(polygon.geometry()) == 1:
> # writes in a check file the intersect polygon
> file.write("\t" + "intersect polygon: " + str(polygon.id()) +
> "\n")
>
> # end time
> end_time = time.time()
>
> file.write("\n" + "Execution time: " + str(end_time - start_time) + "\n")
>
> file.close()
>
> 
>
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



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

Re: [Qgis-developer] Tr : New QGis project, application : version is empty and wms layer invalid

2013-10-06 Thread Daniel
It works for me!



QString uri =
"crs=EPSG:4326&featureCount=10&format=image/gif&layers=osm_auto:all&styles=&url=
http://129.206.228.72/cached/osm";;
QgsRasterLayer *rlayer = new QgsRasterLayer(uri, "layer_name", "wms",
false);
qDebug() << "layer is valid:" << rlayer->isValid();

connect( rlayer, SIGNAL(repaintRequested()), mapCanvas, SLOT(refresh())
);

QgsMapLayerRegistry::instance()->addMapLayer(rlayer);

QList  myLayerSet;
myLayerSet.append(QgsMapCanvasLayer(rlayer, true));
//
mapCanvas->setExtent(rlayer->extent());
mapCanvas->enableAntiAliasing(true);
mapCanvas->freeze(false);
mapCanvas->setLayerSet(myLayerSet);
mapCanvas->setVisible(true);
mapCanvas->refresh();
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] New QGis project, application : version is empty and wms layer invalid

2013-10-06 Thread Daniel
I don't know if you should receive "2.0" as output of applicationVersion()
method.

It's because setApplicationVersion() and setApplicationName() are called
from src/core/main.cpp (QGIS code).

The class QgsApplication don't call setter methods, so I don't know what
are the supposed behavior when I call these methods.

It works for me

QString uri= "url=
http://wms.jpl.nasa.gov/wms.cgi&crs=EPSG:4326&format=image/jpeg&layers=global_mosaic&styles=pseudo
";
qDebug() << "uri" << uri;
QgsRasterLayer *rlayer = new QgsRasterLayer(uri, "layer_name", "wms",
false);
qDebug() << rlayer->isValid();


Hope it helps you



On Sun, Oct 6, 2013 at 2:32 PM, chrome2006-...@yahoo.com <
chrome2006-...@yahoo.com> wrote:

>
> Hi
>
> This is my first attemp with QGIS. I'm using 2.0 version.
> My first goal is a proof of concept with a wms map and a vector map.
> I started with the wms service. You'll find the code below, there are two
> things that don't go well.
>
> First, QgsApplication::applicationVersion() is "", Did I do something
> wrong in
> initialization ?
>
> Second, my wms layer is not valid but maybe it is only because of the
> first question...
>
>
> main.cpp
> int main(int argc, char *argv[])
> {
> QgsApplication app(argc, argv, TRUE);
> MainWindow w;
> w.show();
>
> return app.exec();
> }
>
>
> mainwindow.cpp
>
> MainWindow::MainWindow(QWidget *parent) :
> QMainWindow(parent),
> ui(new Ui::MainWindow)
> {
> ui->setupUi(this);
> QgsApplication::setPrefixPath("/usr/lib/qgis", false);
> QgsApplication::initQgis();
> qDebug()<< QgsApplication::applicationVersion(); //
> <<--- return empty string
>
> mapCanvas = new QgsMapCanvas(this);
> mapCanvas->enableAntiAliasing(true);
> mapCanvas->useImageToRender(false);
> mapCanvas->setCanvasColor(QColor(255, 255, 255));
> mapCanvas->freeze(false);
> mapCanvas->setVisible(true);
> mapCanvas->refresh();
> mapCanvas->show();
>
> QVBoxLayout* lyt = new QVBoxLayout(ui->centralWidget);
> lyt->addWidget(mapCanvas);
>
> QString uri =
> "crs=EPSG:4326&featureCount=10&format=image/gif&layers=osm_auto:all&styles=&url=
> http://129.206.228.72/cached/osm";;
> QgsRasterLayer* rlayer = new  QgsRasterLayer(uri, "test", "wms", true);
> if (!rlayer->isValid()) qDebug() <<"invalid wms";   //
> <<- It is invalid !
>
> QgsMapLayerRegistry::instance()->addMapLayer(rlayer);
>
> mapCanvas->layers().append(rlayer);
> mapCanvas->zoomScale(1/1);
> mapCanvas->centerOn(5.7, 45.2);
> mapCanvas->update();
> }
>
> Thanks for your help.
> Regards
> Juliette
>
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



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

Re: [Qgis-developer] Layer combo box

2013-10-05 Thread Daniel
Very Nice

+1

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

Re: [Qgis-developer] Python: Select features that touch other features

2013-10-05 Thread Daniel
Using map() is the pythonic way


Maybe ftools need an upgrade :)

Thanks for the tip


On Sat, Oct 5, 2013 at 8:53 PM, Nathan Woodrow  wrote:

>
> On Sun, Oct 6, 2013 at 9:45 AM, Daniel  wrote:
>
>> def createIndex( provider ):
>> feat = QgsFeature()
>> index = QgsSpatialIndex()
>> fit = provider.getFeatures()
>> while fit.nextFeature( feat ):
>> index.insertFeature( feat )
>> return index
>>
>
> Try something like this for your createIndex which will work with any
> collection of features:
>
> def createIndex( features ):
> index = QgsSpatialIndex()
> map(index.insertFeature, features)
> return index
>
> index = createIndex(provider.getFeatures())
>
> and also because I hate seeing while nextFeature() used :)
>
> - Nathan
>
>
>


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

Re: [Qgis-developer] Python: Select features that touch other features

2013-10-05 Thread Daniel
Don't forgot to instantiate inFeatA e inFeatB

inFeatA = QgsFeature()
inFeatB = QgsFeature()


After vprovider.getFeatures() maybe you need to tests if inFeatB has a
valid geometry and if geometry touches the current selected one, something
like this:

geomB = QgsGeometry( inFeatB.geometry() )

if geomB.touches(geomA):
   # do something


http://www.qgis.org/api/classQgsGeometry.html#a6f4183fe331cc77ba3683c9d0d9c7181
[touches method]
http://www.qgis.org/api/classQgsVectorLayer.html#a33968fa939503a9e3873c88e5f0ea439
[selectedFeaturesIds]


PS: Sorry for the noise, but I sent the previous email without conclude it.
This completes the previous one.

Hope it helps



On Sat, Oct 5, 2013 at 8:45 PM, Daniel  wrote:

> Hi Andreas,
>
> First create a spatial index over layer features (I got this code from
> ftools_utils.py)
>
> # Convinience function to create a spatial index for input
> QgsVectorDataProvider
> def createIndex( provider ):
> feat = QgsFeature()
> index = QgsSpatialIndex()
> fit = provider.getFeatures()
> while fit.nextFeature( feat ):
> index.insertFeature( feat )
> return index
>
> Let's suppose that you have a vector layer "vlayer"
>
>
>
> get the selected features:
>
> # vector data provider
> vprovider = vlayer.dataProvider()
>
> # spatial index
> index = createIndex(vprovider)
>
> # selected features
> selection = vlayer.selectedFeaturesIds()
>
>
> for inFeatA in selection:
> geomA = QgsGeometry( inFeatA.geometry() )
> intersects = index.intersects( geomA.boundingBox() )
> for feat_id in intersects:
> # probably you want to discard some intersected feature that has
> in selection so...
> if feat_id in selection:
>  continue
> vprovider.getFeatures( QgsFeatureRequest().setFilterFid( int( id )
> ) ).nextFeature( inFeatB )
>
>
>
>
> On Fri, Oct 4, 2013 at 11:48 AM, Andreas Neumann wrote:
>
>> Hi,
>>
>> In my little python plugin I would like to do the following:
>>
>> In a parcel layer the user can interactively select a street parcel
>> (typically long parcels). The user could select one or more street
>> parcels.
>>
>> My little python script should then select all parcels that touch the
>> selected parcels, so the touching features are in the same table than
>> the originally selected features.
>>
>> I did not work with spatial operators and selections so far. Does
>> someone have some code around to start from?
>>
>> Thanks a lot!
>>
>> Andreas
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
>
> --
> Daniel Vaz
>



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

Re: [Qgis-developer] Python: Select features that touch other features

2013-10-05 Thread Daniel
Hi Andreas,

First create a spatial index over layer features (I got this code from
ftools_utils.py)

# Convinience function to create a spatial index for input
QgsVectorDataProvider
def createIndex( provider ):
feat = QgsFeature()
index = QgsSpatialIndex()
fit = provider.getFeatures()
while fit.nextFeature( feat ):
index.insertFeature( feat )
return index

Let's suppose that you have a vector layer "vlayer"



get the selected features:

# vector data provider
vprovider = vlayer.dataProvider()

# spatial index
index = createIndex(vprovider)

# selected features
selection = vlayer.selectedFeaturesIds()


for inFeatA in selection:
geomA = QgsGeometry( inFeatA.geometry() )
intersects = index.intersects( geomA.boundingBox() )
for feat_id in intersects:
# probably you want to discard some intersected feature that has in
selection so...
if feat_id in selection:
 continue
vprovider.getFeatures( QgsFeatureRequest().setFilterFid( int( id )
) ).nextFeature( inFeatB )




On Fri, Oct 4, 2013 at 11:48 AM, Andreas Neumann wrote:

> Hi,
>
> In my little python plugin I would like to do the following:
>
> In a parcel layer the user can interactively select a street parcel
> (typically long parcels). The user could select one or more street parcels.
>
> My little python script should then select all parcels that touch the
> selected parcels, so the touching features are in the same table than
> the originally selected features.
>
> I did not work with spatial operators and selections so far. Does
> someone have some code around to start from?
>
> Thanks a lot!
>
> Andreas
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



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

Re: [Qgis-developer] Python: Union selected polygons in a layer

2013-10-05 Thread Daniel
Try the QgsGeometry::combine() method.

http://www.qgis.org/api/classQgsGeometry.html#a63244d3435cc99794b82a6cbd0af0eb5

Quoting class doc

*Note:*this operation is not called union since its a reserved word in C++.


On Sat, Oct 5, 2013 at 8:07 AM, gene  wrote:

> I also do not see union in  Geometry Handling
> <http://www.qgis.org/en/docs/pyqgis_developer_cookbook/geometry.html>  :
>
> the layer:
>
> for elem in layer.getFeatures():
>  geom= elem.geometry()
>  print geom.exportToGeoJSON()
> { "type": "LineString", "coordinates": [ [203271.93800293002277613,
> 89444.43836556003952865],   [204056.96179387057782151,
> 89149.26942016639804933], [204590.77797171016572975,
> 89111.58827820124861319], [204823.14501382855814882,
> 89456.99874621508934069] ] }
> { "type": "LineString", "coordinates": [ [204541.79248715547146276,
> 89757.64295613372814842], [204474.17871974196168594,
> 90086.05268357080058195] ] }
>
>
> Using the  see <https://github.com/inky/see>   module (alternative to
> Python's dir()):
>
>  from see import see
>  see(geom)
> hash() help() repr()
> str()
> .Error()   .addPart() .addRing()
> .adjacentVertices().area().asGeometryCollection()
> .asMultiPoint().asMultiPolygon()  .asMultiPolyline()
> .asPoint() .asPolygon()   .asPolyline()
> .asWkb()   .avoidIntersections()  .boundingBox()
> .buffer()  .centroid()
> .closestSegmentWithContext()
> .closestVertex()   .closestVertexWithContext()
> .combine() .contains().convertToMultiType()
> .convexHull()  .crosses() .deletePart()
> .deleteRing()  .deleteVertex().difference()
> .disjoint().distance().equals()
> .exportToGeoJSON() .exportToWkt() .fromMultiPoint()
> .fromMultiPolygon().fromMultiPolyline()   .fromPoint()
> .fromPolygon() .fromPolyline().fromRect()
> .fromWkb() .fromWkt() .insertVertex()
> .interpolate() .intersection().intersects()
> .isGeosEmpty() .isGeosEqual() .isGeosValid()
> .isMultipart() .length()  .makeDifference()
> .moveVertex()  .overlaps().reshapeGeometry()
> .simplify().splitGeometry()   .sqrDistToVertexAt()
> .symDifference()   .touches() .transform()
> .translate()   .type().validateGeometry()
> .vertexAt().within()  .wkbSize()
> .wkbType()
>
> I see .intersection(), .touches() but no .union()
>
> Whereas with Shapely:
> --
>
> from shapely.geometry import LineString, shape
> from json import loads
> # empty shapely geometry
> myunion = LineString()
> for elem in layer.getFeatures():
>geom = elem.geometry()
># transformation of the QGIS geometry to shapely geometry with
> the geo_interface
>geoms = shape(jloads(elem.geometry().exportToGeoJSON()))
>myunion = myunion.union(geoms)
>print myunion
>MULTILINESTRING ((203271.9380029300227761 89444.4383655600395286,
> 204056.9617938705778215 89149.2694201663980493, 204590.7779717101657297
> 89111.5882782012486132, 204823.1450138285581488 89456.9987462150893407),
> (204541.7924871554714628 89757.6429561337281484, 204474.1787197419616859
> 90086.0526835708005819))
>
> and
>   gem = QgsGeometry.fromWkt(myunion.wkt)
>   gem
>   
>print gem.exportToGeoJSON()
>   { "type": "MultiLineString", "coordinates": [ [
> [203271.93800293002277613, 89444.43836556003952865],
> [204056.96179387057782151, 89149.26942016639804933],
> [204590.77797171016572975, 89111.58827820124861319],
> [204823.14501382855814882, 89456.99874621508934069] ], [
> [204541.79248715547146276, 89757.64295613372814842],
> [204474.17871974196168594, 90086.05268357080058195] ] ] }
>
> or with ogr (same result):
> -
> from osgeo import ogr
> # empty ogr geometry
> myunion = ogr.Geometry(ogr.wkbLineString)
> for elem in layer.getFeatures():
>geom = elem.geometry()
># transformation of the QGIS geometry to ogr geometry
>geoms = ogr.CreateGeometryFromWkb(geom.asWkb())
>myunion = myunion.Union(geoms)
>
> Is there a comparable solution with PyQGIS ?
>
>
&g

Re: [Qgis-developer] Plugin (C++) Upgrade install - anybody there?

2013-09-04 Thread Daniel
The qgis user folder has the name changed from qgis to qgis 2.

Are you copying to what folder?




On Wed, Sep 4, 2013 at 2:30 AM, maaza mekuria  wrote:

> Is there anything else that changed between 1.7 and 1.9 on installing C++
> plugins?
>
> In the past, I used to be able to copy the dll to the plugins folder and
> then it does install on its own. What should I do? I am using MSVC on
> windows XP .
>
> Thank you,
>
> Maaza
>
> ___
> 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
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



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

Re: [Qgis-developer] websites

2013-08-17 Thread Daniel
welcome back


On Sat, Aug 17, 2013 at 9:22 AM, Kari Salovaara
wrote:

>  and no contact to plugins (2.0 testing)
> server has summer holidays ???
>
> Kari
>
>
> On 17.08.2013 15:03, Daniel wrote:
>
> Today I can't access qgis.org and hub.qgis.org
>
>  Anybody else?
>
>  --
> Daniel Vaz
>
>
> --
> Kari Salovaara
> Hanko, Finland
>
> "Volunteers do not necessarily have the time; they just have the heart." 
> ~Elizabeth Andrew
>
>


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


[Qgis-developer] websites

2013-08-17 Thread Daniel
Today I can't access qgis.org and hub.qgis.org

Anybody else?

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


[Qgis-developer] License

2013-07-24 Thread Daniel
Hi all,

About GPLv3, is there any advance in this issue
http://hub.qgis.org/issues/3789?

Thanks in advance
-- 
Daniel Vaz
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] web sites offline?

2013-07-21 Thread Daniel
I can't access qgis.org and hub.qgis.org

Anybody can confirm?

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


Re: [Qgis-developer] Creating a spatialite layer in a python plugin

2013-07-15 Thread Daniel
Leaving source code for future reference:

Exporting Shapefile or Vector Layer to Spatialite using QgsVectorFileWriter


# -*- coding: utf-8 -*-
import sys

from qgis.core import *

app = QgsApplication(sys.argv, False)

# need to locate srs.db
app.setPkgDataPath( '/usr/local/share/qgis' )

# need to locate qgis libraries
app.setPrefixPath( '/usr/local' )

# need to locate c++ plugins (*.so)
app.setPluginPath( '/usr/local/lib/qgis/plugins' )

app.initQgis()
# show the environment variables
print 'lib path:', app.libraryPath()
print 'plugin path:', app.pluginPath()
print 'srs.db:', app.srsDbFilePath()
#
vlayer = QgsVectorLayer('track.shp', 'layer_name_you_like', 'ogr')
#
crs = vlayer.crs()
#
if not crs.isValid():
# choose a 4326 - WGS84 CRS
crs = QgsCoordinateReferenceSystem( 4326,
QgsCoordinateReferenceSystem.EpsgCrsId )

error = QgsVectorFileWriter.writeAsVectorFormat( vlayer,
 'test.sqlite',
 'System',
 crs,
 'SQLite',
 False,
 None,
 ["SPATIALITE=YES",] )
if error != QgsVectorFileWriter.NoError:
print 'Error number:', error


On Mon, Jul 15, 2013 at 2:19 PM, Daniel  wrote:

> Answer:
>
> vlayer = QgsVectorLayer('track.shp', 'layer_name_you_like', 'ogr')
>
> error_msg = ''
>
> error = QgsVectorFileWriter.writeAsVectorFormat( vlayer, 'test.sqlite',
> 'System', vlayer.crs(), 'SQLite', False, error_msg, [ "SPATIALITE=YES" , ] )
>
> where:
>
> vlayer =>  vector layer which will be exported
> to spatialite
> 'test.sqlite'  =>  absolute path to new spatialite
> database file
> 'System' =>  string that represents the file
> encoding
> vlayer.crs()  =>  vector layer crs
> 'SQLite'   =>  provider name
> False  =>  export onlySelected?
> error_msg=>  if there is any error message will be
> put in that variable (if user don't care about error handling, set to None)
> [ "SPATIALITE=YES" , ]   =>  database options. (here is the trick)
>
>
>
> Also, there is a class
> http://www.qgis.org/api/classQgsVectorLayerImport.html
>
> But, I didn't have success in create an empty database using the
> QgsVectorLayerImport. I think that class (QgsVectorLayerImport) expects a
> created spatialite database.
>
> --
> Daniel Vaz
>



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


Re: [Qgis-developer] Creating a spatialite layer in a python plugin

2013-07-15 Thread Daniel
Answer:

vlayer = QgsVectorLayer('track.shp', 'layer_name_you_like', 'ogr')

error_msg = ''

error = QgsVectorFileWriter.writeAsVectorFormat( vlayer, 'test.sqlite',
'System', vlayer.crs(), 'SQLite', False, error_msg, [ "SPATIALITE=YES" , ] )

where:

vlayer =>  vector layer which will be exported
to spatialite
'test.sqlite'  =>  absolute path to new spatialite
database file
'System' =>  string that represents the file
encoding
vlayer.crs()  =>  vector layer crs
'SQLite'   =>  provider name
False  =>  export onlySelected?
error_msg=>  if there is any error message will be
put in that variable (if user don't care about error handling, set to None)
[ "SPATIALITE=YES" , ]   =>  database options. (here is the trick)



Also, there is a class
http://www.qgis.org/api/classQgsVectorLayerImport.html

But, I didn't have success in create an empty database using the
QgsVectorLayerImport. I think that class (QgsVectorLayerImport) expects a
created spatialite database.

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


[Qgis-developer] Bugfix #7743

2013-07-14 Thread Daniel
http://hub.qgis.org/issues/7743

This bug was fixed in pull request

https://github.com/qgis/Quantum-GIS/pull/571/files

Waiting for merge with master.

Thanks in advance

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


[Qgis-developer] bugfix #8003

2013-07-14 Thread Daniel
This commit closes the issue 8003

https://github.com/qgis/Quantum-GIS/commit/9e2c4a09

http://hub.qgis.org/issues/8003

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


[Qgis-developer] Creating a spatialite layer in a python plugin

2013-07-12 Thread Daniel
Is it possible to create a spatialite layer using python bindings?

I compiled qgis version 1.8 from source on Ubuntu 12.04

GDAL 1.9.2
Spatialite 3.0.0~beta20110817-3

I enable PYSPATIALITE from ccmake menu.

>From plugin if i call the method:

QgsVectorFileWriter.supportedFiltersAndFormats()

I have the following output, where there is not SpatiaLite format available.

GeoJSON [OGR] (*.geojson *.GEOJSON)
GeoRSS [OGR] (*.xml *.XML)
Generic Mapping Tools [GMT] [OGR] (*.gmt *.GMT)
SQLite [OGR] (*.sqlite *.SQLITE)
ESRI Shapefile [OGR] (*.shp *.SHP)
INTERLIS 1 [OGR] (*.itf *.xml *.ili *.ITF *.XML *.ILI)
Geography Markup Language [GML] [OGR] (*.gml *.GML)
Geoconcept [OGR] (*.gxt *.txt *.GXT *.TXT)
AutoCAD DXF [OGR] (*.dxf *.DXF)
INTERLIS 2 [OGR] (*.itf *.xml *.ili *.ITF *.XML *.ILI)
Microstation DGN [OGR] (*.dgn *.DGN)
Comma Separated Value [OGR] (*.csv *.CSV)
Atlas BNA [OGR] (*.bna *.BNA)
GPS eXchange Format [GPX] [OGR] (*.gpx *.GPX)
S-57 Base file [OGR] (*.000 *.000)
Keyhole Markup Language [KML] [OGR] (*.kml *.KML)
Mapinfo File [OGR] (*.mif *.tab *.MIF *.TAB)


What I am missing?

Thanks in advance.

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


[Qgis-developer] Bug tracking

2013-07-12 Thread Daniel
Hi devs,

I am pretty new in QGis and very interested in help to decrease the number
of opened issues on bug tracking system.

Currently QGis issues has the following statistics:

Bugs

31 opened bugs with Blocker priority
37 opened bugs with High priority
661 opened bugs with Normal priority
243 opened bugs with Low priority

Features

1 opened features requests with Blocker priority
13 opened features requests with High priority
394 opened features requests with Normal priority
310 opened features requests with Low priority

Because the high number of opened issues it's hard to a beginner choose the
"right issues" (bugs/features) that really need atention.

I am skilled in C, C++ and Python and ready to try to contribute with QGis
community.


I look forward to hearing from you, the "right directions" that I should go
to.

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


[Qgis-developer] PyQGIS - How to create "Outline: Simple Line" layer?

2012-11-29 Thread Gilbert, Daniel R.
Hello All,

 

First off I'm quite the newbie when it comes to developing PyQGIS
plugins so hopefully this post makes sense...

 

I'm creating a vector layer using the memory provider.  Layer consists
of polygons and everything is working great.  

 

I'm now attempting to tailor the appearance of the symbols.  Following
the advice in this post
(http://lists.osgeo.org/pipermail/qgis-developer/2011-April/013772.html)
I successfully created just an outline (i.e. no fill):

 

props = { 'color_border' : '255,0,0,255', 'style' : 'no',
'style_border' : 'solid' }

s = QgsFillSymbolV2.createSimple(props)

vl.setRendererV2( QgsSingleSymbolRendererV2( s ) )

 

This is close to what I'd like but I notice that when selecting features
the selected features become filled which is not what I'd like.  

 

Manually adjusting the properties via the "Symbol properties" dialog I
discovered that by selecting "Outline: Simple line" from the "Symbol
layer type" pulldown provides the functionality I desire.  When
selecting features the color of the outline changes while remaining
un-filled.  Looking at the resulting entry in symbology-ng-style.xml
shows the following:

 



  

















  



 

I haven't had any luck in figuring out how to get the proper combination
of type="fill" while using "SimpleLine".  I also noticed that if I
follow the example in the PyQGIS Cookbook to display the complete list
of types for a QgsSymbolV2.Fill none of the "Outline: " types from
the dialog pulldown are listed:

 

 myRegistry = QgsSymbolLayerV2Registry.instance()

 for item in myRegistry.symbolLayersForType(QgsSymbolV2.Fill):

 ... print item

 

 CentroidFill

 LinePatternFill

 PointPatternFill

 SVGFill

 SimpleFill

 

Any advice on how to replicate the "Outline: Simple line" symbology will
be greatly appreciated!

 

Thanks,

 

-- Dan

 

 

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


[Qgis-developer] Display raster layer on own Map Canvas

2012-09-19 Thread Daniel Klich

Hello,

I am new to python and the QGIS API and writing a plugin in python to 
simulate/model insect dispersal.


I am using .ui files and Qt Designer. And i placed a QWidget on the form 
and promote it to a new class: set QgsMapCanvas as class name and set 
qgis.gui as header file.


I load a raster layer, set canvas color and so on. But the layer only 
displays if i use QgsMapLayerRegistry.instance().addMapLayer(self.layer).
Without these code line my plugin only displays the rubber band, but not 
the raster layer. But if i use ...addMapLayer() it also loads the layer 
in QGIS. I want to have a behaviour like in the GDAL - Georeferenzierung 
plugin. There you could add a raster layer and the plugin displays it 
only in the plugin window, not in the QGIS MainWindow.


Here is the method code:

def addRasterLayer(self):
fileName = "NE2_50M_SR.tif"
fileInfo = QFileInfo(fileName)
baseName = fileInfo.baseName()
self.layer = QgsRasterLayer(fileName, baseName)
if not self.layer.isValid():
  #error

#only with this line of code the raster layer will be displayed:
QgsMapLayerRegistry.instance().addMapLayer(self.layer)

self.canvas = self.dlg.ui.mapCanvasWidget

self.canvas.setCanvasColor(Qt.white)
self.canvas.setExtent(self.layer.extent())
self.canvas.setLayerSet( [ QgsMapCanvasLayer(self.layer) ] )

r = QgsRubberBand(self.dlg.ui.mapCanvasWidget, True)
points = [ [ QgsPoint(-10,-10), QgsPoint(0,10), 
QgsPoint(10,-10) ] ]

r.setToGeometry(QgsGeometry.fromPolygon(points), None)

self.canvas.setCurrentLayer (self.layer)
self.canvas.setVisible(True);
self.canvas.refresh()




best regards,

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


Re: [Qgis-developer] [Qgis-user] Cast your vote: Default icon theme for QGIS 2.0

2012-07-10 Thread Daniel Lee
What if the add layer buttons were unified - one button that would then
give you the option of adding a shapefile, database table, directory, GRASS
map, etc.? That could consolidate and eliminate a lot of the confusion.


2012/7/10 Micha Silver 

>  A question regarding the plans for the QGIS icon theme and the GRASS
> plugin.
>
> Currently GRASS (standalone) uses Robert's icons, but the QGIS plugin with
> the default theme uses other icons. That already could be a small bit of
> confusion. But when I switch QGIS to the new GIS theme, then some of the
> icons appear duplicated: Add Vector in QGIS and Add GRASS vector use the
> same icon. Another possible source of confusion.
>
> I'm not sure what I'd suggest to make everything work uniformly. It would
> be ideal if the GRASS application icons were identical to the GRASS plugin
> icons, but *different* from the generic QGIS "Add Vector" and "Add raster".
>
> Micha
>
>
>
> On 07/10/2012 01:50 PM, Anita Graser wrote:
>
> You can get a good overview over Robert's work at
> http://robert.szczepanek.pl/icons.php
>
>  Anita
>
>
>
> On Tue, Jul 10, 2012 at 12:41 PM, Martin Landa wrote:
>
>> Hi,
>>
>> 2012/7/10 Daniel Lee :
>> > I also think the GRASS theme is great, although I have to say that I'm a
>>
>>  it's not a "GRASS theme". wxGUI just uses part of icons from [1] which
>> was designed by Robert Szczepanek as a generic GIS-related icon set
>> (AFAIU).
>>
>> Martin
>>
>> [1] https://svn.osgeo.org/osgeo/graphics/trunk/toolbar-icons/24x24/
>>
>> --
>> Martin Landa  * http://geo.fsv.cvut.cz/~landa
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> This mail was received via Mail-SeCure System.
>
>
> ___
> Qgis-user mailing 
> listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user
>
> This mail was received via Mail-SeCure System.
>
>
>
>
>
> --
> Micha Silver
> GIS Consultant, Arava Development Co.http://www.surfaces.co.il
>
>
> ___
> 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] QGIS allocation error after upgrade to 1.8.0

2012-07-10 Thread Daniel Lee
Hi there,

Since I'm using the binary from the repository, I wasn't sure what exactly
I should wipe out - I don't have anything in /usr/local/lib/ except for a
python folder. Instead, I deinstalled QGIS completely using my package
manager. As far as I understand it, that should wipe out my system pckages,
wherever they are, and that without deleting my plugins. I tried that but
got the same problem again. Afterwards, I deleted the .qgis folder in my
home directory, but that didn't change anything either. Perhaps I've
understood you wrong? Did I do that right?

Thanks,
Daniel

--

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Softwarecenter 3
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: l...@isi-solutions.org
Web: http://www.isi-solutions.org




2012/7/10 Sandro Santilli 

> On Mon, Jul 09, 2012 at 11:35:07PM +0200, Daniel Lee wrote:
> > Dear list,
> >
> > As this is my first post to this list, first of all hello ;)
> >
> > I'm really excited about the new version of QGIS. Working with OpenSUSE
> > 12.1 64-bit, I upgraded from the Geo repository to 1.8.0. Now, however,
> > QGIS won't start. On the CL I get the following error:
> >
> > qgis
> > Warning: loading of qgis translation failed
> > [/usr/share/qgis/i18n//qgis_en_US]
> > Warning: loading of qt translation failed
> > [/usr/share/qt4/translations/qt_en_US]
> > qgis: siplib.c:10965: sipEnumType_alloc: Assertion
> > `(((currentType)->td_flags & 0x0007) == 0x0003)' failed.
> > Aborted
> >
> > The splash screen pops up briefly but dies as soon as the process is
> > aborted. I'm also not able to find the library in question - does anybody
> > know of a way of fixing this? Thanks a bunch!
>
> Try wiping out any old qgis library file.
> `sudo rm -rf /usr/local/lib/qgis` worked for me.
> Please let us know if it fixes your issue.
>
> If it does, it's the most annoying QGIS bug IMHO. It's been in QGIS for
> so long that you may spot it in slippers reading a newspaper on the couch.
>
> --strk;
>
>   ,--o-.
>   |   __/  |Delivering high quality PostGIS 2.1
>   |  / 2.1 |http://strk.keybit.net - http://vizzuality.com
>   `-o--'
>
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] [Qgis-user] Cast your vote: Default icon theme for QGIS 2.0

2012-07-10 Thread Daniel Lee
Hi there,

I also think the GRASS theme is great, although I have to say that I'm a
long-time GRASS user. I've often heard complaints about QGIS' icon set,
especially in Windows - people feel that it looks a bit unserious, although
I don't see it that way. However, I do see great advantages in
consolidating the use of FOSS GIS to these to main overarching packages -
it's great to have lots of products but we're a specialized, rather small
community and it's good when people don't invest their time in reinventing
the wheel. In that sense, I would support style unification across QGIS and
GRASS - it would make it easier to jump back and forth and perhaps
encourage the use of the GRASS plugin more.

Best,
Daniel

--

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Softwarecenter 3
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: l...@isi-solutions.org
Web: http://www.isi-solutions.org




2012/7/10 Martin Landa 

> 2012/7/10 Yves Jacolin (free) :
> > Am I the only one finding the new QGIS theme icon so ugly (sorry if the
> > word seems strong, I can't find another one as my vocabulary is limited)?
>
> hm, are you referring to Robert's icon theme? Well this is really
> personal taste, and I would hesitate to use "ugly" in this regard
> (even my vocabulary is also limited). Feel free to design your icon
> set which will be less "ugly" for you. Good luck! Probably I am not
> used from the GRASS community to read such strong words.
>
> Martin
>
> --
> Martin Landa  * http://geo.fsv.cvut.cz/~landa
> ___
> 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


[Qgis-developer] QGIS allocation error after upgrade to 1.8.0

2012-07-09 Thread Daniel Lee
Dear list,

As this is my first post to this list, first of all hello ;)

I'm really excited about the new version of QGIS. Working with OpenSUSE
12.1 64-bit, I upgraded from the Geo repository to 1.8.0. Now, however,
QGIS won't start. On the CL I get the following error:

qgis
Warning: loading of qgis translation failed
[/usr/share/qgis/i18n//qgis_en_US]
Warning: loading of qt translation failed
[/usr/share/qt4/translations/qt_en_US]
qgis: siplib.c:10965: sipEnumType_alloc: Assertion
`(((currentType)->td_flags & 0x0007) == 0x0003)' failed.
Aborted

The splash screen pops up briefly but dies as soon as the process is
aborted. I'm also not able to find the library in question - does anybody
know of a way of fixing this? Thanks a bunch!

Daniel

--

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Softwarecenter 3
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: l...@isi-solutions.org
Web: http://www.isi-solutions.org
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] installing on Citrix.

2011-12-23 Thread Daniel C
That's good to know - no difficulties at all? Just install and get going?

More fully what I'm looking at is it working with Windows Server 2003,
enterprise edition in one central office location, with those off
sight using Citrix web metaframe...

Just trying to save on those ArcGIS license costs...!

Dan.

On 23 December 2011 09:20, Andreas Neumann  wrote:
> I don't know about Citrix, but we succesfully use QGIS in a Terminal-Server
> Environment.
>
> Andreas
>
>
> On Fri, 23 Dec 2011 09:13:32 +, Daniel C wrote:
>>
>> Hello all,
>>
>> Does anyone out there have any experience with making QGIS available
>> to many users through a Citrix Web metaframe?
>>
>> Trying to avoid doing mulitple local installs.
>>
>> Anyone done anything similar or had any experience? Any common
>> problems/things to look out for?
>>
>> Or is it not even recommended?
>>
>> Dan.
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> --
> --
> Andreas Neumann
> Böschacherstrasse 10A
> 8624 Grüt (Gossau ZH)
> Switzerland
> ___
> 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


[Qgis-developer] installing on Citrix.

2011-12-23 Thread Daniel C
Hello all,

Does anyone out there have any experience with making QGIS available
to many users through a Citrix Web metaframe?

Trying to avoid doing mulitple local installs.

Anyone done anything similar or had any experience? Any common
problems/things to look out for?

Or is it not even recommended?

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