Skip to content

Commit

Permalink
modify RoadGraphPlugin for works with QGIS'api. Fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stopa85milk committed May 25, 2011
1 parent 8560e4d commit 3d7a4ca
Show file tree
Hide file tree
Showing 21 changed files with 177 additions and 1,118 deletions.
8 changes: 4 additions & 4 deletions src/analysis/network/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ SET(QGIS_NETWORK_ANALYSIS_SRCS

INCLUDE_DIRECTORIES(BEFORE raster)

SET(QGIS_ANALYSIS_MOC_HDRS
qgslinevectorlayerdirector.cpp
SET(QGIS_NETWORK_ANALYSIS_MOC_HDRS
qgsgraphdirector.h
)

QT4_WRAP_CPP(QGIS_NETWORK_ANALYSIS_MOC_SRCS ${QGIS_ANALYSIS_MOC_HDRS})
QT4_WRAP_CPP(QGIS_NETWORK_ANALYSIS_MOC_SRCS ${QGIS_NETWORK_ANALYSIS_MOC_HDRS})


INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}../../core/
interpolation
${CMAKE_CURRENT_SOURCE_DIR}../../core/spatialindex
${PROJ_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/network/qgsdistanceedgeproperter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
***************************************************************************/

//QGIS includes
#include <qgsdistanceedgeproperter.h>
#include "qgsdistanceedgeproperter.h"

QVariant QgsDistanceEdgeProperter::property( double distance, const QgsFeature& f ) const
{
Expand Down
9 changes: 0 additions & 9 deletions src/analysis/network/qgsedgeproperter.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,4 @@ class ANALYSIS_EXPORT QgsEdgeProperter
virtual QVariant property( double distance, const QgsFeature& f ) const
{ return QVariant(); }
};

class ANALYSIS_EXPORT QgsEdgeDistanceProperter : public QgsEdgeProperter
{
public:
virtual QVariant property( double distance, const QgsFeature& ) const
{
return QVariant( distance );
}
};
#endif //QGSEDGEPROPERTYH
2 changes: 1 addition & 1 deletion src/analysis/network/qgsgraphbuilderintr.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* @param topologyTolerance sqrt distance between source point as one graph vertex
*/
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem& crs, const QgsDistanceArea& da, bool ctfEnabled = true, double topologyTolerance = 0.0) :
mCrs( crs ), mDa( da ), mCtfEnabled ( ctfEnabled ), mTopologyTolerance( topologyTolerance )
mCrs( crs ), mCtfEnabled ( ctfEnabled ), mTopologyTolerance( topologyTolerance )
{
mDa.setSourceCrs( mCrs.srsid() );
}
Expand Down
10 changes: 4 additions & 6 deletions src/plugins/roadgraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ SET (VRP_SRCS
roadgraphplugin.cpp
settingsdlg.cpp
units.cpp
utils.cpp
shortestpathwidget.cpp
linevectorlayersettings.cpp
linevectorlayerwidget.cpp
linevectorlayerdirector.cpp
simplegraphbuilder.cpp
exportdlg.cpp
graphbuilder.cpp
speedproperter.cpp
)

#SET ([pluginlcasename]_UIS [pluginlcasename]guibase.ui)

SET (VRP_MOC_HDRS
graphdirector.h
roadgraphplugin.h
settingsdlg.h
shortestpathwidget.h
Expand All @@ -32,8 +28,9 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${GEOS_INCLUDE_DIR}
../../core
../../core/spatialindex/
../../core/spatialindex
../../gui
../../analysis/network
..
)
########################################################
Expand All @@ -49,6 +46,7 @@ ADD_LIBRARY (roadgraphplugin MODULE ${VRP_SRCS} ${VRP_MOC_SRCS} ${VRP_RCC_SRCS})
TARGET_LINK_LIBRARIES(roadgraphplugin
qgis_core
qgis_gui
qgis_networkanalysis
)


Expand Down
45 changes: 0 additions & 45 deletions src/plugins/roadgraph/graphbuilder.cpp

This file was deleted.

73 changes: 0 additions & 73 deletions src/plugins/roadgraph/graphbuilder.h

This file was deleted.

63 changes: 0 additions & 63 deletions src/plugins/roadgraph/graphdirector.h

This file was deleted.

Loading

0 comments on commit 3d7a4ca

Please sign in to comment.