Skip to content
Permalink
Browse files

Merge pull request #3773 from alexbruy/network-analysis

Network analysis
  • Loading branch information
nyalldawson committed Nov 21, 2016
2 parents 8c8be00 + 82082b4 commit 3dcf03cf5475cf3ef675ec45cbdb04e0bdd41b7e
Showing with 797 additions and 899 deletions.
  1. +1 −1 cmake/QsciAPI.cmake
  2. +0 −14 debian/control
  3. +0 −14 debian/control.in
  4. +0 −1 debian/libqgis-dev.install.in
  5. +0 −1 debian/libqgis-networkanalysis{QGIS_ABI}.install
  6. +0 −1 debian/libqgis-networkanalysis{QGIS_ABI}.lintian-overrides
  7. +0 −1 debian/python-qgis.install.in
  8. +16 −1 doc/api_break.dox
  9. +3 −7 doc/modules.dox
  10. +0 −1 ms-windows/osgeo4w/package.cmd
  11. +7 −13 python/CMakeLists.txt
  12. +10 −0 python/analysis/analysis.sip
  13. +0 −15 python/analysis/network/networkanalysis.sip
  14. +0 −45 python/analysis/network/qgsarcproperter.sip
  15. +0 −10 python/analysis/network/qgsdistancearcproperter.sip
  16. +35 −34 python/analysis/network/qgsgraph.sip
  17. +4 −4 python/analysis/network/qgsgraphbuilder.sip
  18. +19 −15 python/analysis/network/{qgsgraphbuilderintr.sip → qgsgraphbuilderinterface.sip}
  19. +15 −18 python/analysis/network/qgsgraphdirector.sip
  20. +0 −41 python/analysis/network/qgslinevectorlayerdirector.sip
  21. +9 −0 python/analysis/network/qgsnetworkdistancestrategy.sip
  22. +13 −0 python/analysis/network/qgsnetworkspeedstrategy.sip
  23. +50 −0 python/analysis/network/qgsnetworkstrategy.sip
  24. +55 −0 python/analysis/network/qgsvectorlayerdirector.sip
  25. +0 −28 python/networkanalysis/__init__.py
  26. +4 −5 rpm/qgis.spec.template
  27. +1 −1 scripts/replacev2.sh
  28. +21 −2 src/analysis/CMakeLists.txt
  29. +0 −98 src/analysis/network/CMakeLists.txt
  30. +0 −19 src/analysis/network/qgsdistancearcproperter.cpp
  31. +37 −33 src/analysis/network/qgsgraph.cpp
  32. +47 −49 src/analysis/network/qgsgraph.h
  33. +22 −26 src/analysis/network/qgsgraphanalyzer.cpp
  34. +31 −33 src/analysis/network/qgsgraphanalyzer.h
  35. +16 −13 src/analysis/network/qgsgraphbuilder.cpp
  36. +10 −12 src/analysis/network/qgsgraphbuilder.h
  37. +22 −23 src/analysis/network/{qgsgraphbuilderintr.h → qgsgraphbuilderinterface.h}
  38. +21 −25 src/analysis/network/qgsgraphdirector.h
  39. +0 −83 src/analysis/network/qgslinevectorlayerdirector.h
  40. +6 −17 src/analysis/network/{qgsdistancearcproperter.h → qgsnetworkdistancestrategy.cpp}
  41. +33 −0 src/analysis/network/qgsnetworkdistancestrategy.h
  42. +44 −0 src/analysis/network/qgsnetworkspeedstrategy.cpp
  43. +52 −0 src/analysis/network/qgsnetworkspeedstrategy.h
  44. +21 −23 src/analysis/network/{qgsarcproperter.h → qgsnetworkstrategy.h}
  45. +46 −45 src/analysis/network/{qgslinevectorlayerdirector.cpp → qgsvectorlayerdirector.cpp}
  46. +88 −0 src/analysis/network/qgsvectorlayerdirector.h
  47. +1 −2 src/plugins/roadgraph/CMakeLists.txt
  48. +9 −23 src/plugins/roadgraph/linevectorlayersettings.cpp
  49. +3 −1 src/plugins/roadgraph/linevectorlayersettings.h
  50. +3 −3 src/plugins/roadgraph/linevectorlayerwidget.cpp
  51. +14 −14 src/plugins/roadgraph/roadgraphplugin.cpp
  52. +8 −8 src/plugins/roadgraph/shortestpathwidget.cpp
  53. +0 −41 src/plugins/roadgraph/speedproperter.cpp
  54. +0 −34 src/plugins/roadgraph/speedproperter.h
  55. +0 −1 tests/src/python/test_qgssipcoverage.py
@@ -22,7 +22,7 @@ ENDIF(EXISTS "${CMAKE_BINARY_DIR}/python/qgis.gui.api")
# add qgis.core.NULL attribute defined in <src>/python/__init__.py for QPyNullVariant
FILE(APPEND "${QGIS_PYTHON_API_FILE}" "qgis.core.NULL?7\n")

FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.networkanalysis.api qgis.server.api)
FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api)
SET(api "${CMAKE_BINARY_DIR}/python/${apiFile}")
IF(EXISTS "${api}")
FILE(READ "${api}" FILE_CONTENT)
@@ -129,18 +129,6 @@ Description: QGIS - shared analysis library
.
This package contains the shared analysis library.

Package: libqgis-networkanalysis2.99.0
Architecture: any
Section: libs
Depends:
${shlibs:Depends},
${misc:Depends}
Description: QGIS - shared network analysis library
QGIS is a Geographic Information System (GIS) which manages, analyzes and
display databases of geographic information.
.
This package contains the shared network analysis library.

Package: libqgisgrass7-2.99.0
Architecture: any
Section: libs
@@ -204,7 +192,6 @@ Depends:
libqgis-core2.99.0 (= ${binary:Version}),
libqgis-gui2.99.0 (= ${binary:Version}),
libqgis-analysis2.99.0 (= ${binary:Version}),
libqgis-networkanalysis2.99.0 (= ${binary:Version}),
libqgisgrass7-2.99.0 (= ${binary:Version}),
libqgispython2.99.0 (= ${binary:Version}),
libsqlite3-dev,
@@ -241,7 +228,6 @@ Depends:
libqgis-core2.99.0 (= ${binary:Version}),
libqgis-gui2.99.0 (= ${binary:Version}),
libqgis-analysis2.99.0 (= ${binary:Version}),
libqgis-networkanalysis2.99.0 (= ${binary:Version}),
libqgisgrass7-2.99.0 (= ${binary:Version}),
libqgispython2.99.0 (= ${binary:Version}),
${misc:Depends}
@@ -132,18 +132,6 @@ Description: QGIS - shared analysis library
.
This package contains the shared analysis library.

Package: libqgis-networkanalysis{QGIS_ABI}
Architecture: any
Section: libs
Depends:
${shlibs:Depends},
${misc:Depends}
Description: QGIS - shared network analysis library
QGIS is a Geographic Information System (GIS) which manages, analyzes and
display databases of geographic information.
.
This package contains the shared network analysis library.

Package: libqgisgrass{GRASSVER}-{QGIS_ABI}
Architecture: any
Section: libs
@@ -207,7 +195,6 @@ Depends:
libqgis-core{QGIS_ABI} (= ${binary:Version}),
libqgis-gui{QGIS_ABI} (= ${binary:Version}),
libqgis-analysis{QGIS_ABI} (= ${binary:Version}),
libqgis-networkanalysis{QGIS_ABI} (= ${binary:Version}),
libqgisgrass{GRASSVER}-{QGIS_ABI} (= ${binary:Version}),
libqgispython{QGIS_ABI} (= ${binary:Version}),
libsqlite3-dev,
@@ -244,7 +231,6 @@ Depends:
libqgis-core{QGIS_ABI} (= ${binary:Version}),
libqgis-gui{QGIS_ABI} (= ${binary:Version}),
libqgis-analysis{QGIS_ABI} (= ${binary:Version}),
libqgis-networkanalysis{QGIS_ABI} (= ${binary:Version}),
libqgisgrass{GRASSVER}-{QGIS_ABI} (= ${binary:Version}),
libqgispython{QGIS_ABI} (= ${binary:Version}),
${misc:Depends}
@@ -3,7 +3,6 @@ usr/lib/libqgis_app.so
usr/lib/libqgis_core.so
usr/lib/libqgis_gui.so
usr/lib/libqgis_analysis.so
usr/lib/libqgis_networkanalysis.so
#server#usr/lib/libqgis_server.so
usr/lib/libqgisgrass{GRASSVER}.so
usr/lib/libqgispython.so

This file was deleted.

This file was deleted.

@@ -3,7 +3,6 @@ usr/lib/python*/*-packages/qgis/*.so
usr/lib/python*/*-packages/qgis/core/*
usr/lib/python*/*-packages/qgis/gui/*
usr/lib/python*/*-packages/qgis/analysis/*
usr/lib/python*/*-packages/qgis/networkanalysis/*
usr/lib/python*/*-packages/qgis/PyQt/*
usr/lib/python*/*-packages/qgis/testing/*
usr/lib/python*/*-packages/pyspatialite/*
@@ -180,6 +180,9 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsVectorRandomColorRampV2Dialog<td>QgsLimitedRandomColorRampDialog
<tr><td>QgsVectorRandomColorRampV2DialogBase<td>QgsLimitedRandomColorRampDialogBase
<tr><th>QgsSymbolV2<th>QgsSymbol
<tr><th>QgsArcProperter<th>QgsStrategy
<tr><th>QgsDistanceArcProperter<th>QgsDistanceStrategy
<tr><th>QgsGraphArc<th>QgsGraphEdge
</table>

<table>
@@ -205,6 +208,17 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsVectorLayerEditUtils<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsComposerSymbolItem<td>symbolV2<td>symbol
<tr><td>QgsServerInterface<td>capabiblitiesCache<td>capabilitiesCache
<tr><td>QgsGraphEdge<td>property<td>cost
<tr><td>QgsGraphEdge<td>properties<td>strategies
<tr><td>QgsGraphVertex<td>outArc<td>outEdges
<tr><td>QgsGraphVertex<td>inArc<td>inEdges
<tr><td>QgsGraph<td>addArc<td>addEdges
<tr><td>QgsGraph<td>arcCount<td>edgeCount
<tr><td>QgsGraph<td>arc<td>edge
<tr><td>QgsGraphBuilder<td>addArc<td>addEdge
<tr><td>QgsGraphBuilderInterface<td>addArc<td>addEdge
<tr><td>QgsGraphDirectory<td>addProperter<td>addStrategy
<tr><td>QgsStrategy<td>addProperter<td>addStrategy
</table>


@@ -251,6 +265,7 @@ General changes {#qgis_api_break_3_0_global}
- All importXML() methods have been renamed to importXml()
- All methods taking or returning QGis::WkbType have been changed to use QgsWkbTypes::Type
- All methods taking or returning QGis::GeometryType have been changed to use QgsWkbTypes::GeometryType
- Network analysis library has been merged into analysis library


Data Providers {#qgis_api_break_3_0_DataProviders}
@@ -768,7 +783,7 @@ QgsEditFormConfig {#qgis_api_break_3_0_QgsEditFormConfig}
- widgetType() and widgetConfig() now reflect only the user configured values.
QgsEditorWidgetRegistry::instance()->findBest() must be used instead.
- widgetType(), widgetConfig(), setWidgetType(), setWidgetConfig() and removeWidgetConfig() now only take a string as first parameter. Access by index has been removed.
- expression(), setExpression(), expressionDescription() and setExpressionDescription()
- expression(), setExpression(), expressionDescription() and setExpressionDescription()
have been removed. Use QgsVectorLayer.setConstraintExpression()/constraintExpression(),
or QgsField.constraintExpression()/QgsField.constraintDescription() instead.
- notNull() and setNotNull() have been removed. Use QgsVectorLayer.setFieldConstraint()/fieldConstraints(), or QgsField.constraints() instead.
@@ -12,14 +12,10 @@ The GUI library is build on top of the CORE library and adds reusable GUI widget

/** @defgroup analysis analysis library

The ANALYSIS library is built on top of CORE library and provides
The ANALYSIS library is built on top of CORE library and provides
high level tools for carrying out spatial analysis on vector and raster data.
*/

/** @defgroup networkanalysis network analysis library

The NETWORK_ANALYSIS library provides high level tools for building network
topologies and analysing them.
It also contains high level tools for building network topologies and analysing
them.
*/

/** @defgroup server server library
@@ -299,7 +299,6 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-common/%PACKAGENAME
--exclude "*.pyc" ^
"apps/%PACKAGENAME%/bin/qgispython.dll" ^
"apps/%PACKAGENAME%/bin/qgis_analysis.dll" ^
"apps/%PACKAGENAME%/bin/qgis_networkanalysis.dll" ^
"apps/%PACKAGENAME%/bin/qgis_core.dll" ^
"apps/%PACKAGENAME%/bin/qgis_gui.dll" ^
"apps/%PACKAGENAME%/doc/" ^
@@ -138,20 +138,20 @@ IF(NOT QT_MOBILITY_LOCATION_FOUND)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} MOBILITY_LOCATION)
ENDIF(NOT QT_MOBILITY_LOCATION_FOUND)

IF(PYQT4_VERSION_NUM LESS 263680) # 0x040600
IF(PYQT4_VERSION_NUM LESS 263680) # 0x040600
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY)
ENDIF(PYQT4_VERSION_NUM LESS 263680)

#
IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802
IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION)
ENDIF(NOT PYQT4_VERSION_NUM LESS 264194)

IF(PYQT4_VERSION_NUM LESS 264196) # 0x040804
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QLISTCONSTPTR_CONVERSION)
ENDIF(PYQT4_VERSION_NUM LESS 264196)

IF(NOT PYQT4_VERSION_NUM LESS 264453) # 0x040905
IF(NOT PYQT4_VERSION_NUM LESS 264453) # 0x040905
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QVECTORINT_CONVERSION)
ENDIF(NOT PYQT4_VERSION_NUM LESS 264453)

@@ -200,7 +200,7 @@ ENDIF(UNIX AND NOT SIP_VERSION_NUM LESS 265984)
GENERATE_SIP_PYTHON_MODULE_CODE(qgis._gui gui/gui.sip cpp_files)
BUILD_SIP_PYTHON_MODULE(qgis._gui gui/gui.sip ${cpp_files} "" qgis_core qgis_gui)

SET(PY_MODULES core gui analysis networkanalysis)
SET(PY_MODULES core gui analysis)

# server module
IF (WITH_SERVER AND WITH_SERVER_PLUGINS)
@@ -228,8 +228,8 @@ INCLUDE_DIRECTORIES(
../src/analysis/interpolation
../src/analysis/openstreetmap
${CMAKE_BINARY_DIR}/src/analysis/vector
${CMAKE_BINARY_DIR}/src/analysis/network
${CMAKE_BINARY_DIR}/src/analysis/raster
${CMAKE_BINARY_DIR}/src/analysis/network
${CMAKE_BINARY_DIR}/src/analysis/interpolation
${CMAKE_BINARY_DIR}/src/analysis/openstreetmap
)
@@ -239,6 +239,7 @@ FILE(GLOB sip_files_analysis
analysis/*.sip
analysis/raster/*.sip
analysis/vector/*.sip
analysis/network/*.sip
analysis/interpolation/*.sip
analysis/openstreetmap/*.sip
)
@@ -247,21 +248,14 @@ SET(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.an
GENERATE_SIP_PYTHON_MODULE_CODE(qgis._analysis analysis/analysis.sip cpp_files)
BUILD_SIP_PYTHON_MODULE(qgis._analysis analysis/analysis.sip ${cpp_files} "" qgis_core qgis_analysis)

# network-analysis module
FILE(GLOB_RECURSE sip_files_network_analysis analysis/network/*.sip)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_network_analysis})
SET(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.networkanalysis.api)
GENERATE_SIP_PYTHON_MODULE_CODE(qgis._networkanalysis analysis/network/networkanalysis.sip cpp_files)
BUILD_SIP_PYTHON_MODULE(qgis._networkanalysis networkanalysis/networkanalysis.sip ${cpp_files} "" qgis_core qgis_networkanalysis)

SET(QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR}/qgis)

IF(WITH_QSCIAPI)
# wait until after python module builds for api files to be available
SET(QGIS_PYTHON_API_FILE "${CMAKE_BINARY_DIR}/python/qsci_apis/PyQGIS.api")

ADD_CUSTOM_TARGET(qsci-api ALL
DEPENDS python_module_qgis__gui python_module_qgis__core python_module_qgis__analysis python_module_qgis__networkanalysis)
DEPENDS python_module_qgis__gui python_module_qgis__core python_module_qgis__analysis)

# run update/concatenate command
ADD_CUSTOM_COMMAND(TARGET qsci-api
@@ -52,3 +52,13 @@
%Include raster/qgsruggednessfilter.sip
%Include raster/qgsslopefilter.sip
%Include raster/qgstotalcurvaturefilter.sip

%Include network/qgsgraph.sip
%Include network/qgsnetworkstrategy.sip
%Include network/qgsnetworkspeedstrategy.sip
%Include network/qgsnetworkdistancestrategy.sip
%Include network/qgsgraphbuilderinterface.sip
%Include network/qgsgraphbuilder.sip
%Include network/qgsgraphdirector.sip
%Include network/qgsvectorlayerdirector.sip
%Include network/qgsgraphanalyzer.sip

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 3dcf03c

Please sign in to comment.
You can’t perform that action at this time.