[QGIS-Developer] Python libraries default of QGIS

2021-06-30 Thread Luiz Motta
Hi guys,

I use a long times ago the Numpy in my plugins.

But, for my surprise, recently i discover that is possible use the
PILLOW(PIL) no need to install.

I would like know how i find which the Python libraries are installed by
QGIS?

Example, can i use "import scipy" can i use "import scipy" without need
install.

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


[QGIS-Developer] Fwd: Change values Temporal Controller Panel

2020-11-06 Thread Luiz Motta
Hi Richard,

Your code was exactly what I needed.

Thanks so much!

Regards,
Luiz Motta



Em sex., 6 de nov. de 2020 às 11:08, Richard Duivenvoorde <
rdmaili...@duif.net> escreveu:

> Hi Luiz,
>
> We have fixed stuff to be able to use temporal stuff in pyqgis just before
> 3.16
>
> I wrote some docs (with exampless) in the QGIS Documentation:
>
> https://github.com/qgis/QGIS-Documentation/pull/5521
>
> It still fails in Travis, but in this commit is example code:
>
>
> https://github.com/qgis/QGIS-Documentation/blob/4ebc236d06a7ff2b6454ea5b8f94929b2b8423d0/docs/pyqgis_developer_cookbook/temporal_data.rst
>
> Hope this helps,
>
> Regards,
>
> Richard Duivenvoorde
>
>
> On 11/6/20 2:47 PM, Luiz Motta wrote:
> > Hi All,
> >
> >  I would like to change the values of the Temporal Controller Panel in
> my plugin.
> >
> > How do I change the Range of datetimes and the values of step and unit
> time using python?
> >
> >  Regards,
> >  Luiz Motta
> >
> > ___
> > 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] Change values Temporal Controller Panel

2020-11-06 Thread Luiz Motta
Hi All,

 I would like to change the values of the Temporal Controller Panel in my
plugin.

How do I change the Range of datetimes and the values of step and unit time
using python?

 Regards,
 Luiz Motta
___
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] Crash for signal layerOrderChanged

2018-10-29 Thread Luiz Motta
Hi,

I need get the signal when have change of layers order of legend.

I tried use the signal of  layerOrderChanged, but, crash QGIS.
Version: 3.4
Code 4a4b62e 
OS: Kubuntu 18.04

I used the Terminal Python:

def changeOrder():
print('Change order')

root = QgsProject.instance().layerTreeRoot()

root.layerOrderChanged.connect(changeOrder) # Crash for normal layer

root.customLayerOrderChanged.connect(changeOrder) # None crash for normal
layer

It is a Bug ?

What is a custom layer ?
___
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] Factorizing a dbf

2018-01-22 Thread Luiz Motta
Hi Paolo,

A possible insight can be this:
- Create a table with two columns:  'string from SHP' and 'respective
number code'.
- In SHP create the Union with the table above.
- Use Calculator for populate the new field in SHP with value of code.

Good lucky.


2018-01-22 9:18 GMT-02:00 Paolo Cavallini :

> Hi all,
> I have a large shp with a number of repeated strings, and I'd like to
> refactor it replacing strings with a numeric code. I have found a
> Processing alg that does it, creating a new file each time, which is
> cumbersome; moreover, the alg apparently changes field type, adding
> decimals to reals. Of course I could create a CASE statement, but this
> is also cumbersome.
> Is there a more straightforward way?
> Thanks.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Thanks!

2017-12-27 Thread Luiz Motta
Hi Guys,

Recently, I received the issue about Catalog Planet Labs Plugin, and I
after fixed, the message of user[1] had the phrase:
"It makes my life much easier"

YES, the QGIS is making the life os people around the world "easier".

This year is ending, then, I desire for you a new year "easier" for you.

Cheers,
Luiz


[1] https://github.com/lmotta/catalogpl_plugin/issues/1


2017-12-27 7:56 GMT-02:00 Paolo Cavallini :

> Il 27/12/2017 10:41, Andreas Neumann ha scritto:
> > Hi,
> >
> > I can only second Matthias' statements! It is a pleasure to work with
> > the QGIS community!
>
> true - in my experience, the best (most productive and pleasant)
> community I've met.
> All the best, and long life QGIS!
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Deploy plugin by setting QGIS_PLUGINPATH

2017-11-16 Thread Luiz Motta
Hi Zhang,

In my plugins, I use the '__file__' for get the path of my plugin.

Example in '__ini__.py':

import os
dirPlugin = os.path.dirname(__file__)





2017-11-16 8:47 GMT-02:00 Patrick Dunford :

> There are sometimes reasons why this method may not work (I think Ubuntu
> does have a particular limitation in this regard)
>
> One option is you can create a shortcut on the menu and pass the variable
> value in that shortcut.
> For example one of the Qgis shortcuts on the Whiskers menu in XFCE on my
> computer uses this command to start a version of Qgis that I built from
> source and installed to a different path:
>
> env LD_LIBRARY_PATH=/home/patrick/apps/lib /home/patrick/apps/bin/qgis
>
> where env is passing that variable into the environment that Qgis starts
> with.
>
>
> On 16/11/17 23:33, Zhang Qun wrote:
>
> Dear all,
>
> I want to use the QGIS_PLUGINPATH environment variable to point to the
> directory where my plugin are located but did not manage to get it work.
>
> I'm on Ubuntu16.04 and running QGIS 2.18.
>
> I set the variable in terminal by:
> $ export QGIS_PLUGINPATH=~/QGIS_Plugins/rndf-editor/RNDFEditor/
>
> and launch the QGIS in this terminal (I guess in order to get the variable
> effective I have to run within the terminal right?)
>
> $ qgis
>
> But my plugin still did not get to show under the manu Plugin.
>
> Can anyone advise me the correct way to do it? Thanks.
>
> Best regards,
> Zhang Qun
>
>
> ___
> QGIS-Developer mailing listqgis-develo...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Enable/Disable contextual menu layer

2017-10-02 Thread Luiz Motta
>
> Hi Devs,
>
> I am writing a plugin and i have this issue:
> The action inside the contextual menu of one layer when this is disabled,
> it not is show with gray color(default for disable item)
>
> Example code:
> https://pastebin.com/hSefEM7m
>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Difference for transform reference system between QGIS and GDAL

2014-01-17 Thread Luiz Motta
Andre,

Thank for quickly response.

The question is exact this, why the QGIS read the PRJ and understands the
'towgs84', otherwise, the GDAL don't understands, where , the QGIS use the
GDAL/OGR provider ?

File PRJ:
PROJCS[SAD69_UTM_zone_21S,GEOGCS[GCS_SAD69,DATUM[D_South_American_1969,SPHEROID[GRS_1967_Truncated,6378160,298.2496]],PRIMEM[Greenwich,0],UNIT[Degree,0.017453292519943295]],PROJECTION[Transverse_Mercator],PARAMETER[latitude_of_origin,0],PARAMETER[central_meridian,-57],PARAMETER[scale_factor,0.9996],PARAMETER[false_easting,50],PARAMETER[false_northing,1000],UNIT[Meter,1]]

Proj4 for QGIS:
+proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0
+units=m +no_defs

Proj4 for GDAL:
+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs

Regards,
Luiz Motta


2014/1/17 Andre Joost andre+jo...@nurfuerspam.de

 Am 17.01.2014 03:01, schrieb Luiz Motta:

  Hi all,

 I had differences for transform the reference system of geometries between
 GDAL and QGIS.

 I made the transform using GDAL into geometry with reference system  SAD
 69
 UTM (EPSG 29191) to WGS 84 (EPSG 4326) .

 When i add in QGIS the geometries with WGS84 and SAD 69  using 'on the
 fly'
 (WGS84), has diferences positions of coordinate (see picture).

 The QGIS reads the reference system of shapefile different than GDAL (see
 layer property).

 I would like understand how using GDAL for transform geometries this
 reference system of this shapefile ?

 How can difference reading shapefile by QGIS and GDAL ?


 The shapefiles .prj file has no +towgs84 parameters, so GDAL sets them to
 zero.

 QGIS assigns the EPSG:29191 to the file, which has +towgs84 parameters.

 HTH,
 André Joost
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Luiz Motta
Analista Ambiental - IBAMA/COTIG
Instituto Brasileiro do Meio Ambiente dos Recursos Naturais - IBAMA
IBAMA - SCEN Trecho 2 - Ed. Sede - Cx. Postal nº 09566
CEP 70818-900 - Brasília-DF
Tel: 61.3316-1807
Skype: ibama_luiz-motta
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Difference for transform reference system between QGIS and GDAL

2014-01-17 Thread Luiz Motta
Hi all,

Thank Jürgen for your  explanation about how QGIS set the reference system
from source.

I agreement with André Joost about the user should  select your specific
reference.

The source of my problem is the creating of shapefile by GDAL/OGR.

For creating shapefile, the OGR/GDAL not using  all parameters of reference
system.

I resolve my problem, creating the GML file, in this case, the refefence
system is identical of source.

How suggested Etienne i will raise this issue in gdal-dev list.

If someone want to see the script example:
http://pastebin.com/PbjwdrHR

Regards,
Luiz Motta



2014/1/17 Andre Joost andre+jo...@nurfuerspam.de

 Am 17.01.2014 11:56, schrieb Luiz Motta:


  The question is exact this, why the QGIS read the PRJ and understands the
 'towgs84', otherwise, the GDAL don't understands, where , the QGIS use the
 GDAL/OGR provider ?


 This is an intended behaviour.

 Other software (like ESRI) don't write datum shifts in the .prj file, but
 leave it to the end user to select one of the available shifts. QGIS has to
 handle these files correctly, so it looks up the EPSG table and selects the
 best fitting code. If you think it has guessed wrong, you can assign
 another CRS to the layer.

 GDAL does no guessing. Unless there are not datum shifts provided on
 source and target CRS (using either +datum, +towgs84 or +nadgrids), it does
 no datum shift at all. You can specify -s_srs to override the source file's
 .prj file with an EPSG code that contains a datum shift. This should bring
 the same result as QGIS does automatically.


 HTH,
 André Joost
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Luiz Motta
Analista Ambiental - IBAMA/COTIG
Instituto Brasileiro do Meio Ambiente dos Recursos Naturais - IBAMA
IBAMA - SCEN Trecho 2 - Ed. Sede - Cx. Postal nº 09566
CEP 70818-900 - Brasília-DF
Tel: 61.3316-1807
Skype: ibama_luiz-motta
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Difference for transform reference system between QGIS and GDAL

2014-01-16 Thread Luiz Motta
Hi all,

I had differences for transform the reference system of geometries between
GDAL and QGIS.

I made the transform using GDAL into geometry with reference system  SAD 69
UTM (EPSG 29191) to WGS 84 (EPSG 4326) .

When i add in QGIS the geometries with WGS84 and SAD 69  using 'on the fly'
(WGS84), has diferences positions of coordinate (see picture).

The QGIS reads the reference system of shapefile different than GDAL (see
layer property).

I would like understand how using GDAL for transform geometries this
reference system of this shapefile ?

How can difference reading shapefile by QGIS and GDAL ?


Data for help me:
1) python script using GDAL:
http://pastebin.com/ujeHJLx5

2) Shapefile with SAD69 UTM
https://dl.dropboxusercontent.com/u/14847115/diff_qgis-gdal/sad69_utm.zip

3) Picture of QGIS with a difference between geometries
https://dl.dropboxusercontent.com/u/14847115/diff_qgis-gdal/diff_transform.png

The code of python print the two geometries in WKT format.
I use the QuickWKT plugin for view these geometries

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

Re: [Qgis-developer] Announcing the release of QGIS 1.7 'Wrocław'

2011-06-19 Thread Luiz Motta
Tim,

Congratulations for release.

At moment, i opened the QGIS's homepage(www.qgis.org), this page yet
has the old name (Copiapó), lets go starting well this week with good
news for QGIS's users.

Regards,
Luiz

2011/6/19 Tim Sutton li...@linfiniti.com:
 We are very pleased to announce the release of QGIS 1.7.0, the next in
 our development release series. This release contains new features and
 extends the programmatic interface over QGIS 1.0.x and QGIS 1.6.0. As
 with any software, there may be bugs and issues that we were not able
 to fix in time for the release. We therefore recommend that you test
 this version before rolling it out en-masse to your users. You can
 find a list of hightlighted changes and new features listed on the
 detailed release announcement available here:

 http://qgis.org/component/content/article/127-qgis-1-7-release.html

 Binary and source code packages are available at:

 http://download.qgis.org

 If there is not yet a package for your platform on the above page,
 please check back regularly as packagers are still pushing out their
 work and they will update the download page to reflect the new
 packages. Along with the release of QGIS 1.7.0, the QGIS Community
 Team is hard at work on an updated QGIS Users' Guide version 1.7.0.
 The guide will be available in the near future - we will post
 announcements when it is available.

 QGIS is a completely volunteer driven project, and is the work of a
 dedicated team of developers, documenters and supporters. We extend
 our thanks and gratitude for the many, many hours people have
 contributed to make this release happen. We would also like to thank
 our sponsors and donors for helping to promote our work through their
 financial contributions. A current list of sponsors and donors can be
 seen here:

 http://qgis.org/en/sponsorship/sponsors.html
 http://qgis.org/en/sponsorship/donors.html

 If you would like to make a donation or sponsor our project, please
 visit http://www.qgis.org/en/sponsorship.html . QGIS is Free software
 and you are under no obligation to do so.

 Happy QGIS'ing!

 --
 Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
 ==
 Please do not email me off-list with technical
 support questions. Using the lists will gain
 more exposure for your issues and the knowledge
 surrounding your issue will be shared with all.

 Visit http://linfiniti.com to find out about:
  * QGIS programming and support services
  * Mapserver and PostGIS based hosting plans
  * FOSS Consulting Services
 Skype: timlinux
 Irc: timlinux on #qgis at freenode.net
 ==
 ___
 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] Announcing the release of QGIS 1.7 'Wrocław'

2011-06-19 Thread Luiz Motta
Tim,


 At moment, i opened the QGIS's homepage(www.qgis.org), this page yet
 has the old name (Copiapó), lets go starting well this week with good
 news for QGIS's users.


 Its probably just your cache - I updated the web page before sending
 out the notice to reflect the new version. Based on Jean-Roc's
 suggestion I updated the banner again just now.


I tested again and the homepage was updated with the Wroclaw banner.
Thanks!

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


[Qgis-developer] Presentations with QGIS in FOSS4G 2011

2011-06-11 Thread Luiz Motta
Hi all,

I am writing  about the importance of  participate in FOSS4G 2011 this
year, i need director's authorization for i can travel.
I researched about using of QGIS in FOSS4G's presentations, then i found 10.
May be is useful for some people.

http://2011.foss4g.org/program/session-schedule
1) Introduction to the Humanitarian OpenStreetMap Team
2) New features for QGIS power users
3) Customizing QGIS with Python Plugins
4) Quantum GIS  Inkscape: Cartographic Tools for Attractive Maps
5) QGIS in an Academic Library: A Case Study
6) QGIS, what's new?
7) Publishing maps from the desktop with QGIS server
8) Cellular Automata QuantumGIS plugin and web-based application
9) Lifemapper Moves Forward: Bringing Together Geospatial and
Biodiversity Informatics Tools to Save the World
10) FOSS4G: Technology Enabling Humanitarian Relief Efforts * I am here!

Regards,
Luiz Motta


2011/5/5 Pirmin Kalberer pi...@sourcepole.com:
 Hi all,
 Please vote for your favorite talks for the coming FOSS4G in Denver.
 Hint: There are a few QGIS abstracts...
 The vote closes this Saturday.
 Regards
 Pirmin

 --  Weitergeleitete Nachricht  --

 Betreff: [Foss4g2011] FOSS4G program community voting now open!
 Datum: Mittwoch, 27. April 2011, 05.30:59
 Von: Peter Batty pe...@ebatty.com
 An: foss4g2011 foss4g2...@lists.osgeo.org, OSGeo Discussions
 disc...@lists.osgeo.org

 Hi everyone,

 The community voting system is now open for FOSS4G 2011, at
 http://community-review.foss4g.org/ . Please try to take some time to review
 the abstracts and indicate your level of interest in each. The conference
 committee will use the results of the vote to help choose which
 presentations to accept, and to assign appropriately sized rooms based on
 level of interest. Voting will be open this week and next, closing on May
 8th.

 Cheers,
    Peter.

 -
 --
 Pirmin Kalberer
 Sourcepole  -  Linux  Open Source Solutions
 http://www.sourcepole.com
 ___
 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] new ubuntu compile problem

2011-05-02 Thread Luiz Motta
Marco,

I just upgraded to ubuntu 11.04 and had the same problem about
SIP(Couldn't load PyQGIS)

I am running perfectly QGIS, to this i follow this steps:

1) Remove all files and directories in 'build' directory

2) Inside 'build' directory:
2.1) Set the makefile:
sudo ccmake ..
2.2) Make and install QGIS
sudo make
sudo make install

* in my case, i made update of sources(checkout from SVN)

3) Install the OSGEO binding for Python
sudo apt-get install python-gdal
* when updated the ubuntu, the system removed the OSGEO binding

Hope it helps.

Luiz

2011/5/2 Mayeul Kauffmann mayeul.kauffm...@free.fr:
 Hi Marco,
 Myself I migrated to Ubuntu 10.10 and I had the python issue when
 building r15676 last Saturday but Martin hint (completely remove your
 build directory) solved the problem for me.
 My /etc/apt/sources.list contains the following:
 deb http://qgis.org/debian-nightly natty main
 deb-src http://qgis.org/debian-nightly natty main

 Do you use one of the followings?
 https://launchpad.net/~qgis/+archive/stable
 http://les-ejk.cz/ubuntu/  #  GIS for Ubuntu
 deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu

 Does are some I tend to use in the past and that are now commented out
 in my sources.list

 Hope it helps. Good luck!
 Mayeul

 Le lundi 02 mai 2011 à 11:48 +0200, Martin Dobias a écrit :
 On Mon, May 2, 2011 at 11:40 AM, Marco Bernasocchi
 ma...@bernawebdesign.ch wrote:
 
  I would expect that you have maybe an incompatible version of sip
  generator and sip python module or something similar. Not sure though
  about the cause.
 
  I look into it tonite. But i guessed a similar cause. Is it correct that
  trunk needs sip api v 7?

 No. QGIS does not care about sip api version. That is an internal
 matter of SIP - it forbids running python modules using incompatible
 spi api version to protect users from misbehavior (or crashes) due to
 changes in SIP interals between incompatible sip releases.

 Martin
 ___
 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] Status of Release 1.7 and Raster-on-the-Fly

2011-03-17 Thread Luiz Motta
Alexander,

I already made a post  in QGIS Brazil community about Raster on the Fly:
http://qgisbrasil.wordpress.com/

Sorry, it is in Portuguese.

I wrote, this a new feature will appear in release 1.7

Luiz

2011/3/17 Alexander Bruy alexander.b...@gmail.com:
 On Thu, 17 Mar 2011 10:53:25 -0500
 Bruce, Bob (CON) bob.br...@gov.mb.ca wrote:

 I am preparing to do a presentation on QGIS to a GIS users group meeting in 
 Brandon on Friday. What can I say about when 1.7 will come out? Will it have 
 the Raster-on-the-Fly capability that is being tested at the moment?

 Raster reprojection already in trunk and AFAIK will be available in
 upcoming 1.7 release.

 --
 Alexander Bruy
 ___
 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] Compiling Linux/ubuntu 64 bits

2011-03-17 Thread Luiz Motta
Hi Devs,

At now, i compile the QGIS R15530, Linux/Ubuntu 10.10 64 bits

I can't use plugins  python, i receive this error:

Couldn't load PyQGIS.
Python support will be disabled.

Traceback (most recent call last):
  File , line 1, in
ImportError: /usr/local/share/qgis/python/qgis/core.so: undefined
symbol: _ZN14QgsMapRenderer17setDestinationSrsERK28QgsCoordinateReferenceSystem


Python version:
2.6.6 (r266:84292, Sep 15 2010, 16:41:53)
[GCC 4.4.5]

QGIS version:
1.7.0-Trunk 'Trunk', 15530

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


Re: [Qgis-developer] Not able to save a layer as a tab file

2011-03-16 Thread Luiz Motta
Milena,

I confirm yours comment about write file in format TAB.

I read the source and i believe has a procedure inconsistent in file:
http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsvectorfilewriter.cpp

I would like that Tim could see the method
QgsVectorFileWriter::driverMetadata(Line 895):

else if ( driverName.startsWith( MapInfo File ) )
{
  longName = Mapinfo File;
  trLongName = QObject::tr( Mapinfo File );
  glob = *.mif *.tab;
  ext = mif ;
}

This method set the ext(extension) equal  mif.

In method QgsVectorFileWriter::QgsVectorFileWriter in line 134:

if ( QgsVectorFileWriter::driverMetadata( driverName, longName,
trLongName, glob, ext ) )
{
  if ( !vectorFileName.endsWith( . + ext, Qt::CaseInsensitive ) )
  {
vectorFileName += . + ext;
  }
}

We can see that  extension is mif (always), then, the output format
is the MIF.

You can open the ticket about this.

Regards,
Luiz





I read the

2011/3/16 Milena Nowotarska do.mile...@gmail.com:
 Hi,

 In QGIS we were able to save a vector layer as MapInfo tab. In r15470 (and
 before) we are able to save as MapInfo mif only.
 If you try to force the file extension by inserting name.tab you will get
 name.tab.mif in the end anyway.
 Using win7 and osgeo4w.


 Milena

 --
 Milena Nowotarska
 http://wiki.osgeo.org/wiki/Milena_Nowotarska
 http://quantum-gis.pl/     ||     http://grass-gis.pl/


 ___
 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] crash addind wms server from mapproxy

2011-03-14 Thread Luiz Motta
Duarte,

I can see OMS layer.

Enviroment:
Windows XP
QGIS trunck R15470

The problem is the on the fly.
It is need use the  same CRS of the OSM (EPSG: 4326) to work with others layers.

Luiz

2011/3/14 Duarte Carreira dcarre...@edia.pt:
 Can anyone confirm this?



 1)  Add wms server http://osm.omniscale.net/proxy/service?tiled=true

 2)  Connect, and answer twice “No” to questions about ignoring
 advertised url (I supposed this always happens with wms-c services?)

 3)  Select “osm” layer

 4)  Click Add

 5)  QGIS crashes



 Using Win 7 32bit, QGIS 1.7 r15458.



 Duarte

 ___
 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] Multipart to Singlepart: empty result

2011-03-12 Thread Luiz Motta
Hi Agustin,

I created the single part making adjust of code.

I have two observations

1) The projection of your data is not  recognized by  by QGIS (see the PRJ file)
It is not problem for run the process from multi to single part

2) The fTools have one BUG in method of  multi_to_single:
2.1) Source:
http://trac.osgeo.org/qgis/browser/trunk/qgis/python/plugins/fTools/tools/doGeometry.py

2.2) Line 357/358
writer = QgsVectorFileWriter( self.myName, self.myEncoding,
 fields,  vprovider.geometryType() , vprovider.crs() )

Obs: The layer to be create need be single part, it is what you want, but
the define of type the geometry for new layer is the same of original
( vprovider.geometryType() ).

2.3) Adjust in code:
2.3.1) In line 354 put:
geometryTypeWriter = vprovider.geometryType() - 3
2.3.2) In line 358 change:
 vprovider.geometryType()  to geometryTypeWriter

Please, open the ticket to Carson make the best solution for BUG

Regards,
Luiz Motta


2011/3/12 Agustin Lobo alobolis...@gmail.com:
 Hi!
 Having
 https://sites.google.com/site/openfiles2/home/ikn2_testsites_dis.zip
 as input, I want to get a layer in which each point be an independent object
 keeping the field of the original layer as a second column in the table.
 I try with Vector/Multipart2Singlepart, but get an empty layer.

 I'm not sure if this is a problem of the tool o of the inout layer.

 Any help appreciated,

 Thanks

 Agus
 ___
 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] Raster on the fly

2011-03-11 Thread Luiz Motta
QGIS r15426 for Windows by OSGEO4W is working one simple image (CBERS
satellite image).

I will continue testing with a lot of image (example PALSAR with diferent zone).



2011/3/11 Ramon Andinach cust...@westnet.com.au:

 On 10/03/2011, at 08:11 , Ramon Andinach wrote:


 On 09/03/2011, at 18:35 , Giovanni Manghi wrote:


 I am testing with:
 1) Windows XP
 2) QGIS 1.7 r15395

 The QGIS crash with steps below:
 1) Open image
 2) Enable   on the fly with CRS WG84/Geographic (EPSG 4326)
 3) Zoom to layer extent * Crash


 But the crash is confirmed (also) under Windows Seven, Osgeo4w.

 It's working.

 Wow.

 That's very cool.

 Thanks Radim, Giovanni and everyone else who has been working on this.

 -ramon.
 ___
 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] Raster on the fly

2011-03-09 Thread Luiz Motta
Nole,

I update the QGIS trunk by OSGEO4W, at the moment, the version is
R15409, but when i enable the on the fly the QGIS crash.

I tested with same image of Ubuntu 10.10 in QGIS R15400 this run perfect.



2011/3/9 Noli Sicad nsi...@gmail.com:
 Ramon,

 Try to tweak your Osgeo4w installer and install the experimental
 releases. Look for the rt15395 or later built. This is the new raster
 provider that Radim just committed.

 Noli



 On 3/10/11, Ramon Andinach cust...@westnet.com.au wrote:

 On 09/03/2011, at 18:35 , Giovanni Manghi wrote:


 I am testing with:
 1) Windows XP
 2) QGIS 1.7 r15395

 The QGIS crash with steps below:
 1) Open image
 2) Enable   on the fly with CRS WG84/Geographic (EPSG 4326)
 3) Zoom to layer extent * Crash


 But the crash is confirmed (also) under Windows Seven, Osgeo4w.


 Wondering, is there a library or similar that us windows end people should
 have installed, but didn't?___
 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


[Qgis-developer] Compile QGIS r15395 - ui_qgisapp.h not found

2011-03-08 Thread Luiz Motta
Devs,

I tried compile QGIS r15395, in ubuntu 10.10,  and get this message:

[ 35%] Building CXX object src/app/CMakeFiles/qgis.dir/main.cpp.o
In file included from /home/lmotta/dev/cpp/qgis/src/app/main.cpp:66:
/home/lmotta/dev/cpp/qgis/src/app/qgisapp.h:83: fatal error:
ui_qgisapp.h: Arquivo ou diretório não encontrado
compilation terminated.
make[2]: ** [src/app/CMakeFiles/qgis.dir/main.cpp.o] Erro 1
make[1]: ** [src/app/CMakeFiles/qgis.dir/all] Erro 2
make: ** [all] Erro 2

I followed the qgis-1.6.0_coding-compilation_guide_en.pdf (using ccmake).

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


Re: [Qgis-developer] Shapefile: prj vs qpj (CRS info)

2011-03-01 Thread Luiz Motta
Hi Benoit,

I created a new shapefile by QGIS with same CRS of Town (EPSG 32630).

The QGIS created two files of projections: PRJ and  QPJ.

The PRJ have the same value of yours (Town.prj) but the QPJ don´t have
same value (see below):

1) Default -PRJ :

PROJCS[WGS_1984_UTM_Zone_30N,GEOGCS[GCS_WGS_1984,DATUM[D_WGS_1984,SPHEROID[WGS_1984,6378137,298.257223563]],PRIMEM[Greenwich,0],UNIT[Degree,0.017453292519943295]],PROJECTION[Transverse_Mercator],PARAMETER[latitude_of_origin,0],PARAMETER[central_meridian,-3],PARAMETER[scale_factor,0.9996],PARAMETER[false_easting,50],PARAMETER[false_northing,0],UNIT[Meter,1]]

2) Create by QGIS - QPJ :

PROJCS[UTM Zone 30, Northern Hemisphere,GEOGCS[WGS
84,DATUM[WGS_1984,SPHEROID[WGS
84,6378137,298.257223563,AUTHORITY[EPSG,7030]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[EPSG,6326]],PRIMEM[Greenwich,0,AUTHORITY[EPSG,8901]],UNIT[degree,0.0174532925199433,AUTHORITY[EPSG,9108]],AUTHORITY[EPSG,4326]],PROJECTION[Transverse_Mercator],PARAMETER[latitude_of_origin,0],PARAMETER[central_meridian,-3],PARAMETER[scale_factor,0.9996],PARAMETER[false_easting,50],PARAMETER[false_northing,0],UNIT[Meter,1]]

The QGIS read CRS only by QPJ value.

You can put this value(QPJ) inside in PRJ file for work with QGIS.


The questions is:
Why, QGIS have two different values for WKT CSR  for same EPSG 32630 ?
One for PRJ other for QPJ



2011/3/1  benoi...@bc-consult.com:
 Hi Paolo,

 Please see attached zip file (small 2KB file)

 It contains:
 - A point shapefile with its CRS set to WGS84 UTM30N (prj file only) and a
 single point (located over the town of Kumasi in Ghana)
 - A QGIS project in Google Mercator CRS.

 When you load the shapefile into the project and then use the google plugin
 to display the satellite image around the point you could note that the
 satellite image is not what you expect (if you know the area).
 Also, double click the shapefile layer and go to the General tab. The CRS is
 set to Google Mercator, not UTM30N.

 Quit QGIS, rename the prj to qpj and do the above process again, and all is
 correct now.

 I hope you can reproduce this behaviour.

 Regards,
 Benoit



 On Tue, 01 Mar 2011 12:13:03 +0100, Paolo Cavallini cavall...@faunalia.it
 wrote:

 Il giorno mar, 01/03/2011 alle 12.59 +0200, Tim Sutton ha scritto:

 I tested with a shp that I use in training courses I give. For me if I
 rename the qpj, the prj is still recognised correctly.

 Just checked: a shp with a prj, no qpj is recognized and reprojected
 correctly.
 Could you please share the shp that gives you trouble?
 All the best.

 ___
 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] Get name FID of vector Layer

2011-02-18 Thread Luiz Motta
Devs,


I need get the name field of Feature Index of vector file.

For Shapefile provider, i can use the string FID.

But, the database provider, example Postgis or Spatialite, i need find
the name field of Primary key use for FID.

I don't find the methods in classes QgsVectorLayer and QgsDataprovider

In OGR i have the method GetFIDColumn (i don't test).

The idea is add in canvas the layer with FID's selected from layer.

The example of script to use in python console QGIS:

from qgis import core, gui

lyr = qgis.utils.iface.mapCanvas().currentLayer()
addLyr = core.QgsVectorLayer(lyr.source(), test_subset, lyr.providerType())
addLyr.setSubsetString(FID IN (0,1,2))
core.QgsMapLayerRegistry.instance().addMapLayer(addLyr)

The script run in shapefile, but, i need find the name of Key  in
layer from database.

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


[Qgis-developer] Icons for update spatialquery plugin

2011-02-14 Thread Luiz Motta
Robert Szczepaneks,

In ticket 2634, Tim talked  to me about the possible yours help.
I need your help to make better icons of update Spatialquery Plugin.

You can see the icons in:
http://trac.osgeo.org/qgis/attachment/ticket/2634/spatialquery_update_V.jpg

The link for download of icons:
http://trac.osgeo.org/qgis/raw-attachment/ticket/2634/update_spatiaquery_V.zip

Below the list of icons with the information that represents:
1) select.jpg: make selection on target layer with list of FIDs.
2) selectadd.jpg: add the list of FIDs to selection(on target layer)
3) selectremove.jpg: remove of selection the features inside list of FIDs
4) selectesubsetlayer.png: create a subset for target layer with the list of
FIDs
It is the expression of query to target layer. The result is the target
layer with
only the FID's

I will appreciate your help.

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


[Qgis-developer] Update plugin spatialquery

2011-02-06 Thread Luiz Motta
Devs,

Please, see if is possible make update of spatialquery plugin for trunk.
The patch is in ticket  #2634.

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


[Qgis-developer] Open Raster WGS84/Geographic call for setting system reference

2011-02-01 Thread Luiz Motta
Hi Dev,


Today i had open one image in WGS84/Geographic. The QGIS (trunk 15118) ask
me for setting the reference system of image.

When image have the one projection system reference, the QGIS don´t ask
about system reference.

The QGIS 1.6 open the image in WGS84/Geographic without asking about the
reference system.

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


Re: [Qgis-developer] Openlayers plugin python error

2011-01-19 Thread Luiz Motta
Giovanni,

The message  error occurr in  MemoryLayerSaver's plugins.

Disable all plugins and work only OpenLayers's plugin.

Open the layer (ex.: shapefile with projection) and try



2011/1/19 Giovanni Manghi giovanni.man...@gmail.com

 Hi,

 under Ubuntu linux (10.04) and qgis trunk I get the following when
 adding layers with the Openlayers plugin. The error is not critical as
 the layer is added in any case.


 An error has occured while executing Python code:

 Traceback (most recent call last):
  File
 /home/gio/.qgis/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py,
 line 41, in connectProvider
if self.isSavedLayer(layer):
  File
 /home/gio/.qgis/python/plugins/MemoryLayerSaver/MemoryLayerSaver.py,
 line 90, in isSavedLayer
if not l.dataProvider():
 AttributeError: 'OpenlayersLayer' object has no attribute 'dataProvider'



 cheers

 -- Giovanni --

 ___
 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 for use Coordinate Transform

2011-01-19 Thread Luiz Motta
Martin,

Thank´s for  your message.

I read the source:
http://doc.qgis.org/head/qgscoordinatetransform_8cpp-source.html#l00558

const char *finder( const char *name )
{
  QString proj;
#ifdef WIN32
  proj = QApplication::applicationDirPath()
 + /share/proj/ + QString( name );
#endif
  return proj.toUtf8();
}

I tested the  value of proj in console:

from PyQt4 import QtCore, QtGui
print  QtGui.QApplication.applicationDirPath()

The out in my enviroment is
 C:\OSGeo4W\apps\qgis-dev\bin,
for my friend is
C:/PROGRA~1/QUANTU~2/apps/qgis/bin

For me, i created and copied directory, from C:\OSGeo4W\share\proj to 
C:\OSGeo4W\apps\qgis-dev\bin\share\proj

With this the problem in windows is resolved.

Need change the  source of path proj in method const char *finder( const
char *name ) or make the  review where have the first setting the directory
for Proj,
 because, when i still  use the plugin, the directory was setting correct

Regards,
Luiz


2011/1/19 Martin Dobias wonder...@gmail.com

 On Mon, Jan 17, 2011 at 3:36 AM, Luiz Motta motta.l...@gmail.com wrote:
  Hi Devs,
  I am making the plugin, where i use this method
  core.QgsCoordinateTransform.transform, the QGis showed dialog error.
  I tested by Python console and the same error showed.
  The script to run on python console:
  from qgis import core
  mapCanvas = qgis.utils.iface.mapCanvas()
  srsCanvas = mapCanvas.mapRenderer().destinationSrs()
  srsGoogle = core.QgsCoordinateReferenceSystem(900913,
  core.QgsCoordinateReferenceSystem.EpsgCrsId)
  pntCenter = mapCanvas.extent().center()
  print pntCenter
  coodTrans = core.QgsCoordinateTransform(srsCanvas, srsGoogle)
  pntCenter = coodTrans.transform(pntCenter,
  core.QgsCoordinateTransform.ForwardTransform) # Error showed here!
  print pntCenter
 
  Message error:
  Title dialog : Exception
  Text message:
  forward transform(-0.832741, -0.274682)
  failed with error: No such file or directory

 Luiz,

 what is the map canvas CRS you have been using? The error message you
 got was an unhandled projection exception (impossible to catch in
 python). The error suggests that some file that proj4 needs is
 missing. However you shouldn't need to init anything. On windows we
 explicitly set where the proj4 files should be (see
 QgsCoordinateTransform::setFinder).

 Martin

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


[Qgis-developer] Error for use Coordinate Transform

2011-01-16 Thread Luiz Motta
Hi Devs,

I am making the plugin, where i use this method
core.QgsCoordinateTransform.transform, the QGis showed dialog error.

I tested by Python console and the same error showed.

The script to run on python console:

from qgis import core
mapCanvas = qgis.utils.iface.mapCanvas()
srsCanvas = mapCanvas.mapRenderer().destinationSrs()
srsGoogle = core.QgsCoordinateReferenceSystem(900913,
core.QgsCoordinateReferenceSystem.EpsgCrsId)
pntCenter = mapCanvas.extent().center()
print pntCenter
coodTrans = core.QgsCoordinateTransform(srsCanvas, srsGoogle)
pntCenter = coodTrans.transform(pntCenter,
core.QgsCoordinateTransform.ForwardTransform) # Error showed here!
print pntCenter

Message error:

Title dialog : Exception
Text message:
forward transform(-0.832741, -0.274682)
failed with error: No such file or directory


My enviroment:
Windows XP
Package from OSGEO install.
QGIS trunck r15051

When i continue running the plugin, the next time call this methods the
error does not appear.

I need initialize one library before call the transform's method  ?

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


Re: [Qgis-developer] Any GPX to PostGIS and GPX to Spatialite plugin

2010-12-14 Thread Luiz Motta
Hi,

Maybe it is better to make the plugin for write vector layers(any source) to
Database (Postgis or Spatialite).


2010/12/14 Noli Sicad nsi...@gmail.com

 Hi,

 Any QGIS plugin for GPX to PostGIS and GPX to Spatialite?

 http://www.postneo.com/2007/01/20/from-gpx-to-postgis

 What do you think of these i.e. GPX to PostGIS and GPX to Spatialite?

 It is useful to have this?

 Anybody planning to develop this plugin,

 Noli
 ___
 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 for postgres's provider when table(statement SELECT ) is outside public's schema

2010-12-14 Thread Luiz Motta
Hi Guiseppe,

Sorry for the mistake on the author of the provider.

I made both test, for both plugins, 'Custom database query' and 'Rt  Sql
Layer, and
with the same result.

When the table is inside public's schema don't have message of error,
otherwise,
i have the message of error, but the layer is created perfect.

I saved the project of QGIS (with the created layer) and open again this
project the message of error was showed.
In this point isolat the  factor of plugin, then, have some problem with
provider.

Regards,
Luiz Motta

2010/12/14 Giuseppe Sucameli sucam...@faunalia.it

 Hi Luiz and Ricardo,

 On Tue, Dec 14, 2010 at 1:04 PM, Luiz Motta motta.l...@gmail.com wrote:

 The author of provider told me about this problem, see ticket (
 https://trac.osgeo.org/qgis/ticket/3329).

 to Luiz: as Ricardo wrote, he is the author of the plugin
 (CustomDatabaseQuery),
 not the author of the provider at all.
 BTW, I'm the author of both the patches for executing a custom query with
 postgres and spatialite provider, so I'm one of the guys you're searching
 for :)

 to Ricardo: the ticket told about an Error for postgres's provider, not
 custom
 database query plugin issue.
 Furthermore, the QGis trac is not for plugins' issues, except for those
 that are
 in trunk. For this reason we're working to create a plugins trac.

 If you're sure the issue is only related to your plugin source code and not
 to the
 qgis functions called in your code, you should close the ticket as invalid.

 SELECT
   l.id AS gid, l.the_geom AS the_geom
 FROM gis.tl_20101117_101056_limite l


 Doesn't anyone confirm that it's a provider's issue, not just a plugin
 issue??
 Please, could you try to execute the same query using the RT Sql Layer
 plugin,
 in order to confirm the provider issue?

 Thanks a lot.
 Cheers.



 Please inform about your enviroment.
 It  can be util for understand what is happened.

 Regards,
 Luiz Motta





 2010/12/14 Giuseppe Sucameli sucam...@faunalia.it

 Hi Luiz,

 On Tue, Dec 14, 2010 at 2:43 AM, Luiz Motta motta.l...@gmail.comwrote:

 I am testing the 'Custom database query' plugins, where, i use layers
 outside public's schema.
 The plugin create the layer, but, before, i receive the message error
 about cursor od database.
 If the layers are inside public's schema not appear message.
 The one ticket is open, number 3329.

 I'm unable to reproduce it, both 'Custom database query' and 'RT Sql
 Layer' plugins
 seems to work with tables not in the public schema.
 Maybe does your layer contain invalid geometries?

 Cheers.

 --
 Giuseppe Sucameli





 --
 Giuseppe Sucameli


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


[Qgis-developer] Error for postgres's provider when table(statement SELECT ) is outside public's schema

2010-12-13 Thread Luiz Motta

Hi,


I am testing the 'Custom database query' plugins, where, i use layers 
outside public's schema.


The plugin create the layer, but, before, i receive the message error 
about cursor od database.


If the layers are inside public's schema not appear message.

The one ticket is open, number 3329.

Regards,
Luiz Motta





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


Re: [Qgis-developer] python error

2010-11-18 Thread Luiz Motta
Hi,

I read your code(db.py), your problem is use both, spaces(4 space) and TAB.

Use only one, not possible use both.

I setting my text editor to change TAB to 2 spaces.

See in your code the lines 33 and 34, have TAB, you need change for spaces.

If you use WINDOWS, i liked the Notepad++ editor for write  Python's code to
small project, for complex projects i prefer use the ECLIPSE with PyDev.



2010/11/18 Muhammad Abu Hasan mdabuha...@gmail.com

 Dear All,

 here is my python file and error , could you please help me , how can i
 solve 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


Re: [Qgis-developer] image show hide plugin error

2010-10-10 Thread Luiz Motta

Paolo,

Correction bug when initialize plugin already containing layer of polygon
Fix this bug at version 0.3 (QGIS User-Contributed Python Plugin 
Repository).


Thank



Paolo Cavallini escreveu:

Just installed, I get an error:
===
Couldn't load plugin imgshowhide due an error when calling its initGui() method

Traceback (most recent call last):
  File /usr/lib/python2.6/dist-packages/qgis/utils.py, line 147, in 
startPlugin
plugins[packageName].initGui()
  File /home/paolo/.qgis/python/plugins/imgshowhide/imgshowhide_qg.py, line 
37, in
initGui
self.__setDocWidget()
  File /home/paolo/.qgis/python/plugins/imgshowhide/imgshowhide_qg.py, line 
31, in
__setDocWidget
widget = ShowHideImgWidget(self.__iface)
  File /home/paolo/.qgis/python/plugins/imgshowhide/imgshowhidewidget.py, 
line 37,
in __init__
self.__init()
  File /home/paolo/.qgis/python/plugins/imgshowhide/imgshowhidewidget.py, 
line 51,
in __init
self.__populateCatalogTable(lstLyrPolygon)
  File /home/paolo/.qgis/python/plugins/imgshowhide/imgshowhidewidget.py, 
line 100,
in __populateCatalogTable
if len(lstCatalog)  0:
TypeError: object of type 'NoneType' has no len()

Python version:
2.6.6 (r266:84292, Sep 15 2010, 15:09:12)
[GCC 4.4.5 20100909 (prerelease)]


QGIS version:
1.6.0-Trunk Trunk, 14356M
===
Anyone confirms?
All the best.
  


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


Re: [Qgis-developer] PyQGIS - Selecting Spatialite Datasource at runtime

2010-09-12 Thread Luiz Motta

Hi all,

I am starting an plugin for work with spatialite and postgresql/postgis, 
then, maybe is usefull (part of code for make an list  with connections 
of spatialite):


lstConnection = QGisDatabase.getListConnection(SpatiaLite)
if lstConnection.count()  0:
 lstPaths = QtCore.QStringList()
 for item in lstConnection:
   lstPaths.append(QGisDatabase.getStringConnectSqlite(item))
 self.ui.comboBoxDatabase.addItems(lstPaths)

class QGisDatabase():
 @staticmethod
 def getListConnection(typDb):
typDb = SpatiaLite OR PostgreSQL 
   typConn = QString(/%1/connections).arg(typDb)
   settings = QSettings()
   settings.beginGroup(typConn)
   lstQstringConn = settings.childGroups()
   settings.endGroup()
   return lstQstringConn
 @staticmethod
 def getStringConnectSqlite(connection):
   settings = QSettings()
   sKey = QString(/SpatiaLite/connections/%1/sqlitepath).arg(connection)
   return settings.value(sKey).toString()
 @staticmethod
 def getStringConnectPostgres(connection):




Germán Carrillo escreveu:
Hi Noli, 

sure! Here it is: 


http://downloads.tuxfamily.org/tuxgis/geoblogs/visor_qgis_capas_spatialite/visor_pyqgis.tar.bz2

Regards, 


Germán

2010/9/10 Noli Sicad nsi...@gmail.com mailto:nsi...@gmail.com

Hi Germán,

Thank you.

Now it is English :-). Using Google Translate.


http://translate.google.com/translate?js=nprev=_thl=enie=UTF-8layout=2eotf=1sl=autotl=enu=http%3A%2F%2Fgeotux.tuxfamily.org%2Findex.php%3Foption%3Dcom_myblog%26task%3Dview%26id%3D251%26Itemid%3D59

http://translate.google.com/translate?js=nprev=_thl=enie=UTF-8layout=2eotf=1sl=autotl=enu=http%3A%2F%2Fgeotux.tuxfamily.org%2Findex.php%3Foption%3Dcom_myblog%26task%3Dview%26id%3D251%26Itemid%3D59

German, would be able to share the whole source code of the project?

Thanks again.

Regards, Noli



On 9/11/10, Germán Carrillo carrillo.ger...@gmail.com
mailto:carrillo.ger...@gmail.com wrote:
 Hi Noli,

 you could use this [1] (sorry, it's in Spanish). It uses the
Sqlite3 Python
 module [2].

 Regards,

 Germán

 
 [1]


http://geotux.tuxfamily.org/index.php?option=com_myblogtask=viewid=251Itemid=59

http://geotux.tuxfamily.org/index.php?option=com_myblogtask=viewid=251Itemid=59
 [2] http://docs.python.org/library/sqlite3.html

 On Fri, Sep 10, 2010 at 9:49 AM, Noli Sicad nsi...@gmail.com
mailto:nsi...@gmail.com wrote:

 Hi,

 Given, this example from PyQGIS documentation.

 
 uri = QgsDataSourceURI()
 uri.setDatabase('/home/martin/test-2.3.sqlite')
 uri.setDataSource('','Towns', 'Geometry')

 layer = QgsVectorLayer(uri.uri(), 'Towns', 'spatialite')
 ~

 How do you do a runtime for the above. I want to select the table /
 layer to load. How you figure out the  uri.setDataSource('',' ',
 'Geometry') and  QgsVectorLayer(uri.uri(), ' ', 'Spatialite')?

 
file = QFileDialog.getOpenFileName(self,Open Spatialite, .,
 Spatialite (*.sqlite))
fileInfo = QFileInfo(file)

uri = QgsDataSourceURI()
uri.setDatabase(file)
uri.setDataSource('',' ', 'Geometry')

# Add the layer
layer = QgsVectorLayer(uri.uri(), ' ', 'Spatialite')

 ~

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




 --
 ---
   |\__
 (:__)(
   |/

 Soluciones Geoinformáticas Libres
 http://geotux.tuxfamily.org/



--
---
  |\__ 
(:__)(
  |/   

Soluciones Geoinformáticas Libres   
http://geotux.tuxfamily.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