[Qgis-user] Errors in startup phase of qgis-dev should add to issue system ?

2014-10-03 Thread Andrea Peri
Salve,

Hi,
this morning I update the qgis-dev to find some bug searching.

Starting the qgis-dev I can see an error windows with this message:

It seem an error of the QSTAT plugin that QGIS is not able to load.

I dont know if this is a ticket for qgis or is for the plugin.
But surely is an issue in starting of qgis.

I'm not sure if this kind of bugs need to be add on ticket,
becasue I guess the issue system is for the bug when an user do
something using qgis.
This instead is on start phase and the user do nothing still.

Thx,


Couldn't load plugin 'qProf' from
['C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python',
'C:/Users/andrea/.qgis2/python',
'C:/Users/andrea/.qgis2/python/plugins',
'C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python/plugins',
'C:\MY-PRO~1\osgeo4w\bin\python27.zip',
'C:\MY-PRO~1\osgeo4w\apps\Python27\DLLs',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\plat-win',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\lib-tk',
'C:\MY-PRO~1\osgeo4w\bin', 'C:\MY-PRO~1\osgeo4w\apps\Python27',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\GDAL-1.11.1-py2.7-win32.egg',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\PIL',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win32.egg',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\python_dateutil-2.2-py2.7.egg',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\pytz-2014.2-py2.7.egg',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\win32',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\win32\lib',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\Pythonwin',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\six-1.6.1-py2.7.egg',
'C:\MY-PRO~1\osgeo4w\apps\Python27\lib\site-packages\wx-2.8-msw-unicode',
'C:\Users\andrea\.qgis2\python\plugins\MetaSearch\ext-libs']

Traceback (most recent call last):
  File "C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python\qgis\utils.py",
line 185, in loadPlugin
__import__(packageName)
  File "C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python\qgis\utils.py",
line 460, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/andrea/.qgis2/python/plugins\qProf\__init__.py", line 24, in
from qProf_gui import qProf_gui
  File "C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python\qgis\utils.py",
line 460, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/andrea/.qgis2/python/plugins\qProf\qProf_gui.py", line 9, in
from qProf_QWidget import qprof_QWidget
  File "C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python\qgis\utils.py",
line 460, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/andrea/.qgis2/python/plugins\qProf\qProf_QWidget.py",
line 14, in
from osgeo import ogr
  File "C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python\qgis\utils.py",
line 460, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named osgeo


Python version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]


QGIS version:
2.5.0-Master Master, 30dd6e7

Python path: ['C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python',
u'C:/Users/andrea/.qgis2/python',
u'C:/Users/andrea/.qgis2/python/plugins',
'C:/MY-PRO~1/osgeo4w/apps/qgis-dev/./python/plugins',
'C:\\MY-PRO~1\\osgeo4w\\bin\\python27.zip',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\DLLs',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\plat-win',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\lib-tk',
'C:\\MY-PRO~1\\osgeo4w\\bin', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\GDAL-1.11.1-py2.7-win32.egg',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\PIL',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\jinja2-2.7.2-py2.7.egg',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\markupsafe-0.23-py2.7-win32.egg',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\python_dateutil-2.2-py2.7.egg',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\pytz-2014.2-py2.7.egg',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\win32',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\six-1.6.1-py2.7.egg',
'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode',
'C:\\Users\\andrea\\.qgis2\\python\\plugins\\MetaSearch\\ext-libs']
-




-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qg

[Qgis-user] gpg --recv-key DD45F6C3

2014-10-03 Thread Yunus Ariyanto
I am using QGIS 2.4 running on Debian Jessie (testing)..

The last QGIS gpg key that i used was outdated, so i  try to receive
new gpg key by terminal:
$gpg --recv-key DD45F6C3

Several time i try to re-run that command, but it always failed.. the
result is:
gpg: requesting key DD45F6C3 from hkp server keys.gnupg.net
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

As information, my wireless connection is ok..

any can help me? thanks..


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

[Qgis-user] Map Layers not Loading on QGIS Server Correctly

2014-10-03 Thread rrm364
I just installed QGIS Server, and I'm having trouble loading layers. I am
using Windows 7. I used the instructions from here  here

  
and  here
   to
install QGIS Server.  Whenever I use the getcapabilities command, I can get
an xml capabilities file. However, it shows that the layers have not been
added, and I am not sure why. When I scroll down to layers in my
capabilities file, it thinks the name of the title is also the name of the
layers which is not true. Also, I get no results when I use getmap (and no
error messages). Any ideas on what the problem could be? 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Map-Layers-not-Loading-on-QGIS-Server-Correctly-tp5165825.html
Sent from the Quantum GIS - 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] Processing join attributes table

2014-10-03 Thread David J. Bakeman

  
  
I am new to processing and I have an issue when
trying to use join attributes table in my model.
Simple model:

I have an input points: [point vector] and ID: [field]

create a raster from points using ID using GRID (Nearest
Neighbor)
create polygons from raster with Polygonize use ID
Join the polygon to the rest of the original point shapefiles
attributes with Join Attribute Table and the ID field

I can do this manually but when I try to do it in the modeler it
doesn't give me any choices for the Input Layer2 and anything I
type in there just gives me an error when I select OK.  I dug
around in the processing code and in JoinAttributes.py for the
second parameter I changed ParameterTable to ParameterVector and
now it allows me to select points like I wanted.  I'm guessing
this is not correct but I'm not sure what the correct thing is?
  

  

  

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

Re: [Qgis-user] Python 2.6 plugin compatibility

2014-10-03 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 03/10/2014 22:27, Carlo A. Bertelli (Charta s.r.l.) ha scritto:
> Hello, more and more frequently new and updated plugins stop
> working with python 2.6. Are the authors aware of these
> incompatibilities? Could it be possible to verify and fix them?

Please, if you find some plugin not working, open a ticket in the
relative bug tracker. Also, sopnsoring the fix could go a long way
towards promptly solving the problems.
Thanks.

- -- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iEYEARECAAYFAlQvB6MACgkQ/NedwLUzIr4nUwCfZRgDlw1ZeqQNI3/C3gLXpE+A
fisAn0l2emCr7Oj/Rv/u0+3+KHXktD9R
=Tz2w
-END PGP SIGNATURE-
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Python 2.6 plugin compatibility

2014-10-03 Thread Carlo A. Bertelli (Charta s.r.l.)
Hello,
more and more frequently new and updated plugins stop working with python
2.6.
Are the authors aware of these incompatibilities?
Could it be possible to verify and fix them?
Thanks
c
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Serial map from template composer. Working with QGIS 2.2, problems with QGIS 2.4

2014-10-03 Thread Andrea Amparore
On Wed, Oct 1, 2014 at 10:12 PM, Nyall Dawson  wrote:
>
>
> On 02/10/2014 2:55 am, "Andrea Amparore"  wrote:
> >
> > Thanks Andreas!
> >
> > Actually I need to do it with a script, because the serial printing is a 
> > part of a much more complex script.
> >
> > It works on QGIS 2.2, but on QGIS 2.4 it drives me crazy…
>
> Two things:
> - QgsMapRenderer is deprecated in 2.4 and above. You should update your code 
> to use the new replacement QgsMapSettings object.
>
> - Why don't you try saving the XML templates from your script to qpt files 
> and then try loading them manually into QGIS? That might give you a better 
> idea where your script is breaking.
>
> Nyall




Thanks to Nyall's suggestions now the script is adapted for QGIS 2.4.

In fact, the problem was generated by the object QgsMapRenderer, that
is deprecated in 2.4 and above. To make the script work it’s necessary
to replace it by the object QgsMapSettings.

Consequently, also some function names need to be slightly changed
(e.g. from setProjectionsEnabled() to setCrsTransformEnabled(), from
setLayerSet() to setLayers())

But there's still a minor problem: the two shapefiles on the map have
different CRS (UTM zone 15N and WGS84), and I would like to assign to
the map one of the two. It works only if I choose WGS84 (srid = 4326),
but if I assign the UTM projection to the map no layer is displayed.

The attribute “on the fly CRS transformations” is enabled, so I don’t
see the reason.

This is the new corrected script, now working also with QGIS 2.4

import os

from qgis.core import *

from qgis.gui import *

from PyQt4.QtCore import *

from PyQt4.QtGui import *

from PyQt4.QtXml import *

import lxml.etree as etree



print "setting prefix"

QgsApplication.setPrefixPath("/usr", True)

print "initiating qgis"

QgsApplication.initQgis()

print 'creating new app'

app = QgsApplication([], True)

#removing old layers

QgsMapLayerRegistry.instance().removeAllMapLayers()



script_folder = os.path.dirname(__file__)

project_folder = os.path.dirname(script_folder)

output_folder = os.path.join(project_folder, 'map_outputs')

xml_folder = os.path.join(project_folder, 'project_outputs')

shapefile_folder = os.path.join(project_folder, 'shapefile_folder')



template_composer = os.path.join(project_folder, 'basic_composer_template.qpt')

polyg_shapefile = os.path.join(shapefile_folder, 'polygon.shp') # crs
EPSG:4326 - WGS 84

point_shapefile = os.path.join(shapefile_folder, 'point.shp') # crs
EPSG:32615 - WGS 84 / UTM zone 15N



mapname = "Test Map"

srid = 4326

provider_name = 'ogr'

layerset = []



#add layer 1

vlayer_name= 'polygon layer'

vdata_source = polyg_shapefile

print "Loading EQ buffers"

layer = QgsVectorLayer(vdata_source, vlayer_name, provider_name)

print "Buffers loaded"

QgsMapLayerRegistry.instance().addMapLayer(layer)

layerset.append(layer.id())



#add layer 2

point_layer_name= 'point layer'

point_data_source = point_shapefile

point_layer = QgsVectorLayer(point_data_source, point_layer_name, provider_name)

QgsMapLayerRegistry.instance().addMapLayer(point_layer)

layerset.append(point_layer.id())



# Set up the MapSetting object that will be assigned to the composition

ms = QgsMapSettings()

#preparing the map the extent - 3 times wider than the polygon layer's extent

rect = layer.extent()

rect.scale(3)



# Enable on the fly CRS transformations

ms.setCrsTransformEnabled(True)



composition = QgsComposition(ms)

#set WGS84 as destination crs

map_projection = QgsCoordinateReferenceSystem(srid,
QgsCoordinateReferenceSystem.PostgisCrsId)

map_projection_descr = map_projection.description()

ms.setDestinationCrs(map_projection)



#open the composer template and edit it

with open(template_composer, 'r') as f:

tree  = etree.parse(f)

#setting extent

for elem in tree.iter(tag = 'Extent'):

elem.attrib['xmax'] = str(rect.xMaximum())

elem.attrib['xmin'] = str(rect.xMinimum())

elem.attrib['ymax'] = str(rect.yMaximum())

elem.attrib['ymin'] = str(rect.yMinimum())

#editing the title

for elem in tree.iter(tag = 'ComposerLabel'):

for child in elem:

if child.tag == 'ComposerItem':

if child.attrib['id'] == "__maintitle__":

elem.attrib['labelText'] = mapname

#save the edited composer as a new file

new_composer = os.path.join(xml_folder, mapname + "_composer.qpt")

tree.write(new_composer)



#open the newly created composer

new_composerfile = file(new_composer, 'rt')

new_composer_content = new_composerfile.read()

new_composerfile.close()

document = QDomDocument()

document.setContent(new_composer_content)

result =composition.loadFromTemplate(document)



# Get the main map canvas on the composition and set the layers

composerMap = composition.getComposerMapById(0)

composerMap.renderModeUpdateCachedImage()

ms.setLayers(layerset)



#legend

legend =QgsComposerLegend(composition)