Skip to content
Permalink
Browse files

modify RoadGraphPlugin for works with QGIS'api. Fix some bug

  • Loading branch information
Sergey Yakushevs
Sergey Yakushevs committed May 25, 2011
1 parent 8560e4d commit 3d7a4cac7e4827defb158780cbbcd9e213bc0210
@@ -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}
@@ -10,7 +10,7 @@
***************************************************************************/

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

QVariant QgsDistanceEdgeProperter::property( double distance, const QgsFeature& f ) const
{
@@ -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
@@ -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() );
}
@@ -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
@@ -32,8 +28,9 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${GEOS_INCLUDE_DIR}
../../core
../../core/spatialindex/
../../core/spatialindex
../../gui
../../analysis/network
..
)
########################################################
@@ -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
)


This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 3d7a4ca

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