Skip to content
Permalink
Browse files

[FEATURE] Add the raster terrain plugin that does calculate of slope,…

… aspect, ruggedness, total curvature from raster layers

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11510 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Aug 26, 2009
1 parent a25a528 commit d896effdb278514e89419064f9ec35e580fbffab
Showing with 2,058 additions and 0 deletions.
  1. +1 −0 src/plugins/CMakeLists.txt
  2. +62 −0 src/plugins/raster_terrain_analysis/CMakeLists.txt
  3. +291 −0 src/plugins/raster_terrain_analysis/Makefile
  4. +67 −0 src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp
  5. +38 −0 src/plugins/raster_terrain_analysis/qgsaspectfilter.h
  6. +168 −0 src/plugins/raster_terrain_analysis/qgsderivativefilter.cpp
  7. +40 −0 src/plugins/raster_terrain_analysis/qgsderivativefilter.h
  8. +275 −0 src/plugins/raster_terrain_analysis/qgsninecellfilter.cpp
  9. +72 −0 src/plugins/raster_terrain_analysis/qgsninecellfilter.h
  10. +163 −0 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp
  11. +47 −0 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.h
  12. 0 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialogbase.h
  13. +144 −0 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialogbase.ui
  14. +155 −0 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp
  15. +49 −0 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.h
  16. +94 −0 src/plugins/raster_terrain_analysis/qgsruggednessfilter.cpp
  17. +40 −0 src/plugins/raster_terrain_analysis/qgsruggednessfilter.h
  18. +19 −0 src/plugins/raster_terrain_analysis/qgsruggednessindex.cpp
  19. +44 −0 src/plugins/raster_terrain_analysis/qgsslopefilter.cpp
  20. +37 −0 src/plugins/raster_terrain_analysis/qgsslopefilter.h
  21. +48 −0 src/plugins/raster_terrain_analysis/qgstotalcurvaturefilter.cpp
  22. +37 −0 src/plugins/raster_terrain_analysis/qgstotalcurvaturefilter.h
  23. BIN src/plugins/raster_terrain_analysis/raster_terrain_icon.png
  24. +5 −0 src/plugins/raster_terrain_analysis/resources.qrc
  25. +162 −0 src/plugins/raster_terrain_analysis/ui_qgsrasterterrainanalysisdialogbase.h
@@ -4,6 +4,7 @@ SUBDIRS (copyright_label
north_arrow
scale_bar
oracle_raster
raster_terrain_analysis
)

IF (POSTGRES_FOUND)
@@ -0,0 +1,62 @@
########################################################
# Files

SET (RASTER_TERRAIN_SRCS
qgsrasterterrainanalysisplugin.cpp
qgsninecellfilter.cpp
qgsruggednessfilter.cpp
qgsderivativefilter.cpp
qgsslopefilter.cpp
qgsaspectfilter.cpp
qgstotalcurvaturefilter.cpp
qgsrasterterrainanalysisdialog.cpp
)

SET (RASTER_TERRAIN_UIS
qgsrasterterrainanalysisdialogbase.ui
)

SET (RASTER_TERRAIN_MOC_HDRS
qgsrasterterrainanalysisdialog.h
qgsrasterterrainanalysisplugin.h
)

SET (RASTER_TERRAIN_RCCS resources.qrc)
########################################################
# Build

QT4_WRAP_UI (RASTER_TERRAIN_UIS_H ${RASTER_TERRAIN_UIS})

QT4_WRAP_CPP (RASTER_TERRAIN_MOC_SRCS ${RASTER_TERRAIN_MOC_HDRS})

QT4_ADD_RESOURCES(RASTER_TERRAIN_RCC_SRCS ${RASTER_TERRAIN_RCCS})

ADD_LIBRARY (rasterterrainplugin MODULE
${RASTER_TERRAIN_SRCS}
${RASTER_TERRAIN_MOC_SRCS}
${RASTER_TERRAIN_RCC_SRCS}
${RASTER_TERRAIN_UIS_H})

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${GDAL_INCLUDE_DIR}
../../core
../../core/raster
../../gui
..
.
)

TARGET_LINK_LIBRARIES(rasterterrainplugin
qgis_core
qgis_gui
)


########################################################
# Install

INSTALL(TARGETS rasterterrainplugin
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -0,0 +1,291 @@
#############################################################################
# Makefile for building: libraster_terrain_analysis.so.1.0.0
# Generated by qmake (2.01a) (Qt 4.5.0) on: Fr. Aug 21 16:16:23 2009
# Project: raster_terrain_analysis.pro
# Template: lib
# Command: /usr/bin/qmake-qt4 -unix -o Makefile raster_terrain_analysis.pro
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
DEFINES = -DGUI_EXPORT= -DCORE_EXPORT= -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -g -D_REENTRANT -Wall -W -fPIC $(DEFINES)
CXXFLAGS = -pipe -g -D_REENTRANT -Wall -W -fPIC $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../../../include/qgis -I../../../../gdal-1.6.0/include -I. -I.
LINK = g++
LFLAGS = -shared -Wl,-soname,libraster_terrain_analysis.so.1
LIBS = $(SUBLIBS) -L/usr/lib -L/home/marco/src/qgis/lib -L/home/marco/src/gdal-1.6.0/lib -lqgis_core -lqgis_gui -lgdal -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake-qt4
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -sf
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p

####### Output directory

OBJECTS_DIR = ./

####### Files

SOURCES = qgsrasterterrainanalysisplugin.cpp \
qgsninecellfilter.cpp \
qgsruggednessfilter.cpp \
qgsderivativefilter.cpp \
qgsslopefilter.cpp \
qgsaspectfilter.cpp \
qgstotalcurvaturefilter.cpp \
qgsrasterterrainanalysisdialog.cpp moc_qgsrasterterrainanalysisplugin.cpp \
moc_qgsrasterterrainanalysisdialog.cpp \
qrc_resources.cpp
OBJECTS = qgsrasterterrainanalysisplugin.o \
qgsninecellfilter.o \
qgsruggednessfilter.o \
qgsderivativefilter.o \
qgsslopefilter.o \
qgsaspectfilter.o \
qgstotalcurvaturefilter.o \
qgsrasterterrainanalysisdialog.o \
moc_qgsrasterterrainanalysisplugin.o \
moc_qgsrasterterrainanalysisdialog.o \
qrc_resources.o
DIST = /usr/share/qt4/mkspecs/common/g++.conf \
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/debug.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
raster_terrain_analysis.pro
QMAKE_TARGET = raster_terrain_analysis
DESTDIR =
TARGET = libraster_terrain_analysis.so.1.0.0
TARGETA = libraster_terrain_analysis.a
TARGETD = libraster_terrain_analysis.so.1.0.0
TARGET0 = libraster_terrain_analysis.so
TARGET1 = libraster_terrain_analysis.so.1
TARGET2 = libraster_terrain_analysis.so.1.0

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

####### Build rules

all: Makefile $(TARGET)

$(TARGET): ui_qgsrasterterrainanalysisdialogbase.h $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
-ln -s $(TARGET) $(TARGET0)
-ln -s $(TARGET) $(TARGET1)
-ln -s $(TARGET) $(TARGET2)



staticlib: $(TARGETA)

$(TARGETA): ui_qgsrasterterrainanalysisdialogbase.h $(OBJECTS) $(OBJCOMP)
-$(DEL_FILE) $(TARGETA)
$(AR) $(TARGETA) $(OBJECTS)

Makefile: raster_terrain_analysis.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/debug.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/lib/libQtGui.prl \
/usr/lib/libQtCore.prl
$(QMAKE) -unix -o Makefile raster_terrain_analysis.pro
/usr/share/qt4/mkspecs/common/g++.conf:
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/debug.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/qt.prf:
/usr/share/qt4/mkspecs/features/unix/thread.prf:
/usr/share/qt4/mkspecs/features/moc.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/lib/libQtGui.prl:
/usr/lib/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -unix -o Makefile raster_terrain_analysis.pro

dist:
@$(CHK_DIR_EXISTS) .tmp/raster_terrain_analysis1.0.0 || $(MKDIR) .tmp/raster_terrain_analysis1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/raster_terrain_analysis1.0.0/ && $(COPY_FILE) --parents qgsrasterterrainanalysisplugin.h qgsninecellfilter.h qgsruggednessfilter.h qgsderivativefilter.h qgsslopefilter.h qgsaspectfilter.h qgsrasterterrainanalysisdialog.h .tmp/raster_terrain_analysis1.0.0/ && $(COPY_FILE) --parents resources.qrc .tmp/raster_terrain_analysis1.0.0/ && $(COPY_FILE) --parents qgsrasterterrainanalysisplugin.cpp qgsninecellfilter.cpp qgsruggednessfilter.cpp qgsderivativefilter.cpp qgsslopefilter.cpp qgsaspectfilter.cpp qgstotalcurvaturefilter.cpp qgsrasterterrainanalysisdialog.cpp .tmp/raster_terrain_analysis1.0.0/ && $(COPY_FILE) --parents qgsrasterterrainanalysisdialogbase.ui .tmp/raster_terrain_analysis1.0.0/ && (cd `dirname .tmp/raster_terrain_analysis1.0.0` && $(TAR) raster_terrain_analysis1.0.0.tar raster_terrain_analysis1.0.0 && $(COMPRESS) raster_terrain_analysis1.0.0.tar) && $(MOVE) `dirname .tmp/raster_terrain_analysis1.0.0`/raster_terrain_analysis1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/raster_terrain_analysis1.0.0


clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA)
-$(DEL_FILE) Makefile


mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_qgsrasterterrainanalysisplugin.cpp moc_qgsrasterterrainanalysisdialog.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_qgsrasterterrainanalysisplugin.cpp moc_qgsrasterterrainanalysisdialog.cpp
moc_qgsrasterterrainanalysisplugin.cpp: qgsrasterterrainanalysisplugin.h
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) qgsrasterterrainanalysisplugin.h -o moc_qgsrasterterrainanalysisplugin.cpp

moc_qgsrasterterrainanalysisdialog.cpp: ui_qgsrasterterrainanalysisdialogbase.h \
qgsrasterterrainanalysisdialog.h
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) qgsrasterterrainanalysisdialog.h -o moc_qgsrasterterrainanalysisdialog.cpp

compiler_rcc_make_all: qrc_resources.cpp
compiler_rcc_clean:
-$(DEL_FILE) qrc_resources.cpp
qrc_resources.cpp: resources.qrc \
raster_terrain_icon.png
/usr/bin/rcc -name resources resources.qrc -o qrc_resources.cpp

compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_qgsrasterterrainanalysisdialogbase.h
compiler_uic_clean:
-$(DEL_FILE) ui_qgsrasterterrainanalysisdialogbase.h
ui_qgsrasterterrainanalysisdialogbase.h: qgsrasterterrainanalysisdialogbase.ui
/usr/bin/uic-qt4 qgsrasterterrainanalysisdialogbase.ui -o ui_qgsrasterterrainanalysisdialogbase.h

compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean

####### Compile

qgsrasterterrainanalysisplugin.o: qgsrasterterrainanalysisplugin.cpp qgsrasterterrainanalysisplugin.h \
qgsaspectfilter.h \
qgsderivativefilter.h \
qgsninecellfilter.h \
qgsslopefilter.h \
qgsruggednessfilter.h \
qgsrasterterrainanalysisdialog.h \
ui_qgsrasterterrainanalysisdialogbase.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsrasterterrainanalysisplugin.o qgsrasterterrainanalysisplugin.cpp

qgsninecellfilter.o: qgsninecellfilter.cpp qgsninecellfilter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsninecellfilter.o qgsninecellfilter.cpp

qgsruggednessfilter.o: qgsruggednessfilter.cpp qgsruggednessfilter.h \
qgsninecellfilter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsruggednessfilter.o qgsruggednessfilter.cpp

qgsderivativefilter.o: qgsderivativefilter.cpp qgsderivativefilter.h \
qgsninecellfilter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsderivativefilter.o qgsderivativefilter.cpp

qgsslopefilter.o: qgsslopefilter.cpp qgsslopefilter.h \
qgsderivativefilter.h \
qgsninecellfilter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsslopefilter.o qgsslopefilter.cpp

qgsaspectfilter.o: qgsaspectfilter.cpp qgsaspectfilter.h \
qgsderivativefilter.h \
qgsninecellfilter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsaspectfilter.o qgsaspectfilter.cpp

qgstotalcurvaturefilter.o: qgstotalcurvaturefilter.cpp qgstotalcurvaturefilter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgstotalcurvaturefilter.o qgstotalcurvaturefilter.cpp

qgsrasterterrainanalysisdialog.o: qgsrasterterrainanalysisdialog.cpp qgsrasterterrainanalysisdialog.h \
ui_qgsrasterterrainanalysisdialogbase.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgsrasterterrainanalysisdialog.o qgsrasterterrainanalysisdialog.cpp

moc_qgsrasterterrainanalysisplugin.o: moc_qgsrasterterrainanalysisplugin.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qgsrasterterrainanalysisplugin.o moc_qgsrasterterrainanalysisplugin.cpp

moc_qgsrasterterrainanalysisdialog.o: moc_qgsrasterterrainanalysisdialog.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qgsrasterterrainanalysisdialog.o moc_qgsrasterterrainanalysisdialog.cpp

qrc_resources.o: qrc_resources.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_resources.o qrc_resources.cpp

####### Install

install: FORCE

uninstall: FORCE

FORCE:

0 comments on commit d896eff

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