[Qgis-developer] python application

2013-06-07 Thread JBE
Hello,

I'm trying to create a pygis-application with a code found in the quantum
gis coding and application guide. I've programmed before but I'm new to
python as such, so right now I'm basically just trying to break this down
and understand how it works.

To the issue: I'm using the code below but I get the invalid syntax error
on the line of:
self.connect(self.actionAddLayer, SIGNAL(activated()), self.addLayer) 
where ..actionAddLayer is marked.

What is wrong here?

cheers


--
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
import sys
import os
# Import our GUI
from mainwindow_ui import Ui_MainWindow

# Environment variable QGISHOME must be set to the 1.0 install directory
# before running this application
qgis_prefix = os.getenv(C:\Program Files\Quantum GIS Lisboa)

class MainWindow(QMainWindow, Ui_MainWindow):

def __init__(self):

QMainWindow.__init__(self)

# Required by Qt4 to initialize the UI
self.setupUi(self)

# Set the title for the app
self.setWindowTitle(QGIS Demo App)

# Create the map canvas
self.canvas = QgsMapCanvas()
# Set the background color to light blue something
self.canvas.setCanvasColor(QColor(200,200,255))
self.canvas.enableAntiAliasing(True)
self.canvas.useQImageToRender(False)
self.canvas.show()

# Lay our widgets out in the main window using a
# vertical box layout
self.layout = QVBoxLayout(self.frame)
self.layout.addWidget(self.canvas)

# Create the actions for our tools and connect each to the
appropriate
# method
self.actionAddLayer = QAction(QIcon((qgis_prefix + \
/share/qgis/themes/classic/mActionAddLayer.png), Add Layer,
self.frame)

self.connect(self.actionAddLayer, SIGNAL(activated()),
self.addLayer)
self.actionZoomIn = QAction(QIcon((qgis_prefix + \
/share/qgis/themes/classic/mActionZoomIn.png), \
Zoom In, self.frame)

self.connect(self.actionZoomIn, SIGNAL(activated()), self.zoomIn)
self.actionZoomOut = QAction(QIcon((qgis_prefix + \
/share/qgis/themes/classic/mActionZoomOut.png), \
Zoom Out, self.frame)
self.connect(self.actionZoomOut, SIGNAL(activated()),
self.zoomOut)
self.actionPan = QAction(QIcon((qgis_prefix +
\/share/qgis/themes/classic/mActionPan.png), \
Pan, self.frame)

self.connect(self.actionPan, SIGNAL(activated()), self.pan)
self.actionZoomFull = QAction(QIcon((qgis_prefix + \
/share/qgis/themes/classic/mActionZoomFullExtent.png), \
Zoom Full Extent, self.frame)

self.connect(self.actionZoomFull, SIGNAL(activated()),
self.zoomFull)

# Create a toolbar
self.toolbar = self.addToolBar(Map)
# Add the actions to the toolbar
self.toolbar.addAction(self.actionAddLayer)
self.toolbar.addAction(self.actionZoomIn)
self.toolbar.addAction(self.actionZoomOut);
self.toolbar.addAction(self.actionPan);
self.toolbar.addAction(self.actionZoomFull);

# Create the map tools
self.toolPan = QgsMapToolPan(self.canvas)
self.toolZoomIn = QgsMapToolZoom(self.canvas, False) # false = in
self.toolZoomOut = QgsMapToolZoom(self.canvas, True) # true = out

# Set the map tool to zoom in
def zoomIn(self):
self.canvas.setMapTool(self.toolZoomIn)

# Set the map tool to zoom out
def zoomOut(self):
self.canvas.setMapTool(self.toolZoomOut)

# Set the map tool to
def pan(self):
self.canvas.setMapTool(self.toolPan)

# Zoom to full extent of layer
def zoomFull(self):
self.canvas.zoomFullExtent()

# Add an OGR layer to the map
def addLayer(self):
file = QFileDialog.getOpenFileName(self, Open Shapefile, .,
Shapefiles
(*.shp))
fileInfo = QFileInfo(file)

# Add the layer
layer = QgsVectorLayer(file, fileInfo.fileName(), ogr)

if not layer.isValid():
return

# Change the color of the layer to gray
symbols = layer.renderer().symbols()
symbol = symbols[0]
symbol.setFillColor(QColor.fromRgb(192,192,192))

# Add layer to the registry
QgsMapLayerRegistry.instance().addMapLayer(layer);

# Set extent to the extent of our layer
self.canvas.setExtent(layer.extent())

# Set up the map canvas layer set
cl = QgsMapCanvasLayer(layer)
layers = [cl]
self.canvas.setLayerSet(layers)

def main(argv):
# create Qt application
app = QApplication(argv)

# Initialize qgis libraries
QgsApplication.setPrefixPath(qgis_prefix, True)
QgsApplication.initQgis()

# create main window
wnd = MainWindow()
# Move the app window to upper left

Re: [Qgis-developer] manageR update for 2.0

2013-06-07 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 06/06/2013 22:01, John C. Tull ha scritto:

 I am glad I am not alone. I only wish I possessed the skills to bring it up 
 to date. Here's to hoping someone else does and can.

Another possibility is to search for funding to sponsor one developer.
All the best.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGxf0wACgkQ/NedwLUzIr4euwCfZIqoDqeVy7yzFLkYE/RMO9oG
/NgAoLrB8VpF5j/h5TafVw7vXY2qxriU
=52EL
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] python application

2013-06-07 Thread Denis Rouzaud

Hi,

On 06/07/2013 08:34 AM, JBE wrote:

Hello,

I'm trying to create a pygis-application with a code found in the quantum
gis coding and application guide. I've programmed before but I'm new to
python as such, so right now I'm basically just trying to break this down
and understand how it works.

To the issue: I'm using the code below but I get the invalid syntax error
on the line of:
self.connect(self.actionAddLayer, SIGNAL(activated()), self.addLayer)
where ..actionAddLayer is marked.

try
self.actionAddLayer.activated.connect(self.addLayer)


What is wrong here?

cheers


--
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
import sys
import os
# Import our GUI
from mainwindow_ui import Ui_MainWindow

# Environment variable QGISHOME must be set to the 1.0 install directory
# before running this application
qgis_prefix = os.getenv(C:\Program Files\Quantum GIS Lisboa)
 
class MainWindow(QMainWindow, Ui_MainWindow):
 
 def __init__(self):


 QMainWindow.__init__(self)

 # Required by Qt4 to initialize the UI
 self.setupUi(self)

 # Set the title for the app
 self.setWindowTitle(QGIS Demo App)

 # Create the map canvas
 self.canvas = QgsMapCanvas()
 # Set the background color to light blue something
 self.canvas.setCanvasColor(QColor(200,200,255))
 self.canvas.enableAntiAliasing(True)
 self.canvas.useQImageToRender(False)
 self.canvas.show()

 # Lay our widgets out in the main window using a
 # vertical box layout
 self.layout = QVBoxLayout(self.frame)
 self.layout.addWidget(self.canvas)

 # Create the actions for our tools and connect each to the
appropriate
 # method
 self.actionAddLayer = QAction(QIcon((qgis_prefix + \
 /share/qgis/themes/classic/mActionAddLayer.png), Add Layer,
self.frame)

 self.connect(self.actionAddLayer, SIGNAL(activated()),
self.addLayer)
 self.actionZoomIn = QAction(QIcon((qgis_prefix + \
/share/qgis/themes/classic/mActionZoomIn.png), \
 Zoom In, self.frame)

 self.connect(self.actionZoomIn, SIGNAL(activated()), self.zoomIn)
 self.actionZoomOut = QAction(QIcon((qgis_prefix + \
/share/qgis/themes/classic/mActionZoomOut.png), \
 Zoom Out, self.frame)
 self.connect(self.actionZoomOut, SIGNAL(activated()),
self.zoomOut)
 self.actionPan = QAction(QIcon((qgis_prefix +
\/share/qgis/themes/classic/mActionPan.png), \
 Pan, self.frame)

 self.connect(self.actionPan, SIGNAL(activated()), self.pan)
 self.actionZoomFull = QAction(QIcon((qgis_prefix + \
 /share/qgis/themes/classic/mActionZoomFullExtent.png), \
 Zoom Full Extent, self.frame)

 self.connect(self.actionZoomFull, SIGNAL(activated()),
 self.zoomFull)

 # Create a toolbar
 self.toolbar = self.addToolBar(Map)
 # Add the actions to the toolbar
 self.toolbar.addAction(self.actionAddLayer)
 self.toolbar.addAction(self.actionZoomIn)
 self.toolbar.addAction(self.actionZoomOut);
 self.toolbar.addAction(self.actionPan);
 self.toolbar.addAction(self.actionZoomFull);

 # Create the map tools
 self.toolPan = QgsMapToolPan(self.canvas)
 self.toolZoomIn = QgsMapToolZoom(self.canvas, False) # false = in
 self.toolZoomOut = QgsMapToolZoom(self.canvas, True) # true = out

 # Set the map tool to zoom in
 def zoomIn(self):
 self.canvas.setMapTool(self.toolZoomIn)

 # Set the map tool to zoom out
 def zoomOut(self):
 self.canvas.setMapTool(self.toolZoomOut)

 # Set the map tool to
 def pan(self):
 self.canvas.setMapTool(self.toolPan)

 # Zoom to full extent of layer
 def zoomFull(self):
 self.canvas.zoomFullExtent()

 # Add an OGR layer to the map
 def addLayer(self):
 file = QFileDialog.getOpenFileName(self, Open Shapefile, .,
Shapefiles
 (*.shp))
 fileInfo = QFileInfo(file)

 # Add the layer
 layer = QgsVectorLayer(file, fileInfo.fileName(), ogr)

 if not layer.isValid():
 return

 # Change the color of the layer to gray
 symbols = layer.renderer().symbols()
 symbol = symbols[0]
 symbol.setFillColor(QColor.fromRgb(192,192,192))

 # Add layer to the registry
 QgsMapLayerRegistry.instance().addMapLayer(layer);

 # Set extent to the extent of our layer
 self.canvas.setExtent(layer.extent())

 # Set up the map canvas layer set
 cl = QgsMapCanvasLayer(layer)
 layers = [cl]
 self.canvas.setLayerSet(layers)
 
 def main(argv):

 # create Qt application
 app = QApplication(argv)

 # Initialize qgis libraries
 

Re: [Qgis-developer] Oracle provider tests

2013-06-07 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 06/06/2013 10:50, Paolo Cavallini ha scritto:
 Il 06/06/2013 10:03, Paolo Cavallini ha scritto:
 
 This happens with multipolygons, not with points.
 
 nor with lines.
 We also noticed that one extra line is listed for most or all geom
 tables, without the type of geometry. Also, many tables have both a
 polygon and a multipolygon layer (or line and multiline).
 Is this a known phenomenon? Any explanation?

This seems to be related to the (possibly messy) way the tables have been 
managed, so
probably a local phenomenon.
All the best.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGxlqgACgkQ/NedwLUzIr5yVACgjGGGezO5D8TwcMP/3eYy6Rzx
078An0l5WzwdJceYhVHpNHifIrbbZ/qr
=Wdm0
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Bug working with size in data-defined properties?

2013-06-07 Thread Jordi Torres
Hi,

I'm getting not expected results when working with data-defined size on
symbols. I'm wondering if I'm doing something wrong or maybe it's a bug.

The test it's quite simple:

1. Create a point layer with a sizeT table .
2. Create a point and give sizeT=10 .
3  Go to symbol layer (simpleMarker) and set size = 10  and see the result
3. Now active size in data-defined properties and pick the column sizeT.

The result is not the same (I was expecting that). Neither in
milimeters/map units.

I'm working against master, and other fields as rotation are running as
expected.

I have had a look to the bug tracker but I haven't seen this one reported.
It seems a pretty obvious bug so I rather to ask first here, because maybe
I'm doing something wrong or maybe I'm expecting something erroneous.

Sorry for the inconvenience.

Thanks.

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


Re: [Qgis-developer] Bug working with size in data-defined properties?

2013-06-07 Thread Régis Haubourg
Hi,Confirmed for me. 
It looks like size is multiplid by a factor 0.2.
6 value in data defined looks like 1,2 on screen. 1 look like 0,2. 

BTW behaviour is not clear since old advanced properties (proportion /
rotation) have not been removed AND have a different behaviour. They do not
use actual value, but act as a modifier of symbol size. New behaviour is by
far better! (still lacks options to use non linear fonctions.. but it still
is very nice)
Can anybody explains that newbehaviour and it interfers with data defined
style? 

Régis



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Bug-working-with-size-in-data-defined-properties-tp5058657p5058663.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] manageR update for 2.0

2013-06-07 Thread Giovanni Manghi
 I also miss it. AFAIK there are additional problems in Windows,
 because of rpy2, right?

just checked and I confirm that there are no Windows binaries for rpy2
and recent versions of python/R.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Bug working with size in data-defined properties?

2013-06-07 Thread Jordi Torres
Hi Régis,

Thanks for the testing. I think it's not multiplied by a defined factor at
all, divide by 0.2 and you still won't get the desired size.

Cheers.


2013/6/7 Régis Haubourg regis.haubo...@eau-adour-garonne.fr

 Hi,Confirmed for me.
 It looks like size is multiplid by a factor 0.2.
 6 value in data defined looks like 1,2 on screen. 1 look like 0,2.

 BTW behaviour is not clear since old advanced properties (proportion /
 rotation) have not been removed AND have a different behaviour. They do not
 use actual value, but act as a modifier of symbol size. New behaviour is by
 far better! (still lacks options to use non linear fonctions.. but it still
 is very nice)
 Can anybody explains that newbehaviour and it interfers with data defined
 style?

 Régis



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Bug-working-with-size-in-data-defined-properties-tp5058657p5058663.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




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


Re: [Qgis-developer] manageR update for 2.0

2013-06-07 Thread Filipe Dias
Using R via Sextante is also a good alternative. Shapefiles and Rasters are
exported into R and it's possible to apply all sorts of R tools to them.
There are a few good examples already in the algorithms tree.


On Fri, Jun 7, 2013 at 11:27 AM, Giovanni Manghi 
giovanni.man...@faunalia.pt wrote:

  I also miss it. AFAIK there are additional problems in Windows,
  because of rpy2, right?

 just checked and I confirm that there are no Windows binaries for rpy2
 and recent versions of python/R.
 ___
 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] Bug working with size in data-defined properties?

2013-06-07 Thread Marco Hugentobler

Hi

Check if you have activated Advanced - Size scale Field - Scale area / 
scale diameter

In the first case, size means actually area with data defined symbology.

Regards,
Marco

On 07.06.2013 12:28, Jordi Torres wrote:

Hi Régis,

Thanks for the testing. I think it's not multiplied by a defined 
factor at all, divide by 0.2 and you still won't get the desired size.


Cheers.


2013/6/7 Régis Haubourg regis.haubo...@eau-adour-garonne.fr 
mailto:regis.haubo...@eau-adour-garonne.fr


Hi,Confirmed for me.
It looks like size is multiplid by a factor 0.2.
6 value in data defined looks like 1,2 on screen. 1 look like 0,2.

BTW behaviour is not clear since old advanced properties (proportion /
rotation) have not been removed AND have a different behaviour.
They do not
use actual value, but act as a modifier of symbol size. New
behaviour is by
far better! (still lacks options to use non linear fonctions.. but
it still
is very nice)
Can anybody explains that newbehaviour and it interfers with data
defined
style?

Régis



--
View this message in context:

http://osgeo-org.1560.x6.nabble.com/Bug-working-with-size-in-data-defined-properties-tp5058657p5058663.html
Sent from the Quantum GIS - Developer mailing list archive at
Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org mailto:Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer




--
Jordi Torres




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



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

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


Re: [Qgis-developer] Bug working with size in data-defined properties?

2013-06-07 Thread Jordi Torres
Hi Marco,

You are right, it seems that slecting scale diameter does the trick. I
don't recall to change this, anyway thanks for the pointer.

Cheers.


2013/6/7 Marco Hugentobler marco.hugentob...@sourcepole.ch

  Hi

 Check if you have activated Advanced - Size scale Field - Scale area /
 scale diameter
 In the first case, size means actually area with data defined symbology.

 Regards,
 Marco


 On 07.06.2013 12:28, Jordi Torres wrote:

  Hi Régis,

  Thanks for the testing. I think it's not multiplied by a defined factor
 at all, divide by 0.2 and you still won't get the desired size.

  Cheers.


 2013/6/7 Régis Haubourg regis.haubo...@eau-adour-garonne.fr

 Hi,Confirmed for me.
 It looks like size is multiplid by a factor 0.2.
 6 value in data defined looks like 1,2 on screen. 1 look like 0,2.

 BTW behaviour is not clear since old advanced properties (proportion /
 rotation) have not been removed AND have a different behaviour. They do
 not
 use actual value, but act as a modifier of symbol size. New behaviour is
 by
 far better! (still lacks options to use non linear fonctions.. but it
 still
 is very nice)
 Can anybody explains that newbehaviour and it interfers with data defined
 style?

 Régis



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Bug-working-with-size-in-data-defined-properties-tp5058657p5058663.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




 --
 Jordi Torres




 ___
 Qgis-developer mailing 
 listQgis-developer@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-developer



 --
 Dr. Marco Hugentobler
 Sourcepole -  Linux  Open Source Solutions
 Weberstrasse 5, CH-8004 Zürich, switzerlandmarco.hugentob...@sourcepole.ch 
 http://www.sourcepole.ch
 Technical Advisor QGIS Project Steering Committee


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




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


Re: [Qgis-developer] Bug working with size in data-defined properties?

2013-06-07 Thread Régis Haubourg
Thanks marco, that's it. 
It's not easy to understand that advanced option are applied even if no
field is selected, since it was previous behaviour. Any idea how to make gui
more consistent for 2.1? 




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Bug-working-with-size-in-data-defined-properties-tp5058657p5058698.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Oracle provider tests

2013-06-07 Thread rldhont

Hi Paolo,

I would like to know if you have some trouble to select Oracle layer in 
the Oracle connection dialog ?


I have tested the Oracle Connection for a customer and I didn't be able 
to add Oracle Layer to my project because I can't select it.


Regards,
René-Luc D'Hont

Le 07/06/2013 10:15, Paolo Cavallini a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 06/06/2013 10:50, Paolo Cavallini ha scritto:

Il 06/06/2013 10:03, Paolo Cavallini ha scritto:


This happens with multipolygons, not with points.

nor with lines.
We also noticed that one extra line is listed for most or all geom
tables, without the type of geometry. Also, many tables have both a
polygon and a multipolygon layer (or line and multiline).
Is this a known phenomenon? Any explanation?

This seems to be related to the (possibly messy) way the tables have been 
managed, so
probably a local phenomenon.
All the best.
- -- 
Paolo Cavallini - Faunalia

www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGxlqgACgkQ/NedwLUzIr5yVACgjGGGezO5D8TwcMP/3eYy6Rzx
078An0l5WzwdJceYhVHpNHifIrbbZ/qr
=Wdm0
-END PGP SIGNATURE-
___
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] Oracle provider tests

2013-06-07 Thread Andreas Neumann
Hi René,

Did you get the table listing?

If yes, you have to choose the geometry type and the primary key column
- otherwise you cannot select and add the layer. Same with Postgis, but
with Postgis there is some good autodetection (depending on the QGIS
version).

Andreas

Am 07.06.2013 16:07, schrieb rldhont:
 Hi Paolo,
 
 I would like to know if you have some trouble to select Oracle layer in
 the Oracle connection dialog ?
 
 I have tested the Oracle Connection for a customer and I didn't be able
 to add Oracle Layer to my project because I can't select it.
 
 Regards,
 René-Luc D'Hont
 
 Le 07/06/2013 10:15, Paolo Cavallini a écrit :
 Il 06/06/2013 10:50, Paolo Cavallini ha scritto:
 Il 06/06/2013 10:03, Paolo Cavallini ha scritto:

 This happens with multipolygons, not with points.
 nor with lines.
 We also noticed that one extra line is listed for most or all geom
 tables, without the type of geometry. Also, many tables have both a
 polygon and a multipolygon layer (or line and multiline).
 Is this a known phenomenon? Any explanation?
 This seems to be related to the (possibly messy) way the tables have
 been managed, so
 probably a local phenomenon.
 All the best.
 -- Paolo Cavallini - Faunalia
 www.faunalia.eu
 Full contact details at www.faunalia.eu/pc
 Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
 ___
 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] Oracle provider tests

2013-06-07 Thread rldhont

Hi Andreas,

Thanks for this information.

I have the table listing but I don't that I have to choose the geometry 
type and the primary key column. Do I have to select  the SRS ?


René-Luc D'Hont

Le 07/06/2013 16:09, Andreas Neumann a écrit :

Hi René,

Did you get the table listing?

If yes, you have to choose the geometry type and the primary key column
- otherwise you cannot select and add the layer. Same with Postgis, but
with Postgis there is some good autodetection (depending on the QGIS
version).

Andreas

Am 07.06.2013 16:07, schrieb rldhont:

Hi Paolo,

I would like to know if you have some trouble to select Oracle layer in
the Oracle connection dialog ?

I have tested the Oracle Connection for a customer and I didn't be able
to add Oracle Layer to my project because I can't select it.

Regards,
René-Luc D'Hont

Le 07/06/2013 10:15, Paolo Cavallini a écrit :
Il 06/06/2013 10:50, Paolo Cavallini ha scritto:

Il 06/06/2013 10:03, Paolo Cavallini ha scritto:


This happens with multipolygons, not with points.

nor with lines.
We also noticed that one extra line is listed for most or all geom
tables, without the type of geometry. Also, many tables have both a
polygon and a multipolygon layer (or line and multiline).
Is this a known phenomenon? Any explanation?

This seems to be related to the (possibly messy) way the tables have
been managed, so
probably a local phenomenon.
All the best.
-- Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario

___
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 mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Oracle provider tests

2013-06-07 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 07/06/2013 16:12, rldhont ha scritto:
 Hi Andreas,
 
 Thanks for this information.
 
 I have the table listing but I don't that I have to choose the geometry type 
 and the
 primary key column. Do I have to select  the SRS ?

Yes, that's the point. Apart from a few small Oracle-related quirks, and very 
minor
issues I have mentioned, it works very well.
All the best.

- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGx6wAACgkQ/NedwLUzIr6uRACfdGVKYXL3PvD5aDhAKOeuhLHO
1tcAnA14YV5ptD0L8mS1hpgx8LWsWsAv
=xbfO
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Oracle provider tests

2013-06-07 Thread Jürgen E . Fischer
Hi Andreas,

On Fri, 07. Jun 2013 at 16:09:25 +0200, Andreas Neumann wrote:
 If yes, you have to choose the geometry type and the primary key column -
 otherwise you cannot select and add the layer. Same with Postgis, but with
 Postgis there is some good autodetection (depending on the QGIS version).

QGIS needs a specific CRS (ie. SRID) and a defined geometry type (point, line,
polygon) for each layer and offers what it finds in the database or requires to
enter what is undefined.  You can only select the lines that are fully defined.

That's very similar in the PostGIS and Oracle dialogs.  It's just that Oracle
doesn't have standard constraints, that limit the usable geometry types and
SRIDs in a column and therefore also doesn't have a metadata table that carries
that information, while PostGIS tables are usually quite constrainted.

So for Oracle everything except the geometry columns themselves need to be
scanned, while for PostGIS that can be taken from the metadata table in the
usual case with applied constraints.

If you create geometry column in PostGIS 2 with SRID 0 (meaning any) and type
GEOMETRY (any geometry type) the outcome might be quite similar and you get a
couple of lines for that column, each with a different combination of available
geometry type and SRID combinations in the table plus another line where you
can enter geometry types and SRIDs that you don't already have.

But the oracle provider isn't very widely used, so there are probably still
things that could use attention.


Jürgen

-- 
Jürgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-31
Dipl.-Inf. (FH)   Rheinstraße 13Fax. +49-4931-918175-50
Software Engineer D-26506 Norden   http://www.norbit.de
committ(ed|ing) to Quantum GIS IRC: jef on FreeNode 


-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

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


Re: [Qgis-developer] QGIS 2.0 Release Date

2013-06-07 Thread Tim Sutton
Hi Ted

At the moment the release looks like it will be delayed by at least
3-4 weeks - there are still around 80 blocker tickets and we had some
last minute changes we wanted to incorporate into the 2.0 relelase. I
will be posting a new release timeline early next week.

Regards

Tim

On Fri, Jun 7, 2013 at 6:08 AM, Ted tiruchirapa...@gmail.com wrote:
 Hi,

 Its 7th June today and the (original) scheduled release date for QGIS v 2.0

 We are aware that, its been postponed due to multiples issues.

 Can you please define a new release date ?


 Thanks

 ted

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




-- 
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


Re: [Qgis-developer] Oracle provider tests

2013-06-07 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 07/06/2013 16:39, Jürgen E. Fischer ha scritto:
 QGIS needs a specific CRS (ie. SRID) and a defined geometry type (point, line,
 polygon) for each layer and offers what it finds in the database or requires 
 to
 enter what is undefined.  You can only select the lines that are fully 
 defined.
 
 That's very similar in the PostGIS and Oracle dialogs.  It's just that Oracle
 doesn't have standard constraints, that limit the usable geometry types and
 SRIDs in a column and therefore also doesn't have a metadata table that 
 carries
 that information, while PostGIS tables are usually quite constrainted.
 
 So for Oracle everything except the geometry columns themselves need to be
 scanned, while for PostGIS that can be taken from the metadata table in the
 usual case with applied constraints.
 
 If you create geometry column in PostGIS 2 with SRID 0 (meaning any) and type
 GEOMETRY (any geometry type) the outcome might be quite similar and you get a
 couple of lines for that column, each with a different combination of 
 available
 geometry type and SRID combinations in the table plus another line where you
 can enter geometry types and SRIDs that you don't already have.

Hi.
I think these notes should be added to the User Manual.
Otto, do you agree?
All the best.

- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGx+P0ACgkQ/NedwLUzIr5OFgCeI9Y6OfzicTSI4Vef9PNc/Vx7
CggAn1SqdYxoQ396bhyI+NqMXEUeAtES
=emp1
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] manageR update for 2.0

2013-06-07 Thread John C. Tull
Hi Filipe,

On Jun 7, 2013, at 3:37 AM, Filipe Dias filipesd...@gmail.com wrote:

 Using R via Sextante is also a good alternative. Shapefiles and Rasters are 
 exported into R and it's possible to apply all sorts of R tools to them. 
 There are a few good examples already in the algorithms tree.
 

I will have to test this. The value of manageR is the familiar R console and 
the simple import/export of raster and vector layers into the workspace. 
Although manageR is marked as incompatible with 2.0, I have gotten it to run 
after a fresh installation in QGIS, but the import function is broken, so it is 
of little use. I'll look into the example R scripts and see how that works out.

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


[Qgis-developer] Download stats : 558909 ?

2013-06-07 Thread MORREALE Jean Roc

558909
Hi,

I'm using these two pages to get an actual download count of qgis 1.8 
and by cumuling all the page views on the *.exe, the number is 558909.


Am I doing a mistake (counting twice) or is it the real number ?

regards,
jean-roc


http://www.qgis.org/cgi-bin/awstats.pl?urlfilter=/downloads/QGIS-OSGeo4W-1.8.0-.*-Setup.exeurlfilterex=output=urldetailconfig=qgisframename=mainrightmonth=allyear=2012

http://www.qgis.org/cgi-bin/awstats.pl?urlfilter=/downloads/QGIS-OSGeo4W-1.8.0-.*-Setup.exeurlfilterex=output=urldetailconfig=qgisframename=mainrightmonth=allyear=2013

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


Re: [Qgis-developer] Download stats : 558909 ?

2013-06-07 Thread Alex Mandel

On 06/07/2013 10:17 AM, MORREALE Jean Roc wrote:

558909
Hi,

I'm using these two pages to get an actual download count of qgis 1.8
and by cumuling all the page views on the *.exe, the number is 558909.

Am I doing a mistake (counting twice) or is it the real number ?

regards,
jean-roc


http://www.qgis.org/cgi-bin/awstats.pl?urlfilter=/downloads/QGIS-OSGeo4W-1.8.0-.*-Setup.exeurlfilterex=output=urldetailconfig=qgisframename=mainrightmonth=allyear=2012


http://www.qgis.org/cgi-bin/awstats.pl?urlfilter=/downloads/QGIS-OSGeo4W-1.8.0-.*-Setup.exeurlfilterex=output=urldetailconfig=qgisframename=mainrightmonth=allyear=2013



It's a real number, not necessarily real people (some may be bots). Also 
not necessarily unique. I've read that awstats tends to overestimate up 
to 10%. Its also hard to tell of those hits, how many actually 
downloaded the whole file and installed.


Keep in mind that only reflects windows installs too.

I've actually been looking for research papers on how to get better 
numbers out of download logs but haven't found much yet.


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


Re: [Qgis-developer] Download stats : 558909 ?

2013-06-07 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 07/06/2013 19:47, Alex Mandel ha scritto:
 It's a real number, not necessarily real people (some may be bots). Also not
 necessarily unique. I've read that awstats tends to overestimate up to 10%. 
 Its also

On the other hand, many organizations download just one copy, and distribute it
within their network.
I think a guesstimate of around one million users is not too far from reality.
Of course, trends are probably mor informative than actual numbers.
All the best.

- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlGyIQwACgkQ/NedwLUzIr5SsgCeKbjiid6vnX/gOR6ktzNW/Ah/
zHkAnih2nYrXE2oKcxjx6pKidZaBdcrA
=9t8Q
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Download stats : 558909 ?

2013-06-07 Thread MORREALE Jean Roc
I know about these details but I've seen the qgis' moon releases rise 
and fall into oblivion and I'm still amazed by the amount of progress of 
this software. So 558909 ?


Just Awesome. :)


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


Re: [Qgis-developer] Download stats : 558909 ?

2013-06-07 Thread MORREALE Jean Roc
Yeah I know the difference, if everybody was doing like me you ahve to 
multiply by x50 ^^


Is there a possibility to have a map of these downloads ?

Le 07/06/2013 20:06, Paolo Cavallini a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 07/06/2013 19:47, Alex Mandel ha scritto:

It's a real number, not necessarily real people (some may be bots). Also not
necessarily unique. I've read that awstats tends to overestimate up to 10%. Its 
also


On the other hand, many organizations download just one copy, and distribute it
within their network.
I think a guesstimate of around one million users is not too far from reality.
Of course, trends are probably mor informative than actual numbers.
All the best.



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


Re: [Qgis-developer] Download stats : 558909 ?

2013-06-07 Thread Alex Mandel

On 06/07/2013 11:12 AM, MORREALE Jean Roc wrote:

Yeah I know the difference, if everybody was doing like me you ahve to
multiply by x50 ^^

Is there a possibility to have a map of these downloads ?



Yes it is possible to map, the GEOIP extension in awstats just needs to 
be enabled (with a free db from Maxmind).


Thanks,
Alex

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


Re: [Qgis-developer] many SVG symbols disappeared

2013-06-07 Thread Olivier Dalang
Hi !

So I've been working a little bit about that deprecated folder idea.
It's not ready yet, but I have some questions since I'm not familiar at all
with QgsProjectFileTransform nor with how SVG search paths work.

https://github.com/olivierdalang/Quantum-GIS/tree/SvgLibraryRetroCompatibility

*Here's what it does :*

1. Installation
It creates a new svg_deprecated folder containing all original 1.8's
symbols (alongside the normal svg folder, right in the installation root)

2. Project file conversion
In the QgsProjectFileTransform::transform1800to1900() method, it updates
the svg paths.
- if the path starts with a / (which seems to correspond to the svg
folder path), it prepends QGIS_PREFIX_PATH/svg_deprecated
- if not, it does nothing (since it's an absolute path)


*Questions :*

A. Is it always right that a path starting with a / is a file inside the
QGIS's svg folder ? (I never used SVGs search paths, if such a thing exists
in 1.8)
B. Is it okay to refer to the deprecated folder using an absolute path (
starting with QGIS_PREFIX_PATH ) ? I tried to prepend /../svg_deprecated
instead, but with no success... (using absolute path has the major
disadvantage of making the project file unportable). Any idea ?
C. The file paths for SVGs in the print composer are absolute... So they
still link to the 1.8 installation's svg folder. This works, but only until
the user uninstalls 1.8... Is that OK ?
D. Are there other places where SVGs from the library can appear in QGIS
1.8's projects ? (I've thought of SvgMarker, SVGFill and as images in the
print composer)

(E: is it better to already open a pull request for this kind of questions,
even if the branch is not ready to merge ?)


Thanks !





2013/5/15 Larry Shaffer lar...@dakotacarto.com

 Hi,

 On Wed, May 15, 2013 at 11:26 AM, John C. Tull jct...@gmail.com wrote:

 Hi everyone,

 On May 7, 2013, at 1:42 AM, Duarte Carreira dcarre...@edia.pt wrote:

  If we can get hold of the old symbology lib than that's fine by me. But
 please don't make us and others rebuild their entire organization's
 cartography just because you don't like the symbols.
 
  Thanks,
  Duarte

 An option to get the old symbols should suffice, right? Instructions on
 what needs to be done with these symbols for each platform might also be
 helpful.


 Well, even though I agree with the new changes, it will be a harsh
 situation for those who have used the deprecated ones in their projects.
 And, kind of rude (from the users standpoint) to force the change and
 require a manual rebuild of existing projects.

 There are still some issues regarding the new symbol setup:

 1) IMO, the deprecation of many symbols is fine, if they are moved to a
 'deprecated' folder. Such a folder may or may not be part of the SVG search
 paths, but still in source and installed. Then, just like when you move or
 restructure a web site, create some path rewrite rules that will
 auto-update a 2.0 project and rewrite the deprecated SVG paths to the
 deprecated SVGs folder.

 This could remove the deprecated SVGs from the selector interface, but not
 break existing projects. When user goes to work with the symbol, the
 correct path is visible, but they can only select new-style SVGs for which
 to update the symbol, unless they specifically browse to the deprecated
 folder and link to a deprecated one again.

 I think such an approach will keep good karma with the user community.

 2) Many of the new symbols are white as default. This is probably so they
 work well on top of a colored background when layered. However, this makes
 them very difficult to preview (especially on Mac). Either the widget view
 needs to have a medium gray background, or the default color for those SVGs
 should be gray (or maybe black, but gray would work better). This assumes
 that all those SVGs have color parameters that can just be changed later.

 3) The new SVG backgrounds for labels do not yet support such 'layered'
 symbols. Currently only a single SVG can be used. There needs to be a
 decent selection of background SVGs for labels (e.g. road shields) that do
 not require layering. Layering backgrounds may not be a good fit for
 labeling in the future either, since single SVGs with drop shadows already
 slow labeling down.

 Regards,

 Larry



  -Mensagem original-
  De: Tim Sutton [mailto:li...@linfiniti.com]
  Enviada: segunda-feira, 6 de Maio de 2013 21:56
  Para: Olivier Dalang
  Cc: Nathan Woodrow; qgis-developer; Giovanni Manghi; Duarte Carreira
  Assunto: Re: [Qgis-developer] many SVG symbols disappeared
 
  Hi
 
  On Mon, May 6, 2013 at 2:31 PM, Olivier Dalang 
 olivier.dal...@gmail.com wrote:
  I was asking that question on this thread :
 
  http://osgeo-org.1560.x6.nabble.com/Ideas-on-the-SVG-symbols-library-t
  d5040508.html#a5046486
 
  Maybe I didn't emphasize enough on the deletion of symbols...
 
  IMO, the most elegant solution is to keep only the good-looking
  symbols so we provide a simple and 

[Qgis-developer] QGIS defaulting to no ellipsoid - Bug #7441, opinions needed

2013-06-07 Thread Nyall Dawson
I'm posting this comment to the list to hopefully get some more
opinions about bug 7741 - Measurements in degrees even when meters
are chosen as map units

I think this bug is caused by QGIS defaulting to None / planimetric
for the ellipsoid for new projects. In 1.8 QGIS defaulted to WGS84.
IMO The correct behaviour should be to restore this as the default
setting.

However -- I'm having lots of trouble understanding how this is
supposed to work. The option to choose a canvas unit for a project is
under the Canvas units (CRS transformation: OFF) group in the
project properties dialog. If you hover over an option the tooltip
states Used when CRS transformation is turned off. I'm pretty sure
this tooltip is wrong -- since the choice DOES apply even if CRS
transformation is turned on. HOWEVER, the choice is reset when the
project properties window is opened UNLESS CRS transformation is
off very confusing!!

To add to the confusion there's 2 WGS84 ellipsoids listed - one is
WGS84 and one is WGS 84. Choosing WGS84 actually results in
Clarke 1986 being saved for the project!

My gut feeling is that:
- Ellipsoid should default to WGS 84
- The duplicate/bad WGS84 ellipsiod needs to be removed
- The tooltip for canvas units needs to be fixed/reworded
- The choice of canvas unit should save even if CRS transformation is enabled

I'd like a second opinion on this though, since there may have been
discussion around this behaviour which I'm not aware of.

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