Re: [Qgis-user] QGIS slow on PostGIS

2011-06-17 Thread pcreso
Try connecting to public schema & geometry columns only (setup in the db 
connection dialogue)

If you have views with geometries, QGIS will otherwise try to ascertain their 
geometry contents, which can take some time depending on the view.

HTH,

  Brent Wood

--- On Sat, 6/18/11, Frank Aragona  wrote:

From: Frank Aragona 
Subject: [Qgis-user] QGIS slow on PostGIS
To: qgis-user@lists.osgeo.org
Date: Saturday, June 18, 2011, 10:38 AM

I am running QGIS 1.6.  When I add a PostGIS database layer, everything
loads up ok, but when I go to open or query the attribute table, QGIS
hangs.  Eventually, the attribute table opens, but the hanging continues,
and generally results in QGIS crashing.

I don't think this is my PostGIS configuration, because I've opened the
same PostGIS layers and attribute tables in both Open Jump and uDig
without any slow down, hanging, or crashing.

Is this a bug?  A configuration error?  Any advice?

Frank

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


Re: [Qgis-user] Printing google aerial photography in the layout of QGIS

2011-06-17 Thread Matt Boyd
I'm not sure that the plugin will allow this, I haven't been able to get it
to work anyway.

If I want to use a GE image I turn off all the layers and decorations in the
window I want to print, then file -> save as image. The image / screenshot
is then generated and automatically saved as a georeferenced image so it can
be loaded and then printed that way, resolution, zoom etc stay the same as
the original window so if you want to zoom in on that image you'll need to
go back to the GE image.



On Sat, Jun 18, 2011 at 6:21 AM, legiopatrianostra
wrote:

> Good evening everyone,
>
> There is the possibility to print a layout QGIS (print composer), having
> as a theme google aerial photography, available through the plugin,
> OpenLayers Overview?
>
> The project is set to the projection: EPSG: 900913 (google mercator).
>
> I ask this because I tried to print the layout, print everything except the
> image.
>
> Thank you all for your help.
>
>
> Orlando
>
> --
> *** *Antes de imprimir este E-Mail pense na sua responsabilidade e
> compromisso com o MEIO AMBIENTE!
>
> Before printing this email, take a moment to reflect on your responsability
> with the Environment!
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] QGIS slow on PostGIS

2011-06-17 Thread Frank Aragona
I am running QGIS 1.6.  When I add a PostGIS database layer, everything
loads up ok, but when I go to open or query the attribute table, QGIS
hangs.  Eventually, the attribute table opens, but the hanging continues,
and generally results in QGIS crashing.

I don't think this is my PostGIS configuration, because I've opened the
same PostGIS layers and attribute tables in both Open Jump and uDig
without any slow down, hanging, or crashing.

Is this a bug?  A configuration error?  Any advice?

Frank

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


Re: [Qgis-user] Fwd: Unique value renderer in v1.7

2011-06-17 Thread Giovanni Manghi
I believe that is one of the features that we had in the old symbology
and that misses in the new one. A ticket should be already open about
this. Please check.

cheers


-- Giovanni --


On Fri, 2011-06-17 at 14:43 -0700, Ryan Dalton wrote:
> 
> In v1.6 and "old symbology", if I want to have a random selection of
> colors for a polygon layer based upon an attribute, I would go to
> Properties-> Symbol-> Legend Type = "Unique".
> 
> In v1.7, there is no longer a "Unique" option.  Using "Categorized"
> gives me a unique classification, but the colors are categorized in
> groups based upon the color ramp selected.  Even picking the "random"
> color ramp doesn't truly give me random colors, they are still
> categorized by color groups.  Using the "New Symbology", how can I get
> all of my symbols in a layer to have unique (or at least randomly
> scattered) colors in the legend?
> 
> Thanks.
> 
> 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user


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


[Qgis-user] Fwd: Unique value renderer in v1.7

2011-06-17 Thread Ryan Dalton
In v1.6 and "old symbology", if I want to have a random selection of colors
for a polygon layer based upon an attribute, I would go to Properties->
Symbol-> Legend Type = "Unique".

In v1.7, there is no longer a "Unique" option.  Using "Categorized" gives me
a unique classification, but the colors are categorized in groups based upon
the color ramp selected.  Even picking the "random" color ramp doesn't truly
give me random colors, they are still categorized by color groups.  Using
the "New Symbology", how can I get all of my symbols in a layer to have
unique (or at least randomly scattered) colors in the legend?

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


[Qgis-user] Printing google aerial photography in the layout of QGIS

2011-06-17 Thread legiopatrianostra
Good evening everyone,

There is the possibility to print a layout QGIS (print composer), having as
a theme google aerial photography, available through the plugin, OpenLayers
Overview?

The project is set to the projection: EPSG: 900913 (google mercator).

I ask this because I tried to print the layout, print everything except the
image.

Thank you all for your help.


Orlando

-- 
*** *Antes de imprimir este E-Mail pense na sua responsabilidade e
compromisso com o MEIO AMBIENTE!

Before printing this email, take a moment to reflect on your responsability
with the Environment!
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] qgis 1.7 geotiff problem

2011-06-17 Thread Guy Roussin

Hi,

I can confirm this problem with ecw raster. The workaround is fine
(ubuntugis 64bits in a debian chroot).

Guy

Le 17/06/2011 09:48, Giovanni Manghi a écrit :

you are right, there is this issue in qgis>= 1.7.

We lost many time tracking it down and yesterday Pedro V. finally found
the reason, and there is an easy workaround.

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


I have now to change the title and give the ticket a new description.

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


[Qgis-user] Re: [Qgis-developer] New Python console idea: Expanding the Python console to handle DSLs for plugins eg CADTools

2011-06-17 Thread Barry Rowlingson
On Fri, Jun 17, 2011 at 1:55 PM, Nathan Woodrow  wrote:

> Function MyFunction(someStringVar) as String
>    Return "Foo Bar " + someStringVar
> End Function
> And then in the SQL statement.
> UPDATE table SET column = MyFunction("Hello World") where column > 100
> This would call MyFunction() for each feature and call a update.  However
> one shortfall of this is that you couldn't define functions in the
> interactive Mapbasic shell inside MapInfo, meaning that you had to write a
> custom script just to do the above.

 Yes, but I think once you get beyond three-liners you are going to
want to save these things in a file anyway. In python you'd just stuck
them in a .py file and import them. I don't really see typing at the
console as a good place for doing program development to any great
amount.

> Like you said we should just have to find way to say "this is a python
> variable" and "this is part of the string to send to the DSL".   You might
> be able to use something like %%variableName or %%functionName. The console
> would parse the string that goes to the DSL and build a dictionary with
> %%variableName = realPythonVariable and then sends the string and the
> dictionary to the DSL which at that point it's up it to worry about
> evaluating and replacing the values and functions.
> Thoughts?


Yup, if you restrict yourself to putting python variable values into
other languages then that's a possibility. Not sure how you'll be
evaluating python functions with SQL variable argument though? Are you
expecting to be able to do:

 import math
 SQL: select years,months from foo where years > %%math.sqrt(months)

 - since that would mean getting SQL values (months) passed to Python...

 Even simple replacement of python variables us going to be tricky
since python variables can evaluate to all sorts of things - are you
just going to use the 'str' representation?

 A nice list of use cases would be interesting.

 Of course if you are willing to develop this then you can do what you
want :) There doesn't seem to be a lot of interest from the devs...

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


[Qgis-user] Re: [Qgis-developer] New Python console idea: Expanding the Python console to handle DSLs for plugins eg CADTools

2011-06-17 Thread Nathan Woodrow
Barry,

I think it could be a pretty powerful and cool thing to at least try out
with the prototype.   I'm a ex MapInfo user and in MapBasic we were able to
call a user defined function in SQL for a update, insert, etc etc.   So you
could do:

Function MyFunction(someStringVar) as String
   Return "Foo Bar " + someStringVar
End Function

And then in the SQL statement.

UPDATE table SET column = MyFunction("Hello World") where column > 100

This would call MyFunction() for each feature and call a update.  However
one shortfall of this is that you couldn't define functions in the
interactive Mapbasic shell inside MapInfo, meaning that you had to write a
custom script just to do the above.

If we could do something like this in the python console and pass functions
and variables to custom DSLs I think it would be quite handy.  Of course the
DSL would have to know how to handle the variables or it would just return a
error.

I know it might not be a easy thing to do but I'm willing to give it a go in
my prototype to flesh it out.

Like you said we should just have to find way to say "this is a python
variable" and "this is part of the string to send to the DSL".   You might
be able to use something like %%variableName or %%functionName. The console
would parse the string that goes to the DSL and build a dictionary with
%%variableName = realPythonVariable and then sends the string and the
dictionary to the DSL which at that point it's up it to worry about
evaluating and replacing the values and functions.

Thoughts?

On Fri, Jun 17, 2011 at 5:27 PM, Barry Rowlingson <
b.rowling...@lancaster.ac.uk> wrote:

> On Fri, Jun 17, 2011 at 4:36 AM, Nathan Woodrow 
> wrote:
>
> > Well would that be such a bad thing? The DSLs can return a object from
> the
> > evaluated string so why not let them be mixed.  This would mean you can
> do
> > things like:
> >
> > mypythonVar = (SQL:Select Sum(column) From Table)
> > #Some more python code to assign the value to a QgsFeature
>
>  Oh I didnt say it was bad, just tricky! Done right it would be good -
> Python in Qgis is getting variable values from C++ all the time.
>
>  For example, someone might think they can do:
>
>  > foo = 1 + 2 # python
>  > SQL: select * from table where x=foo
>
> In fact, I'd be quite frustrated if I couldn't do that in a single
> console. So to implement this, you've got to have some way of getting
> variables from one interpreter into another, so you might end up with:
>
>  > SQL: select * from table where x=PYTHON:foo
>
> but now you are parsing everything before it gets to the destination
> parser, but that could be ambiguous with the destination language. So
> then the console becomes a macro language all of its own...
>
> Barry
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Re: [Qgis-developer] New Python console idea: Expanding the Python console to handle DSLs for plugins eg CADTools

2011-06-17 Thread Yves Jacolin
Hello,

Le vendredi 17 juin 2011 09:27:19, Barry Rowlingson a écrit :
>  > SQL: select * from table where x=PYTHON:foo
> 
> but now you are parsing everything before it gets to the destination
> parser, but that could be ambiguous with the destination language. So
> then the console becomes a macro language all of its own...

why not allow the user to force the contents of the console with a python mode 
and other one called DSL via a checkbox or a combo box?

Y.
-- 
Yves Jacolin

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


[Qgis-user] Composer with deg min sec and utm coordinat unit

2011-06-17 Thread herman buol
How to change the unit coordinat by default degrees unit to dms or utm unit
coordinat if i want print at paper
Thanks
Lover qgis
10.6.6
Macbook pro 15“
indonesia
Sulteng
Buol
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Default QGIS project file to open plugins automatically

2011-06-17 Thread Markus Weidenbach

Thanks Andreas,
so it´s maybe the best to await eagerly (like many others on the list 
...) the release of the new version 1.7.


Markus


Am 17.06.2011 11:28, schrieb Andreas Neumann:

Hi Markus,

Sorry to hear that version 1.6 does not support the --optionspath yet. 
Would it be an option to use QGIS 1.7 (to be released these days)? I 
am sure that QGIS 1.7 has the optionspath parameter. If you need help 
on customization of QGIS it may be useful to directly ask the folks 
from Solothurn (Cedric Möri), the author of the presentation where I 
sent you the link.


They probably have many of the same issues that you have, being a QGIS 
installation with many clients (50-100) that need customization.


Good luck,
Andreas

On Fri, 17 Jun 2011 11:19:34 +0200, Markus Weidenbach wrote:

Hi Giovanni and Andreas,

thanks for your help, but still, for some strange reason only about
2/3 of the activated plugins (or extensions, I am running the German
version and I am not sure about the English term used) remain active
when I start a new project or when I re-start the previous one.
Many plugins I activated before and which I wanted to use
permanently, I had to activate again in the QGIS Extension/Plugins
Manager Window, such as the 1-Band Raster Colour Table, the QGIS File
Browser, the Raster Calculator, the Import Project, MMQgis, the OTB
Plugin and many others.

In the Extension Manager Window the location of the Plugin Directory
is indicated as C:\OSGEO4W\apps\qgis\plugins but in fact there are
only a few *.dll files of all activated plugins. Other locations of
the python plugins, which remain active, are
C:\OSGeo4W\apps\qgis\python\plugins.
And in the directory C:\Users\markus\.qgis\python\plugins you can
find ALL de-activated python plugins PLUS many activated python
plugins.

Strange, but could the paths to the plugin directories be the reason?

Andreas, I checked version 1.6 and unfortunately there is no startup
parameter called --optionspath, a very useful feature, that might be
implemented in future versions.

Regards,

Markus

Am 16.06.2011 12:25, schrieb Giovanni Manghi:

Hi Markus,

I don't know if I understand correctly your problem, but the
installed/activated plugins have nothing to do with qgis projects.

When you re-open qgis with a blank project you should see all the
plugins you have installed/activated the last time you used the 
program.


cheers

-- Giovanni --

On Thu, 2011-06-16 at 12:19 +0200, Markus Weidenbach wrote:

Dear List,

is there a way to create sth. like a *.qgis default project file which
activates automatically all plugins I´d like to have when I start a 
new

project (or restart an old one with previously activated plugins)?
So far, I have to open all plugins, such as the QGIS File Browser,
manually, all the time again. It seems that the information of an
activated plugin is not being written in the qgis project file. This
problem does not concern the official plugins already implemented into
the latest qgis version, but all plugins downloaded later on.
I am using QGIS 1.6 on Win 7, Prof. 64 bit
All hints are welcome.

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





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



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


Re: [Qgis-user] Default QGIS project file to open plugins automatically

2011-06-17 Thread Andreas Neumann

Hi Markus,

Sorry to hear that version 1.6 does not support the --optionspath yet. 
Would it be an option to use QGIS 1.7 (to be released these days)? I am 
sure that QGIS 1.7 has the optionspath parameter. If you need help on 
customization of QGIS it may be useful to directly ask the folks from 
Solothurn (Cedric Möri), the author of the presentation where I sent you 
the link.


They probably have many of the same issues that you have, being a QGIS 
installation with many clients (50-100) that need customization.


Good luck,
Andreas

On Fri, 17 Jun 2011 11:19:34 +0200, Markus Weidenbach wrote:

Hi Giovanni and Andreas,

thanks for your help, but still, for some strange reason only about
2/3 of the activated plugins (or extensions, I am running the German
version and I am not sure about the English term used) remain active
when I start a new project or when I re-start the previous one.
Many plugins I activated before and which I wanted to use
permanently, I had to activate again in the QGIS Extension/Plugins
Manager Window, such as the 1-Band Raster Colour Table, the QGIS File
Browser, the Raster Calculator, the Import Project, MMQgis, the OTB
Plugin and many others.

In the Extension Manager Window the location of the Plugin Directory
is indicated as C:\OSGEO4W\apps\qgis\plugins but in fact there are
only a few *.dll files of all activated plugins. Other locations of
the python plugins, which remain active, are
C:\OSGeo4W\apps\qgis\python\plugins.
And in the directory C:\Users\markus\.qgis\python\plugins you can
find ALL de-activated python plugins PLUS many activated python
plugins.

Strange, but could the paths to the plugin directories be the reason?

Andreas, I checked version 1.6 and unfortunately there is no startup
parameter called --optionspath, a very useful feature, that might be
implemented in future versions.

Regards,

Markus

Am 16.06.2011 12:25, schrieb Giovanni Manghi:

Hi Markus,

I don't know if I understand correctly your problem, but the
installed/activated plugins have nothing to do with qgis projects.

When you re-open qgis with a blank project you should see all the
plugins you have installed/activated the last time you used the 
program.


cheers

-- Giovanni --

On Thu, 2011-06-16 at 12:19 +0200, Markus Weidenbach wrote:

Dear List,

is there a way to create sth. like a *.qgis default project file 
which
activates automatically all plugins I´d like to have when I start a 
new

project (or restart an old one with previously activated plugins)?
So far, I have to open all plugins, such as the QGIS File Browser,
manually, all the time again. It seems that the information of an
activated plugin is not being written in the qgis project file. 
This
problem does not concern the official plugins already implemented 
into

the latest qgis version, but all plugins downloaded later on.
I am using QGIS 1.6 on Win 7, Prof. 64 bit
All hints are welcome.

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





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


--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Default QGIS project file to open plugins automatically

2011-06-17 Thread Markus Weidenbach

Hi Giovanni and Andreas,

thanks for your help, but still, for some strange reason only about 2/3 
of the activated plugins (or extensions, I am running the German version 
and I am not sure about the English term used) remain active when I 
start a new project or when I re-start the previous one.
Many plugins I activated before and which I wanted to use permanently, I 
had to activate again in the QGIS Extension/Plugins Manager Window, such 
as the 1-Band Raster Colour Table, the QGIS File Browser, the Raster 
Calculator, the Import Project, MMQgis, the OTB Plugin and many others.


In the Extension Manager Window the location of the Plugin Directory is 
indicated as C:\OSGEO4W\apps\qgis\plugins but in fact there are only a 
few *.dll files of all activated plugins. Other locations of the python 
plugins, which remain active, are C:\OSGeo4W\apps\qgis\python\plugins.
And in the directory C:\Users\markus\.qgis\python\plugins you can find 
ALL de-activated python plugins PLUS many activated python plugins.


Strange, but could the paths to the plugin directories be the reason?

Andreas, I checked version 1.6 and unfortunately there is no startup 
parameter called --optionspath, a very useful feature, that might be 
implemented in future versions.


Regards,

Markus

Am 16.06.2011 12:25, schrieb Giovanni Manghi:

Hi Markus,

I don't know if I understand correctly your problem, but the
installed/activated plugins have nothing to do with qgis projects.

When you re-open qgis with a blank project you should see all the
plugins you have installed/activated the last time you used the program.

cheers

-- Giovanni --

On Thu, 2011-06-16 at 12:19 +0200, Markus Weidenbach wrote:

Dear List,

is there a way to create sth. like a *.qgis default project file which
activates automatically all plugins I´d like to have when I start a new
project (or restart an old one with previously activated plugins)?
So far, I have to open all plugins, such as the QGIS File Browser,
manually, all the time again. It seems that the information of an
activated plugin is not being written in the qgis project file. This
problem does not concern the official plugins already implemented into
the latest qgis version, but all plugins downloaded later on.
I am using QGIS 1.6 on Win 7, Prof. 64 bit
All hints are welcome.

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





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


Re: [Qgis-user] qgis 1.7 geotiff problem

2011-06-17 Thread Giovanni Manghi
Hi Stefan,

you are right, there is this issue in qgis >= 1.7.

We lost many time tracking it down and yesterday Pedro V. finally found
the reason, and there is an easy workaround.

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


I have now to change the title and give the ticket a new description.


cheers

-- Giovanni --


On Fri, 2011-06-17 at 00:38 -0700, Stefan Sylla wrote:
> Dear list,
> 
> I have some very large geotiff-files (up to 10 GB) from satellite imagery
> that I need to load into QGIS. To speed up the rendering, I created pyramids
> on those images with gdaladdo. In QGIS 1.6 this worked very fine and the
> images where loaded (after adding them with "Add Raster Layer") within a few
> seconds. 
> 
> Now, after I updated to QGIS 1.7, it takes several minutes to load the
> images into QGIS with "Add Raster Layer" (after being loaded, however,
> everything works fine and I can zoom in and out without any time-consuming
> rendering processes).
> 
> Anyone has an idea why QGIS 1.7 takes so much time to load the images, as it
> was working fine in QGIS 1.6?
> 
> I am using QGIS on Ubuntu 10.10 64bit.
> 
> Hope someone can help
> Stefan
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/qgis-1-7-geotiff-problem-tp6486091p6486091.html
> Sent from the qgis-user mailing list archive at Nabble.com.
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user


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


[Qgis-user] qgis 1.7 geotiff problem

2011-06-17 Thread Stefan Sylla
Dear list,

I have some very large geotiff-files (up to 10 GB) from satellite imagery
that I need to load into QGIS. To speed up the rendering, I created pyramids
on those images with gdaladdo. In QGIS 1.6 this worked very fine and the
images where loaded (after adding them with "Add Raster Layer") within a few
seconds. 

Now, after I updated to QGIS 1.7, it takes several minutes to load the
images into QGIS with "Add Raster Layer" (after being loaded, however,
everything works fine and I can zoom in and out without any time-consuming
rendering processes).

Anyone has an idea why QGIS 1.7 takes so much time to load the images, as it
was working fine in QGIS 1.6?

I am using QGIS on Ubuntu 10.10 64bit.

Hope someone can help
Stefan

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/qgis-1-7-geotiff-problem-tp6486091p6486091.html
Sent from the qgis-user mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Re: [Qgis-developer] New Python console idea: Expanding the Python console to handle DSLs for plugins eg CADTools

2011-06-17 Thread Barry Rowlingson
On Fri, Jun 17, 2011 at 4:36 AM, Nathan Woodrow  wrote:

> Well would that be such a bad thing? The DSLs can return a object from the
> evaluated string so why not let them be mixed.  This would mean you can do
> things like:
>
> mypythonVar = (SQL:Select Sum(column) From Table)
> #Some more python code to assign the value to a QgsFeature

 Oh I didnt say it was bad, just tricky! Done right it would be good -
Python in Qgis is getting variable values from C++ all the time.

 For example, someone might think they can do:

 > foo = 1 + 2 # python
 > SQL: select * from table where x=foo

In fact, I'd be quite frustrated if I couldn't do that in a single
console. So to implement this, you've got to have some way of getting
variables from one interpreter into another, so you might end up with:

 > SQL: select * from table where x=PYTHON:foo

but now you are parsing everything before it gets to the destination
parser, but that could be ambiguous with the destination language. So
then the console becomes a macro language all of its own...

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