Skip to content

Commit 01d635a

Browse files
committed
Merge remote-tracking branch 'origin'
2 parents 2f60a5f + 039b4fb commit 01d635a

File tree

120 files changed

+4544
-2842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+4544
-2842
lines changed

debian/changelog

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ qgis (2.11.0) UNRELEASED; urgency=medium
22

33
* New development version 2.11 after branch of 2.10
44
* moved grass default.qgc from config to modules
5+
* include grass7 plugin
56

6-
-- Jürgen E. Fischer <jef@norbit.de> Fri, 24 Jul 2015 08:37:55 +0200
7+
-- Jürgen E. Fischer <jef@norbit.de> Tue, 25 Aug 2015 00:14:25 +0200
78

89
qgis (2.10.0) unstable; urgency=medium
910

debian/control.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Build-Depends:
99
#sid stretch jessie wheezy saucy sid-oracle trusty utopic vivid# debhelper (>= 9),
1010
#precise# debhelper (>= 7),
1111
flex,
12-
grass-dev (<< 7),
12+
grass-dev,
1313
libexpat1-dev,
1414
libfcgi-dev,
1515
#sid stretch jessie sid-oracle trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
@@ -23,8 +23,8 @@ Build-Depends:
2323
libqt4-dev (>= 4.7.0),
2424
libqt4-opengl-dev,
2525
libqtwebkit-dev,
26-
#sid stretch jessie wheezy sid-oracle# libqwt-dev,
27-
#precise saucy trusty utopic vivid# libqwt5-qt4-dev,
26+
#stretch jessie wheezy sid-oracle# libqwt-dev,
27+
#precise saucy trusty utopic vivid sid# libqwt5-qt4-dev,
2828
libspatialite-dev,
2929
libsqlite3-dev,
3030
libspatialindex-dev,
@@ -273,7 +273,7 @@ Depends:
273273
qgis-plugin-grass-common (= ${source:Version}),
274274
${shlibs:Depends},
275275
${misc:Depends},
276-
#!precise# grass-core (<< 7)
276+
#!precise# grass-core
277277
#precise# grass (<< 7)
278278
Description: GRASS plugin for QGIS
279279
QGIS is a Geographic Information System (GIS) which manages, analyzes and

debian/rules

+12-2
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ CMAKE_OPTS := \
4747
-DBUILDNAME=$(DEB_BUILD_NAME) \
4848
-DCMAKE_VERBOSE_MAKEFILE=1 \
4949
-DCMAKE_INSTALL_PREFIX=/usr \
50-
-DGRASS_PREFIX=/usr/lib/$(GRASS) \
5150
-DBINDINGS_GLOBAL_INSTALL=TRUE \
5251
-DPEDANTIC=TRUE \
5352
-DWITH_QSPATIALITE=TRUE \
5453
-DWITH_SERVER=TRUE \
5554
-DWITH_SERVER_PLUGINS=TRUE \
56-
-DWITH_GRASS7=FALSE \
5755
-DSERVER_SKIP_ECW=TRUE \
5856
-DQGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \
5957
-DWITH_APIDOC=TRUE \
@@ -107,6 +105,18 @@ else
107105
CMAKE_OPTS += -DENABLE_TESTS=TRUE
108106
endif
109107

108+
ifeq ($(GRASSVER),7)
109+
CMAKE_OPTS += \
110+
-DWITH_GRASS=FALSE \
111+
-DWITH_GRASS7=TRUE \
112+
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
113+
else
114+
CMAKE_OPTS += \
115+
-DWITH_GRASS=TRUE \
116+
-DWITH_GRASS7=FALSE \
117+
-DGRASS_PREFIX=/usr/lib/$(GRASS)
118+
endif
119+
110120
ifneq (,$(findstring $(DISTRIBUTION),"wheezy jessie stretch trusty sid sid-oracle"))
111121
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
112122
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)

images/images.qrc

+2
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@
508508
<file>themes/default/mIconClear.png</file>
509509
<file>flags/zh.png</file>
510510
<file>themes/default/mIconPaintEffects.svg</file>
511+
<file>themes/default/mActionCircularStringCurvePoint.png</file>
512+
<file>themes/default/mActionCircularStringRadius.png</file>
511513
</qresource>
512514
<qresource prefix="/images/tips">
513515
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Loading
Loading

ms-windows/osgeo4w/package.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
364364
--exclude "apps/%PACKAGENAME%/python/qgis/server" ^
365365
"bin/%PACKAGENAME%-browser-bin.exe" ^
366366
"bin/%PACKAGENAME%-bin.exe" ^
367+
"bin/python-%PACKAGENAME%.bat.tmpl" ^
367368
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
368369
"apps/%PACKAGENAME%/i18n/" ^
369370
"apps/%PACKAGENAME%/icons/" ^

python/core/geometry/qgsabstractgeometryv2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class QgsAbstractGeometryV2
9090
virtual QgsRectangle calculateBoundingBox() const;
9191

9292
//render pipeline
93-
virtual void transform( const QgsCoordinateTransform& ct ) = 0;
93+
virtual void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform ) = 0;
9494
virtual void transform( const QTransform& t ) = 0;
9595
//virtual void clip( const QgsRectangle& rect );
9696
virtual void draw( QPainter& p ) const = 0;

python/core/geometry/qgscircularstringv2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class QgsCircularStringV2: public QgsCurveV2
3838
virtual QgsLineStringV2* curveToLine() const;
3939

4040
void draw( QPainter& p ) const;
41-
void transform( const QgsCoordinateTransform& ct );
41+
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
4242
void transform( const QTransform& t );
4343
//void clip( const QgsRectangle& rect );
4444
void addToPainterPath( QPainterPath& path ) const;

python/core/geometry/qgscompoundcurvev2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class QgsCompoundCurveV2: public QgsCurveV2
4545
void close();
4646

4747
void draw( QPainter& p ) const;
48-
void transform( const QgsCoordinateTransform& ct );
48+
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
4949
void transform( const QTransform& t );
5050
void addToPainterPath( QPainterPath& path ) const;
5151
void drawAsPolygon( QPainter& p ) const;

python/core/geometry/qgscurvepolygonv2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
4949
bool removeInteriorRing( int nr );
5050

5151
virtual void draw( QPainter& p ) const;
52-
void transform( const QgsCoordinateTransform& ct );
52+
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
5353
void transform( const QTransform& t );
5454

5555
virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );

python/core/geometry/qgsgeometrycollectionv2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
2323
virtual bool addGeometry( QgsAbstractGeometryV2* g /Transfer/ );
2424
virtual bool removeGeometry( int nr );
2525

26-
virtual void transform( const QgsCoordinateTransform& ct );
26+
virtual void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
2727
void transform( const QTransform& t );
2828
//virtual void clip( const QgsRectangle& rect );
2929
virtual void draw( QPainter& p ) const;

python/core/geometry/qgslinestringv2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class QgsLineStringV2: public QgsCurveV2
3838
void append( const QgsLineStringV2* line );
3939

4040
void draw( QPainter& p ) const;
41-
void transform( const QgsCoordinateTransform& ct );
41+
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
4242
void transform( const QTransform& t );
4343

4444
void addToPainterPath( QPainterPath& path ) const;

python/plugins/db_manager/db_plugins/data_model.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ def headerData(self, section, orientation, role):
211211

212212
def flags(self, index):
213213
flags = SimpleTableModel.flags(self, index)
214-
if index.column() == 2: # set Null column as checkable
215-
flags &= ~Qt.ItemIsEditable
216-
flags |= Qt.ItemIsUserCheckable
214+
if index.column() == 2 and flags & Qt.ItemIsEditable: # set Null column as checkable instead of editable
215+
flags = flags & ~Qt.ItemIsEditable | Qt.ItemIsUserCheckable
217216
return flags
218217

219218
def append(self, fld):
@@ -222,6 +221,8 @@ def append(self, fld):
222221
row = self.rowCount() - 1
223222
self.setData(self.index(row, 0), fld, Qt.UserRole)
224223
self.setData(self.index(row, 1), fld.primaryKey, Qt.UserRole)
224+
self.setData(self.index(row, 2), None, Qt.DisplayRole)
225+
self.setData(self.index(row, 2), Qt.Unchecked if fld.notNull else Qt.Checked, Qt.CheckStateRole)
225226

226227
def _getNewObject(self):
227228
from .plugin import TableField

python/plugins/db_manager/dlg_import_vector.py

+43-25
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,33 @@ def setupWorkingMode(self, mode):
7171
QObject.connect(self.cboInputLayer, SIGNAL("editTextChanged(const QString &)"), self.inputPathChanged)
7272
#QObject.connect( self.cboInputLayer, SIGNAL("currentIndexChanged(int)"), self.updateInputLayer )
7373
QObject.connect(self.btnUpdateInputLayer, SIGNAL("clicked()"), self.updateInputLayer)
74+
75+
self.editPrimaryKey.setText(self.default_pk)
76+
self.editGeomColumn.setText(self.default_geom)
7477
else:
7578
# set default values
76-
pk = self.outUri.keyColumn()
77-
self.editPrimaryKey.setText(pk if pk != "" else self.default_pk)
78-
if self.inLayer.hasGeometryType():
79-
geom = self.outUri.geometryColumn()
80-
self.editGeomColumn.setText(geom if geom != "" else self.default_geom)
81-
82-
inCrs = self.inLayer.crs()
83-
srid = inCrs.postgisSrid() if inCrs.isValid() else 4236
84-
self.editSourceSrid.setText("%s" % srid)
85-
self.editTargetSrid.setText("%s" % srid)
86-
8779
self.checkSupports()
80+
self.updateInputLayer()
8881

8982
def checkSupports(self):
9083
""" update options available for the current input layer """
9184
allowSpatial = self.db.connector.hasSpatialSupport()
9285
hasGeomType = self.inLayer and self.inLayer.hasGeometryType()
9386
isShapefile = self.inLayer and self.inLayer.providerType() == "ogr" and self.inLayer.storageType() == "ESRI Shapefile"
87+
9488
self.chkGeomColumn.setEnabled(allowSpatial and hasGeomType)
89+
if not self.chkGeomColumn.isEnabled(): self.chkGeomColumn.setChecked(False)
90+
9591
self.chkSourceSrid.setEnabled(allowSpatial and hasGeomType)
92+
if not self.chkSourceSrid.isEnabled(): self.chkSourceSrid.setChecked(False)
9693
self.chkTargetSrid.setEnabled(allowSpatial and hasGeomType)
94+
if not self.chkTargetSrid.isEnabled(): self.chkTargetSrid.setChecked(False)
95+
9796
self.chkSinglePart.setEnabled(allowSpatial and hasGeomType and isShapefile)
97+
if not self.chkSinglePart.isEnabled(): self.chkSinglePart.setChecked(False)
98+
9899
self.chkSpatialIndex.setEnabled(allowSpatial and hasGeomType)
100+
if not self.chkSpatialIndex.isEnabled(): self.chkSpatialIndex.setChecked(False)
99101

100102
def populateLayers(self):
101103
self.cboInputLayer.clear()
@@ -139,10 +141,10 @@ def inputPathChanged(self, path):
139141
self.cboInputLayer.setEditText(path)
140142
self.cboInputLayer.blockSignals(False)
141143

142-
def updateInputLayer(self):
144+
def reloadInputLayer(self):
143145
""" create the input layer and update available options """
144146
if self.mode != self.ASK_FOR_INPUT_MODE:
145-
return
147+
return True
146148

147149
self.deleteInputLayer()
148150

@@ -166,10 +168,27 @@ def updateInputLayer(self):
166168
self.inLayer = iface.legendInterface().layers()[legendIndex]
167169
self.inLayerMustBeDestroyed = False
168170

169-
# update the output table name
171+
self.checkSupports()
172+
return True
173+
174+
def updateInputLayer(self):
175+
if not self.reloadInputLayer() or not self.inLayer:
176+
return False
177+
178+
# update the output table name, pk and geom column
170179
self.cboTable.setEditText(self.inLayer.name())
171180

172-
self.checkSupports()
181+
srcUri = qgis.core.QgsDataSourceURI(self.inLayer.source())
182+
pk = srcUri.keyColumn() if srcUri.keyColumn() else self.default_pk
183+
self.editPrimaryKey.setText(pk)
184+
geom = srcUri.geometryColumn() if srcUri.geometryColumn() else self.default_geom
185+
self.editGeomColumn.setText(geom)
186+
187+
srcCrs = self.inLayer.crs()
188+
srid = srcCrs.postgisSrid() if srcCrs.isValid() else 4326
189+
self.editSourceSrid.setText("%s" % srid)
190+
self.editTargetSrid.setText("%s" % srid)
191+
173192
return True
174193

175194
def populateSchemas(self):
@@ -221,13 +240,9 @@ def populateEncodings(self):
221240
def accept(self):
222241
if self.mode == self.ASK_FOR_INPUT_MODE:
223242
# create the input layer (if not already done) and
224-
# update available options w/o changing the tablename!
225-
self.cboTable.blockSignals(True)
226-
table = self.cboTable.currentText()
227-
self.updateInputLayer()
228-
self.cboTable.setEditText(table)
229-
self.cboTable.blockSignals(False)
230-
243+
# update available options
244+
self.reloadInputLayer()
245+
231246
# sanity checks
232247
if self.inLayer is None:
233248
QMessageBox.information(self, self.tr("Import to database"), self.tr("Input layer missing or not valid"))
@@ -265,11 +280,14 @@ def accept(self):
265280

266281
# get pk and geom field names from the source layer or use the
267282
# ones defined by the user
268-
pk = self.outUri.keyColumn() if not self.chkPrimaryKey.isChecked() else self.editPrimaryKey.text()
283+
srcUri = qgis.core.QgsDataSourceURI(self.inLayer.source())
284+
285+
pk = srcUri.keyColumn() if not self.chkPrimaryKey.isChecked() else self.editPrimaryKey.text()
286+
if not pk: pk = self.default_pk
269287

270288
if self.inLayer.hasGeometryType() and self.chkGeomColumn.isEnabled():
271-
geom = self.outUri.geometryColumn() if not self.chkGeomColumn.isChecked() else self.editGeomColumn.text()
272-
geom = geom if geom != "" else self.default_geom
289+
geom = srcUri.geometryColumn() if not self.chkGeomColumn.isChecked() else self.editGeomColumn.text()
290+
if not geom: geom = self.default_geom
273291
else:
274292
geom = None
275293

python/plugins/processing/algs/otb/maintenance/OTBHelper.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,10 @@ def adapt_list_to_string(c_list):
515515

516516
a_list[1] = "-%s" % a_list[1]
517517

518-
def myunicode(par):
519-
if isinstance(par, list):
520-
return ";".join(par)
521-
return unicode(par)
522-
523518
if a_list[-1] is None:
524519
return ""
525520

526-
b_list = map(mystr, a_list)
521+
b_list = map(lambda x: ";".join(x) if isinstance(x, list) else unicode(x), a_list)
527522
b_list = [b_list[1], b_list[-1]]
528523
res = " ".join(b_list)
529524
return res

resources/function_help/General

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h3>General</h3>
2+
This group contains general assorted functions.
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<h3>layer_property function</h3>
2+
Returns a matching layer property or metadata value.
3+
4+
<h4>Syntax</h4>
5+
<pre>layer_property(layer,property)</pre>
6+
7+
<h4>Arguments</h4>
8+
layer &rarr; a string, representing either a layer name or layer ID<br />
9+
property &rarr; a string corresponding to the property to return. Valid options are:<br />
10+
<ul>
11+
<li>name: layer name</li>
12+
<li>id: layer ID</li>
13+
<li>title: metadata title string</li>
14+
<li>abstract: metadata abstract string</li>
15+
<li>keywords: metadata keywords</li>
16+
<li>data_url: metadata URL</li>
17+
<li>attribution: metadata attribution string</li>
18+
<li>attribution_url: metadata attribution URL</li>
19+
<li>source: layer source</li>
20+
<li>min_scale: minimum display scale for layer</li>
21+
<li>max_scale: maximum display scale for layer</li>
22+
<li>crs: layer CRS</li>
23+
<li>crs_definition: layer CRS full definition</li>
24+
<li>extent: layer extent (as a geometry object)</li>
25+
<li>type: layer type, eg Vector or Raster</li>
26+
<li>storage_type: storage format (vector layers only)</li>
27+
<li>geometry_type: geometry type, eg Point (vector layers only)</li>
28+
<li>feature_count: approximate feature count for layer (vector layers only)</li>
29+
</ul>
30+
<h4>Example</h4>
31+
<pre> layer_property('streets','title') &rarr; 'Basemap Streets'</pre><br />
32+
<pre> layer_property('airports','feature_count') &rarr; 120</pre><br />
33+
<pre> layer_property('landsat','crs') &rarr;'EPSG:4326'</pre>
34+

scripts/spelling.dat

+1
Original file line numberDiff line numberDiff line change
@@ -475,3 +475,4 @@ stoped:stopped
475475
tranform:transform
476476
wich:which
477477
comparaison:comparison
478+
sofware:software

src/app/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ SET(QGIS_APP_SRCS
119119
qgsvectorlayerproperties.cpp
120120
qgsvisibilitypresets.cpp
121121
qgshandlebadlayers.cpp
122+
qgsmaptooladdcircularstring.cpp
123+
qgsmaptoolcircularstringcurvepoint.cpp
124+
qgsmaptoolcircularstringradius.cpp
122125

123126
composer/qgsattributeselectiondialog.cpp
124127
composer/qgscomposer.cpp
@@ -217,6 +220,7 @@ SET (QGIS_APP_MOC_HDRS
217220

218221
qgsmaptooladdfeature.h
219222
qgsmaptoolcapture.h
223+
qgsmaptoolcircularstringradius.h
220224
qgsmaptooladdpart.h
221225
qgsmaptooladdring.h
222226
qgsmaptooledit.h
@@ -245,6 +249,7 @@ SET (QGIS_APP_MOC_HDRS
245249
qgsmaptoolsimplify.h
246250
qgsmaptoolsplitfeatures.h
247251
qgsmaptoolsplitparts.h
252+
qgsmaptooladdcircularstring.h
248253

249254
nodetool/qgsmaptoolnodetool.h
250255
nodetool/qgsselectedfeature.h

0 commit comments

Comments
 (0)