Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/qgis/Quantum-GIS
  • Loading branch information
volaya committed Jan 4, 2013
2 parents a785fd5 + 522bbcd commit e59de66
Show file tree
Hide file tree
Showing 24 changed files with 82 additions and 77 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -161,7 +161,7 @@ ENDIF(NOT WIN32 AND NOT ANDROID)
FIND_PACKAGE(Proj)
FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)
FIND_PACKAGE(Expat)
FIND_PACKAGE(Expat REQUIRED)
FIND_PACKAGE(Spatialindex REQUIRED)
FIND_PACKAGE(Qwt REQUIRED)

Expand Down
26 changes: 14 additions & 12 deletions INSTALL
@@ -1,10 +1,10 @@
Quantum GIS (QGIS)
Building QGIS from source - step by step
Tuesday October 23, 2012
Friday January 04, 2013


Last Updated: Tuesday October 23, 2012
Last Change : Tuesday October 23, 2012
Last Updated: Friday January 04, 2013
Last Change : Friday January 04, 2013


1. Introduction
Expand Down Expand Up @@ -104,13 +104,14 @@ Required build deps:
- Sqlite3 >= 3.0.0
- GDAL/OGR >= 1.4.x
- Qwt >= 5.0
- expat >= 1.95

Optional dependencies:

- for GRASS plugin - GRASS >= 6.0.0 (libraries compiled with exceptions support on Linux 32bit)
- for georeferencer - GSL >= 1.8
- for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
- for gps plugin - expat >= 1.95 and gpsbabel
- for gps plugin - gpsbabel
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
- for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2
- for qgis mapserver - FastCGI
Expand Down Expand Up @@ -539,7 +540,7 @@ To run QGIS just use this command
==========================================

This section describes how to build QGIS using Visual Studio on Windows. This
is currently also who the binary QGIS packages are made (earlier versions used
is currently also how the binary QGIS packages are made (earlier versions used
MinGW).

This section describes the setup required to allow Visual Studio to be used to
Expand Down Expand Up @@ -608,7 +609,9 @@ Earlier versions of this document also covered how to build all above
dependencies. If you're interested in that, check the history of this page in the Wiki
or the SVN repository.

=== Setting up the Visual Studio project with CMake ===

4.1.3. Setting up the Visual Studio project with CMake
======================================================

To start a command prompt with an environment that both has the VC++ and the OSGeo4W
variables create the following batch file (assuming the above packages were
Expand All @@ -633,7 +636,6 @@ installed in the default locations):

@cmd


Start the batch file and on the command prompt checkout the QGIS source from
git to the source directory Quantum-GIS:

Expand All @@ -642,8 +644,8 @@ git to the source directory Quantum-GIS:
Create a 'build' directory somewhere. This will be where all the build output
will be generated.

Now run cmake-gui and in the Where is the source code: box, browse to
the top level QGIS directory.
Now run cmake-gui (still from cmd) and in the Where is the source code:
box, browse to the top level QGIS directory.

In the Where to build the binaries: box, browse to the 'build' directory you
created.
Expand Down Expand Up @@ -678,7 +680,7 @@ You will also either need to add all the dependency DLLs to the QGIS install
directory or add their respective directories to your PATH.


4.1.3. Packaging
4.1.4. Packaging
================

To create a standalone installer there is a perl script named 'creatensis.pl'
Expand All @@ -699,7 +701,7 @@ and 'bzip2') is available at:
http://cygwin.com


4.1.4. Packaging your own build of QGIS
4.1.5. Packaging your own build of QGIS
=======================================

Assuming you have completed the above packaging step, if you want to include
Expand All @@ -719,7 +721,7 @@ After this you should now have a nsis installer containing your own build
of QGIS and all dependencies needed to run it on a windows machine.


4.1.5. Osgeo4w packaging
4.1.6. Osgeo4w packaging
========================

The actual packaging process is currently not documented, for now please take a
Expand Down
49 changes: 28 additions & 21 deletions doc/INSTALL.html
Expand Up @@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Quantum GIS (QGIS)</TITLE>

<!-- Included style.css -->
<!-- Included /home/fischer/src/qgis/doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
Expand Down Expand Up @@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>Quantum GIS (QGIS)</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Tuesday October 23, 2012</H3>
<H3>Friday January 04, 2013</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Tuesday October 23, 2012
Last Change : Tuesday October 23, 2012
Last Updated: Friday January 04, 2013
Last Change : Friday January 04, 2013
</P>
<DIV CLASS="toc">

Expand Down Expand Up @@ -211,6 +211,7 @@ <H1>2. Overview</H1>
<LI>Sqlite3 &gt;= 3.0.0
<LI>GDAL/OGR &gt;= 1.4.x
<LI>Qwt &gt;= 5.0
<LI>expat &gt;= 1.95
</UL>

<P>
Expand All @@ -221,7 +222,7 @@ <H1>2. Overview</H1>
<LI>for GRASS plugin - GRASS &gt;= 6.0.0 (libraries compiled with exceptions support on Linux 32bit)
<LI>for georeferencer - GSL &gt;= 1.8
<LI>for postgis support and SPIT plugin - PostgreSQL &gt;= 8.0.x
<LI>for gps plugin - expat &gt;= 1.95 and gpsbabel
<LI>for gps plugin - gpsbabel
<LI>for mapserver export and PyQGIS - Python &gt;= 2.3 (2.5+ preferred)
<LI>for python support - SIP &gt;= 4.8, PyQt &gt;= must match Qt version, Qscintilla2
<LI>for qgis mapserver - FastCGI
Expand Down Expand Up @@ -861,7 +862,7 @@ <H2>4.1. Building with Microsoft Visual Studio</H2>

<P>
This section describes how to build QGIS using Visual Studio on Windows. This
is currently also who the binary QGIS packages are made (earlier versions used
is currently also how the binary QGIS packages are made (earlier versions used
MinGW).
</P>
<P>
Expand Down Expand Up @@ -952,24 +953,30 @@ <H3>4.1.2. Other tools and dependencies</H3>
<LI>spatialite
<LI>libspatialindex-devel
<LI>python-qscintilla
<P></P>
</UL>

<P>
This will also select packages the above packages depend on.
<P></P>
</P>
<P>
Additionally QGIS also needs the include file <CODE>unistd.h</CODE>, which normally
doesn't exist on Windows. It's shipped with Flex/Bison in <CODE>GnuWin32\include</CODE>
and needs to be copied into the <CODE>VC\include</CODE> directory of your Visual C++
installation.
<P></P>
</P>
<P>
Earlier versions of this document also covered how to build all above
dependencies. If you're interested in that, check the history of this page in the Wiki
or the SVN repository.
<P></P>
=== Setting up the Visual Studio project with CMake ===
<P></P>
</P>

<H3>4.1.3. Setting up the Visual Studio project with CMake</H3>

<P>
To start a command prompt with an environment that both has the VC++ and the OSGeo4W
variables create the following batch file (assuming the above packages were
installed in the default locations):
<P></P>
</P>

<div class="code"><PRE>
@echo off
Expand All @@ -992,10 +999,10 @@ <H3>4.1.2. Other tools and dependencies</H3>
@cmd
</PRE></div>

<P></P>
<P>
Start the batch file and on the command prompt checkout the QGIS source from
git to the source directory <CODE>Quantum-GIS</CODE>:
</UL>
</P>

<div class="code"><PRE>
git clone git://github.com/qgis/Quantum-GIS.git
Expand All @@ -1006,8 +1013,8 @@ <H3>4.1.2. Other tools and dependencies</H3>
will be generated.
</P>
<P>
Now run <CODE>cmake-gui</CODE> and in the <I>Where is the source code:</I> box, browse to
the top level QGIS directory.
Now run <CODE>cmake-gui</CODE> (still from <CODE>cmd</CODE>) and in the <I>Where is the source code:</I>
box, browse to the top level QGIS directory.
</P>
<P>
In the <I>Where to build the binaries:</I> box, browse to the 'build' directory you
Expand Down Expand Up @@ -1052,7 +1059,7 @@ <H3>4.1.2. Other tools and dependencies</H3>
directory or add their respective directories to your PATH.
</P>

<H3>4.1.3. Packaging</H3>
<H3>4.1.4. Packaging</H3>

<P>
To create a standalone installer there is a perl script named 'creatensis.pl'
Expand All @@ -1079,7 +1086,7 @@ <H3>4.1.3. Packaging</H3>
<A HREF="http://cygwin.com">http://cygwin.com</A>
</BLOCKQUOTE>

<H3>4.1.4. Packaging your own build of QGIS</H3>
<H3>4.1.5. Packaging your own build of QGIS</H3>

<P>
Assuming you have completed the above packaging step, if you want to include
Expand Down Expand Up @@ -1107,7 +1114,7 @@ <H3>4.1.4. Packaging your own build of QGIS</H3>
of QGIS and all dependencies needed to run it on a windows machine.
</P>

<H3>4.1.5. Osgeo4w packaging</H3>
<H3>4.1.6. Osgeo4w packaging</H3>

<P>
The actual packaging process is currently not documented, for now please take a
Expand Down Expand Up @@ -3157,5 +3164,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
<!-- cmdline: txt2tags -odoc/INSTALL.html -t html doc/INSTALL.t2t -->
</BODY></HTML>
3 changes: 2 additions & 1 deletion doc/overview.t2t
Expand Up @@ -21,14 +21,15 @@ Required build deps:
- Sqlite3 >= 3.0.0
- GDAL/OGR >= 1.4.x
- Qwt >= 5.0
- expat >= 1.95
-

Optional dependencies:

- for GRASS plugin - GRASS >= 6.0.0 (libraries compiled with exceptions support on Linux 32bit)
- for georeferencer - GSL >= 1.8
- for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
- for gps plugin - expat >= 1.95 and gpsbabel
- for gps plugin - gpsbabel
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
- for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2
- for qgis mapserver - FastCGI
Expand Down
9 changes: 4 additions & 5 deletions python/plugins/GdalTools/tools/dialogSRS.py
Expand Up @@ -44,18 +44,17 @@ def __init__(self, title, parent=None):
self.connect(buttonBox, SIGNAL("accepted()"), self.accept)
self.connect(buttonBox, SIGNAL("rejected()"), self.reject)

def epsg(self):
return "EPSG:" + str(self.selector.selectedEpsg())
def authid(self):
return str(self.selector.selectedAuthId()

def proj4string(self):
return self.selector.selectedProj4String()

def getProjection(self):
if self.selector.selectedEpsg() != 0:
return self.epsg()
if self.authid().startsWith("EPSG:", Qt.CaseInsensitive):
return self.authid()

if not self.selector.selectedProj4String().isEmpty():
return self.proj4string()

return QString()

4 changes: 2 additions & 2 deletions python/plugins/db_manager/layer_preview.py
Expand Up @@ -105,14 +105,14 @@ def _loadTablePreview(self, table, limit=False):
if not vl.isValid():
self.setLayerSet( [] )
else:
newLayerId = vl.id() if hasattr(vl, 'id') else vl.getLayerID()
newLayerId = vl.id() if hasattr(vl, 'id') else vl.id()
self.setLayerSet( [ QgsMapCanvasLayer(vl) ] )
QgsMapLayerRegistry.instance().addMapLayers([vl], False)
self.zoomToFullExtent()

# remove old layer (if any) and set new
if self.currentLayerId:
QgsMapLayerRegistry.instance().removeMapLayer(self.currentLayerId, False)
QgsMapLayerRegistry.instance().removeMapLayers([self.currentLayerId], False)
self.currentLayerId = newLayerId

self.setRenderFlag(True)
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/fTools/tools/doGeometry.py
Expand Up @@ -992,7 +992,7 @@ def simpleMeasure( self, inGeom, calcType, ellips, crs ):
if calcType == 2:
measure.setSourceCrs( crs )
measure.setEllipsoid( ellips )
measure.setProjectionsEnabled( True )
measure.setEllipsoidalMode( True )

attr1 = measure.measure( inGeom )
if inGeom.type() == QGis.Polygon:
Expand Down Expand Up @@ -1174,6 +1174,7 @@ def findOrCreateFields( self, vlayer ):
else:
index2 = len( fieldKeys ) + 1
newFields.append( field )
# FIXME: addAttributes was deprecated and removed
vprovider.addAttributes( newFields )
vlayer.updateFieldMap()
return ( index1, index2 )
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doRandPoints.py
Expand Up @@ -128,7 +128,7 @@ def accept(self):
self.tr("Created output point shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg(outPath), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
if addToTOC == QMessageBox.Yes:
self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
QgsMapLayerRegistry.instance().addMapLayer([self.vlayer])
QgsMapLayerRegistry.instance().addMapLayers([self.vlayer])
self.populateLayers()
self.progressBar.setValue(0)
self.buttonOk.setEnabled( True )
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doRegPoints.py
Expand Up @@ -92,7 +92,7 @@ def accept(self):
addToTOC = QMessageBox.question(self, self.tr("Generate Regular Points"), self.tr("Created output point shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg( outPath ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
if addToTOC == QMessageBox.Yes:
self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
QgsMapLayerRegistry.instance().addMapLayer([self.vlayer])
QgsMapLayerRegistry.instance().addMapLayers([self.vlayer])
self.populateLayers()
self.progressBar.setValue(0)
self.buttonOk.setEnabled( True )
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSpatialJoin.py
Expand Up @@ -109,7 +109,7 @@ def accept(self):
.arg(unicode(outPath)), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
if addToTOC == QMessageBox.Yes:
self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
QgsMapLayerRegistry.instance().addMapLayer([self.vlayer])
QgsMapLayerRegistry.instance().addMapLayers([self.vlayer])
self.progressBar.setValue(0)
self.buttonOk.setEnabled( True )

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/ftools_utils.py
Expand Up @@ -104,7 +104,7 @@ def writeVectorLayerToShape( vlayer, outputPath, encoding ):
if not mCodec:
return False
#Here we should check that the output path is valid
QgsVectorFileWriter.writeAsShapefile( vlayer, outputPath, encoding, vlayer.dataProvider().crs(), False )
QgsVectorFileWriter.writeAsVectorFormat( vlayer, outputPath, encoding, vlayer.dataProvider().crs(), "ESRI Shapefile", False )
return True

# For use with memory provider/layer, converts QGis vector type definition to simple string
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/osm/OsmLoadDlg.py
Expand Up @@ -156,7 +156,7 @@ def onOK(self):

if replacing:
# remove layers of current data first
QgsMapLayerRegistry.instance().removeMapLayer(self.canvas.currentLayer().id(),True)
QgsMapLayerRegistry.instance().removeMapLayers([self.canvas.currentLayer().id()],True)

if self.chkCustomRenderer.isChecked():
styleFile=self.styleFiles[self.styleCombo.currentIndex()]
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/ExportGeometryInfo.py
Expand Up @@ -148,7 +148,7 @@ def simpleMeasure(self, geom, method, ellips, crs):
if method == 2:
measure.setSourceCrs(crs)
measure.setEllipsoid(ellips)
measure.setProjectionsEnabled(True)
measure.setEllipsoidalMode(True)

attr1 = measure.measure(geom)
if geom.type() == QGis.Polygon:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/ftools_utils.py
Expand Up @@ -97,7 +97,7 @@ def writeVectorLayerToShape( vlayer, outputPath, encoding ):
if not mCodec:
return False
#Here we should check that the output path is valid
QgsVectorFileWriter.writeAsShapefile( vlayer, outputPath, encoding, vlayer.dataProvider().crs(), False )
QgsVectorFileWriter.writeAsVectorFormat( vlayer, outputPath, encoding, vlayer.dataProvider().crs(), "ESRI Shapefile", False )
return True

# For use with memory provider/layer, converts QGis vector type definition to simple string
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/mmqgisx/mmqgisx_library.py
Expand Up @@ -1387,7 +1387,7 @@ def mmqgisx_hub_distance(progress, sourcelayer, hubslayer, nameattributename, un
source = feature.geometry().boundingBox().center()
distance = QgsDistanceArea()
distance.setSourceCrs(sourcelayer.dataProvider().crs().srsid())
distance.setProjectionsEnabled(1)
distance.setEllipsoidalMode(True)

closest = hubs[0]
hubdist = distance.measureLine(source, closest.point)
Expand Down

0 comments on commit e59de66

Please sign in to comment.