[Qgis-developer] Random uniform on Field Calculator

2011-02-08 Thread Agustin Lobo
Would it be possible adding a key for generating
a field according to a random uniform distribution in the
Field calculator? This would be very useful for selecting
a subset of points or polygons.

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


Re: [Qgis-developer] plugin development in Win XP

2011-02-08 Thread maaza mekuria
Thank you Alex:
I did build earlier using the instructions given on the web that you referred 
to. I was also able to run the QGIS (the built version) executable (after 
manually copying several libraries that were needed).

I now wanted to add my own plugin.That is when the real challenge started. I 
could compile the dll's that came from the trunk. I tried to add my own project 
following the plugin development directions and I could not get very far. That 
is where I am today. 

I do have experience with C++ and visual studio. I have written a few 
standalone applications that I want to run from within QGIS. 

Right now I am trying to make a simple dll as per the instructions given on the 
web and it has not gotten me anywhere. 

I tried rerunning CMake and I get a new error that I did not get before, and if 
anyone of you have any idea why let me know. I do have SIP installed and I even 
went to the extent of compiling it myself and CMake still could not find it.

Quantum GIS version: 1.7.0 Trunk (10700)
Found GRASS: C:/OSGeo4W/apps/grass/grass-6.4.0 (6.4.0)
Found Iconv: C:/OSGeo4W/lib/iconv.lib
Found Proj: C:/OSGeo4W/lib/proj.lib
Found Expat: C:/OSGeo4W/lib/libexpat.lib
Found GSL: C:/OSGeo4W/lib/gsl.lib;C:/OSGeo4W/lib/cblas.lib
Found GEOS: C:/OSGeo4W/lib/geos_c_i.lib
Found GDAL: C:/OSGeo4W/apps/gdal-17/lib/gdal_i.lib
Found QWT: C:/OSGeo4W/lib/qwt5.lib
CMake Error at cmake/FindSIP.cmake:54 (MESSAGE):
  Could not find SIP
Call Stack (most recent call first):
  CMakeLists.txt:399 (FIND_PACKAGE)

 Any help is greatly appreciated,
 
Maaza

--- On Sat, 2/5/11, Alex Mandel tech_...@wildintellect.com wrote:

From: Alex Mandel tech_...@wildintellect.com
Subject: Re: [Qgis-developer] plugin development in Win XP
To: qgis-developer@lists.osgeo.org
Date: Saturday, February 5, 2011, 8:32 PM

I think what Giovanni was implying is that you should setup to build
QGIS from source and that once you have that working your build
environment should work for plugins.

See http://www.qgis.org/wiki/Building_QGIS_from_Source#Building_on_Windows

Enjoy,
Alex

On 02/04/2011 10:21 AM, maaza mekuria wrote:
 I am saying that it is not the same. Plugins are DLL's and setup comes 
 already pre-packaged and I just had to follow instructions that were 
 clear. 
 
 With the plugins, Dr. Marco's document is written for Linux and then it is 
 also not clear. I think the instructions given for the update of the source 
 files are not correct. 
 
 What are the required directories for the plugin? Do I need all the extra 
 files cmake, .cxx, .svg, etc for the plugin to work? 
 
 Just wondering if I am making demands that is not acceptable. If so please 
 let me know.
 
 Thank you,
 
 Maaza  
 
 
 
 --- On Fri, 2/4/11, G. Allegri gioha...@gmail.com wrote:
 
 From: G. Allegri gioha...@gmail.com
 Subject: Re: [Qgis-developer] plugin development in Win XP
 To: maaza mekuria sail...@yahoo.com
 Cc: qgis-developer@lists.osgeo.org
 Date: Friday, February 4, 2011, 9:15 AM
 
 If you're able to build QGis, you're able to build the plugins too, as QGis 
 has already builtin plugins. Have a look to this folder [1]. My first trial 
 was create a new folder in my project (in VS I mean) and setup the same 
 structure of the other plugins.
 
 Giovanni
 
 [1] http://trac.osgeo.org/qgis/browser/trunk/qgis/src/plugins
 
 2011/2/4 maaza mekuria sail...@yahoo.com
 
 I am repeating my question since it may not be , is it possible to build a 
 plugin using WinXP and Visual Studio 2008 (I assume it is)? And is there any 
 documentation on that? Or should one copy another plugin from the trunk and 
 try to adopt it? Or should one resort to QT only for plugin development?
 
 
 Thank you,
 
 Maaza
 
 --- On Thu, 2/3/11, maaza mekuria sail...@yahoo.com wrote:
 
 
 From: maaza mekuria sail...@yahoo.com
 Subject: [Qgis-developer] plugin development in Win XP
 To: qgis-developer@lists.osgeo.org
 
 Date: Thursday, February 3, 2011, 7:24 PM
 
 
 I am struggling to build a plugin in QGIS. I was able to build the source and 
 I could run QGIS. But I can not create a plugin. I tried to follow Dr. Marco 
 Hugentobler's example from the compilation guide and since it is linux based 
 I could not duplicate it in the windows env. no matter how I try to compile 
 the sample I get one error after another. Right now the error message below 
 is the latest one. Can any of you offer some
  direction?
 
 
 1C:\SW\Src\qgis-trunk\src\gui\qgisinterface.h(54) : error C2470: 
 'QgisInterface' : looks like a function definition, but there is no parameter 
 list; skipping apparent body
 1c:\sw\src\qgis-trunk\src\core\qgis.h(32) : error C2470: 'QGis' : looks like 
 a function definition, but there is no parameter list; skipping apparent body
 
 
 
 Maaza
 

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



  ___
Qgis-developer 

Re: [Qgis-developer] multi-view

2011-02-08 Thread Tim Sutton
Hi



On Thu, Jan 13, 2011 at 6:15 PM, Marco Hugentobler
marco.hugentob...@sourcepole.ch wrote:
 Hi Massimo

 My apologies. Yes, the patch got forgotten after the Vienna hackfest. I
 remember it was postponed because of a release and not taken afterwards.

 just having it fixed to be able to apply it on the actual trunk .. should
 be a good first step

 That would be great. After porting it to trunk, please assign it to Tim (app
 guru in the dev team).

I am just following up on this - did you manage to port your work to
trunk? My apologies if you already mentioned this and I missed the
notice.

Regards

Tim

8--snip

-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==
Visit http://linfiniti.com to find out about:
 * QGIS programming 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


Re: [Qgis-developer] multi-view

2011-02-08 Thread Nathan Woodrow
I started working on something similar the other day as I could not get this
patch to apply and thought about a different way of going about it.

The general idea is to use a QMdiArea(tabbed or floating) as the central
widget for QGisApp class.  You can then create a new window using
QMdiArea.addSubWindow(QgsMapCanvas).  You would then connect to the sub
window changed event to know when the user changed windows in order to
update the legend, undo stack, tool etc.

The general layout and rules are:

   1. There is only one active canvas at a time.
   2. The active canvas is stored in the mMapCanvas QgisApp variable.  This
   is updated when the user clicks on the map or tab eg on subWindowChanged
   signal
   3. When the user clicks a tool it sets the tool for the current canvas
   active via.  mMapCanvas.setMapTool({maptool}  the map tools canvas is
   updated using {maptool}.setCanvas(mMapCanvas).  This means there is only one
   instance of {mapTool} just it's canvas gets changed.
   4. On subWindowChanged the legends canvas is updated to reflect the new
   maps layers.
   5. Opening a vector layer opens it in the curent active canvas.
   6. Try a limit the amount of new code code added, try and use as much
   that is already there.
   7. Being able to switch between tabbed or floating windows would be very
   powerful.

I know this is no easy task, no matter which way you run with it.  And there
a lot of user cases which needed to be taken into account.

I was thinking about pushing what I have to git hub tonight if anyone is
interested.

Just my thoughts on the subject.

- NathanW

On Wed, Feb 9, 2011 at 10:11 AM, Tim Sutton t...@linfiniti.com wrote:

 Hi



 On Thu, Jan 13, 2011 at 6:15 PM, Marco Hugentobler
 marco.hugentob...@sourcepole.ch wrote:
  Hi Massimo
 
  My apologies. Yes, the patch got forgotten after the Vienna hackfest. I
  remember it was postponed because of a release and not taken afterwards.
 
  just having it fixed to be able to apply it on the actual trunk ..
 should
  be a good first step
 
  That would be great. After porting it to trunk, please assign it to Tim
 (app
  guru in the dev team).

 I am just following up on this - did you manage to port your work to
 trunk? My apologies if you already mentioned this and I missed the
 notice.

 Regards

 Tim

 8--snip

 --
 Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
 ==
 Visit http://linfiniti.com to find out about:
  * QGIS programming 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


[Qgis-developer] Poor asynchronous performance of Python threads?

2011-02-08 Thread Charlie Sharpsteen
Hello list,

I have been playing around with the development branch of IPython (0.11-dev)
as they have built a PyQt-based console that supports all sorts of awesome
features like tab-completion, paged browsing of function code and
docstrings, and Pygments-powered syntax highlighting in addition to the
normal IPython goodness.  I slapped together a quick plugin that adds an
IPython-based console to QGIS.  The code is available at:

https://github.com/Sharpie/qgis-ipython

To use it, you will need to install ZeroMQ, pyzmq, pygments and the dev
version of IPython from:

https://github.com/ipython/ipython

The console fires up allright, but unfortunately very, very, very slow.
 There is about ~1-2 seconds of lag between invoking a command
and receiving a response.  For comparison, I threw together a minimal PyQGIS
application that also uses the IPython console:

https://gist.github.com/817914

The PyQGIS version is very snappy and there is no lag.  I suspect the
difference is due to the PyQt widget is talking to an external IPython
process through ZeroMQ.  When a command is executed, the console sends a
message and then a Python thread waits for the response.  With PyQGIS,
Python is controlling the execution of the entire application.  However,
when the console is used as a plugin it is running in an embedded
interpreter and it looks like QGIS takes a while to schedule the execution
of the Python threads.

Does anyone have any suggestions for solving or working around this issue?

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


[Qgis-developer] open a WCS service

2011-02-08 Thread Paolo Cavallini
Hi all.
My GDAL has WCS support. It is unclear however if and how could I open
it. It is not present on the list of formats, and the interface requires
a file rather than an address: should a button Open WCS be added to
the GUI?
Thanks.
-- 
http://www.faunalia.it/pc

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