Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'origin'
  • Loading branch information
NathanW2 committed Aug 25, 2015
2 parents 2f60a5f + 039b4fb commit 01d635a
Show file tree
Hide file tree
Showing 120 changed files with 4,544 additions and 2,842 deletions.
3 changes: 2 additions & 1 deletion debian/changelog
Expand Up @@ -2,8 +2,9 @@ qgis (2.11.0) UNRELEASED; urgency=medium

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

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

qgis (2.10.0) unstable; urgency=medium

Expand Down
8 changes: 4 additions & 4 deletions debian/control.in
Expand Up @@ -9,7 +9,7 @@ Build-Depends:
#sid stretch jessie wheezy saucy sid-oracle trusty utopic vivid# debhelper (>= 9),
#precise# debhelper (>= 7),
flex,
grass-dev (<< 7),
grass-dev,
libexpat1-dev,
libfcgi-dev,
#sid stretch jessie sid-oracle trusty utopic vivid# libgdal-dev (>= 1.10.1-0~),
Expand All @@ -23,8 +23,8 @@ Build-Depends:
libqt4-dev (>= 4.7.0),
libqt4-opengl-dev,
libqtwebkit-dev,
#sid stretch jessie wheezy sid-oracle# libqwt-dev,
#precise saucy trusty utopic vivid# libqwt5-qt4-dev,
#stretch jessie wheezy sid-oracle# libqwt-dev,
#precise saucy trusty utopic vivid sid# libqwt5-qt4-dev,
libspatialite-dev,
libsqlite3-dev,
libspatialindex-dev,
Expand Down Expand Up @@ -273,7 +273,7 @@ Depends:
qgis-plugin-grass-common (= ${source:Version}),
${shlibs:Depends},
${misc:Depends},
#!precise# grass-core (<< 7)
#!precise# grass-core
#precise# grass (<< 7)
Description: GRASS plugin for QGIS
QGIS is a Geographic Information System (GIS) which manages, analyzes and
Expand Down
14 changes: 12 additions & 2 deletions debian/rules
Expand Up @@ -47,13 +47,11 @@ CMAKE_OPTS := \
-DBUILDNAME=$(DEB_BUILD_NAME) \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGRASS_PREFIX=/usr/lib/$(GRASS) \
-DBINDINGS_GLOBAL_INSTALL=TRUE \
-DPEDANTIC=TRUE \
-DWITH_QSPATIALITE=TRUE \
-DWITH_SERVER=TRUE \
-DWITH_SERVER_PLUGINS=TRUE \
-DWITH_GRASS7=FALSE \
-DSERVER_SKIP_ECW=TRUE \
-DQGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \
-DWITH_APIDOC=TRUE \
Expand Down Expand Up @@ -107,6 +105,18 @@ else
CMAKE_OPTS += -DENABLE_TESTS=TRUE
endif

ifeq ($(GRASSVER),7)
CMAKE_OPTS += \
-DWITH_GRASS=FALSE \
-DWITH_GRASS7=TRUE \
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
else
CMAKE_OPTS += \
-DWITH_GRASS=TRUE \
-DWITH_GRASS7=FALSE \
-DGRASS_PREFIX=/usr/lib/$(GRASS)
endif

ifneq (,$(findstring $(DISTRIBUTION),"wheezy jessie stretch trusty sid sid-oracle"))
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
Expand Down
2 changes: 2 additions & 0 deletions images/images.qrc
Expand Up @@ -508,6 +508,8 @@
<file>themes/default/mIconClear.png</file>
<file>flags/zh.png</file>
<file>themes/default/mIconPaintEffects.svg</file>
<file>themes/default/mActionCircularStringCurvePoint.png</file>
<file>themes/default/mActionCircularStringRadius.png</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -364,6 +364,7 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
--exclude "apps/%PACKAGENAME%/python/qgis/server" ^
"bin/%PACKAGENAME%-browser-bin.exe" ^
"bin/%PACKAGENAME%-bin.exe" ^
"bin/python-%PACKAGENAME%.bat.tmpl" ^
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
"apps/%PACKAGENAME%/i18n/" ^
"apps/%PACKAGENAME%/icons/" ^
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsabstractgeometryv2.sip
Expand Up @@ -90,7 +90,7 @@ class QgsAbstractGeometryV2
virtual QgsRectangle calculateBoundingBox() const;

//render pipeline
virtual void transform( const QgsCoordinateTransform& ct ) = 0;
virtual void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform ) = 0;
virtual void transform( const QTransform& t ) = 0;
//virtual void clip( const QgsRectangle& rect );
virtual void draw( QPainter& p ) const = 0;
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgscircularstringv2.sip
Expand Up @@ -38,7 +38,7 @@ class QgsCircularStringV2: public QgsCurveV2
virtual QgsLineStringV2* curveToLine() const;

void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
void transform( const QTransform& t );
//void clip( const QgsRectangle& rect );
void addToPainterPath( QPainterPath& path ) const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgscompoundcurvev2.sip
Expand Up @@ -45,7 +45,7 @@ class QgsCompoundCurveV2: public QgsCurveV2
void close();

void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
void transform( const QTransform& t );
void addToPainterPath( QPainterPath& path ) const;
void drawAsPolygon( QPainter& p ) const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgscurvepolygonv2.sip
Expand Up @@ -49,7 +49,7 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
bool removeInteriorRing( int nr );

virtual void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
void transform( const QTransform& t );

virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsgeometrycollectionv2.sip
Expand Up @@ -23,7 +23,7 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
virtual bool addGeometry( QgsAbstractGeometryV2* g /Transfer/ );
virtual bool removeGeometry( int nr );

virtual void transform( const QgsCoordinateTransform& ct );
virtual void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
void transform( const QTransform& t );
//virtual void clip( const QgsRectangle& rect );
virtual void draw( QPainter& p ) const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgslinestringv2.sip
Expand Up @@ -38,7 +38,7 @@ class QgsLineStringV2: public QgsCurveV2
void append( const QgsLineStringV2* line );

void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
void transform( const QTransform& t );

void addToPainterPath( QPainterPath& path ) const;
Expand Down
7 changes: 4 additions & 3 deletions python/plugins/db_manager/db_plugins/data_model.py
Expand Up @@ -211,9 +211,8 @@ def headerData(self, section, orientation, role):

def flags(self, index):
flags = SimpleTableModel.flags(self, index)
if index.column() == 2: # set Null column as checkable
flags &= ~Qt.ItemIsEditable
flags |= Qt.ItemIsUserCheckable
if index.column() == 2 and flags & Qt.ItemIsEditable: # set Null column as checkable instead of editable
flags = flags & ~Qt.ItemIsEditable | Qt.ItemIsUserCheckable
return flags

def append(self, fld):
Expand All @@ -222,6 +221,8 @@ def append(self, fld):
row = self.rowCount() - 1
self.setData(self.index(row, 0), fld, Qt.UserRole)
self.setData(self.index(row, 1), fld.primaryKey, Qt.UserRole)
self.setData(self.index(row, 2), None, Qt.DisplayRole)
self.setData(self.index(row, 2), Qt.Unchecked if fld.notNull else Qt.Checked, Qt.CheckStateRole)

def _getNewObject(self):
from .plugin import TableField
Expand Down
68 changes: 43 additions & 25 deletions python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -71,31 +71,33 @@ def setupWorkingMode(self, mode):
QObject.connect(self.cboInputLayer, SIGNAL("editTextChanged(const QString &)"), self.inputPathChanged)
#QObject.connect( self.cboInputLayer, SIGNAL("currentIndexChanged(int)"), self.updateInputLayer )
QObject.connect(self.btnUpdateInputLayer, SIGNAL("clicked()"), self.updateInputLayer)

self.editPrimaryKey.setText(self.default_pk)
self.editGeomColumn.setText(self.default_geom)
else:
# set default values
pk = self.outUri.keyColumn()
self.editPrimaryKey.setText(pk if pk != "" else self.default_pk)
if self.inLayer.hasGeometryType():
geom = self.outUri.geometryColumn()
self.editGeomColumn.setText(geom if geom != "" else self.default_geom)

inCrs = self.inLayer.crs()
srid = inCrs.postgisSrid() if inCrs.isValid() else 4236
self.editSourceSrid.setText("%s" % srid)
self.editTargetSrid.setText("%s" % srid)

self.checkSupports()
self.updateInputLayer()

def checkSupports(self):
""" update options available for the current input layer """
allowSpatial = self.db.connector.hasSpatialSupport()
hasGeomType = self.inLayer and self.inLayer.hasGeometryType()
isShapefile = self.inLayer and self.inLayer.providerType() == "ogr" and self.inLayer.storageType() == "ESRI Shapefile"

self.chkGeomColumn.setEnabled(allowSpatial and hasGeomType)
if not self.chkGeomColumn.isEnabled(): self.chkGeomColumn.setChecked(False)

self.chkSourceSrid.setEnabled(allowSpatial and hasGeomType)
if not self.chkSourceSrid.isEnabled(): self.chkSourceSrid.setChecked(False)
self.chkTargetSrid.setEnabled(allowSpatial and hasGeomType)
if not self.chkTargetSrid.isEnabled(): self.chkTargetSrid.setChecked(False)

self.chkSinglePart.setEnabled(allowSpatial and hasGeomType and isShapefile)
if not self.chkSinglePart.isEnabled(): self.chkSinglePart.setChecked(False)

self.chkSpatialIndex.setEnabled(allowSpatial and hasGeomType)
if not self.chkSpatialIndex.isEnabled(): self.chkSpatialIndex.setChecked(False)

def populateLayers(self):
self.cboInputLayer.clear()
Expand Down Expand Up @@ -139,10 +141,10 @@ def inputPathChanged(self, path):
self.cboInputLayer.setEditText(path)
self.cboInputLayer.blockSignals(False)

def updateInputLayer(self):
def reloadInputLayer(self):
""" create the input layer and update available options """
if self.mode != self.ASK_FOR_INPUT_MODE:
return
return True

self.deleteInputLayer()

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

# update the output table name
self.checkSupports()
return True

def updateInputLayer(self):
if not self.reloadInputLayer() or not self.inLayer:
return False

# update the output table name, pk and geom column
self.cboTable.setEditText(self.inLayer.name())

self.checkSupports()
srcUri = qgis.core.QgsDataSourceURI(self.inLayer.source())
pk = srcUri.keyColumn() if srcUri.keyColumn() else self.default_pk
self.editPrimaryKey.setText(pk)
geom = srcUri.geometryColumn() if srcUri.geometryColumn() else self.default_geom
self.editGeomColumn.setText(geom)

srcCrs = self.inLayer.crs()
srid = srcCrs.postgisSrid() if srcCrs.isValid() else 4326
self.editSourceSrid.setText("%s" % srid)
self.editTargetSrid.setText("%s" % srid)

return True

def populateSchemas(self):
Expand Down Expand Up @@ -221,13 +240,9 @@ def populateEncodings(self):
def accept(self):
if self.mode == self.ASK_FOR_INPUT_MODE:
# create the input layer (if not already done) and
# update available options w/o changing the tablename!
self.cboTable.blockSignals(True)
table = self.cboTable.currentText()
self.updateInputLayer()
self.cboTable.setEditText(table)
self.cboTable.blockSignals(False)

# update available options
self.reloadInputLayer()

# sanity checks
if self.inLayer is None:
QMessageBox.information(self, self.tr("Import to database"), self.tr("Input layer missing or not valid"))
Expand Down Expand Up @@ -265,11 +280,14 @@ def accept(self):

# get pk and geom field names from the source layer or use the
# ones defined by the user
pk = self.outUri.keyColumn() if not self.chkPrimaryKey.isChecked() else self.editPrimaryKey.text()
srcUri = qgis.core.QgsDataSourceURI(self.inLayer.source())

pk = srcUri.keyColumn() if not self.chkPrimaryKey.isChecked() else self.editPrimaryKey.text()
if not pk: pk = self.default_pk

if self.inLayer.hasGeometryType() and self.chkGeomColumn.isEnabled():
geom = self.outUri.geometryColumn() if not self.chkGeomColumn.isChecked() else self.editGeomColumn.text()
geom = geom if geom != "" else self.default_geom
geom = srcUri.geometryColumn() if not self.chkGeomColumn.isChecked() else self.editGeomColumn.text()
if not geom: geom = self.default_geom
else:
geom = None

Expand Down
7 changes: 1 addition & 6 deletions python/plugins/processing/algs/otb/maintenance/OTBHelper.py
Expand Up @@ -515,15 +515,10 @@ def adapt_list_to_string(c_list):

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

def myunicode(par):
if isinstance(par, list):
return ";".join(par)
return unicode(par)

if a_list[-1] is None:
return ""

b_list = map(mystr, a_list)
b_list = map(lambda x: ";".join(x) if isinstance(x, list) else unicode(x), a_list)
b_list = [b_list[1], b_list[-1]]
res = " ".join(b_list)
return res
Expand Down
2 changes: 2 additions & 0 deletions resources/function_help/General
@@ -0,0 +1,2 @@
<h3>General</h3>
This group contains general assorted functions.
34 changes: 34 additions & 0 deletions resources/function_help/layer_property
@@ -0,0 +1,34 @@
<h3>layer_property function</h3>
Returns a matching layer property or metadata value.

<h4>Syntax</h4>
<pre>layer_property(layer,property)</pre>

<h4>Arguments</h4>
layer &rarr; a string, representing either a layer name or layer ID<br />
property &rarr; a string corresponding to the property to return. Valid options are:<br />
<ul>
<li>name: layer name</li>
<li>id: layer ID</li>
<li>title: metadata title string</li>
<li>abstract: metadata abstract string</li>
<li>keywords: metadata keywords</li>
<li>data_url: metadata URL</li>
<li>attribution: metadata attribution string</li>
<li>attribution_url: metadata attribution URL</li>
<li>source: layer source</li>
<li>min_scale: minimum display scale for layer</li>
<li>max_scale: maximum display scale for layer</li>
<li>crs: layer CRS</li>
<li>crs_definition: layer CRS full definition</li>
<li>extent: layer extent (as a geometry object)</li>
<li>type: layer type, eg Vector or Raster</li>
<li>storage_type: storage format (vector layers only)</li>
<li>geometry_type: geometry type, eg Point (vector layers only)</li>
<li>feature_count: approximate feature count for layer (vector layers only)</li>
</ul>
<h4>Example</h4>
<pre> layer_property('streets','title') &rarr; 'Basemap Streets'</pre><br />
<pre> layer_property('airports','feature_count') &rarr; 120</pre><br />
<pre> layer_property('landsat','crs') &rarr;'EPSG:4326'</pre>

1 change: 1 addition & 0 deletions scripts/spelling.dat
Expand Up @@ -475,3 +475,4 @@ stoped:stopped
tranform:transform
wich:which
comparaison:comparison
sofware:software
5 changes: 5 additions & 0 deletions src/app/CMakeLists.txt
Expand Up @@ -119,6 +119,9 @@ SET(QGIS_APP_SRCS
qgsvectorlayerproperties.cpp
qgsvisibilitypresets.cpp
qgshandlebadlayers.cpp
qgsmaptooladdcircularstring.cpp
qgsmaptoolcircularstringcurvepoint.cpp
qgsmaptoolcircularstringradius.cpp

composer/qgsattributeselectiondialog.cpp
composer/qgscomposer.cpp
Expand Down Expand Up @@ -217,6 +220,7 @@ SET (QGIS_APP_MOC_HDRS

qgsmaptooladdfeature.h
qgsmaptoolcapture.h
qgsmaptoolcircularstringradius.h
qgsmaptooladdpart.h
qgsmaptooladdring.h
qgsmaptooledit.h
Expand Down Expand Up @@ -245,6 +249,7 @@ SET (QGIS_APP_MOC_HDRS
qgsmaptoolsimplify.h
qgsmaptoolsplitfeatures.h
qgsmaptoolsplitparts.h
qgsmaptooladdcircularstring.h

nodetool/qgsmaptoolnodetool.h
nodetool/qgsselectedfeature.h
Expand Down

0 comments on commit 01d635a

Please sign in to comment.