Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changed some grass modules to work with grass 6.4 and guarantee the c…
…ompatibility with previous versions. Fixed #1629.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10903 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rugginoso committed Jun 11, 2009
1 parent 460c9cd commit 23ae11e
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 8 deletions.
8 changes: 8 additions & 0 deletions cmake/FindGRASS.cmake
Expand Up @@ -66,7 +66,15 @@ ENDIF (WITH_GRASS)

IF (GRASS_FOUND)
FILE(READ ${GRASS_INCLUDE_DIR}/grass/version.h VERSIONFILE)
# We can avoid the following block using version_less version_equal and
# version_greater. Are there compatibility problems?
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[^ ]+" GRASS_VERSION ${VERSIONFILE})
STRING(REGEX REPLACE "^([0-9]*)\\.[0-9]*\\..*$" "\\1" GRASS_MAJOR_VERSION ${GRASS_VERSION})
STRING(REGEX REPLACE "^[0-9]*\\.([0-9]*)\\..*$" "\\1" GRASS_MINOR_VERSION ${GRASS_VERSION})
STRING(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.(.*)$" "\\1" GRASS_MICRO_VERSION ${GRASS_VERSION})
# Add micro version too?
# How to numerize RC versions?
MATH( EXPR GRASS_NUM_VERSION "${GRASS_MAJOR_VERSION}*10000 + ${GRASS_MINOR_VERSION}*100")

IF (NOT GRASS_FIND_QUIETLY)
MESSAGE(STATUS "Found GRASS: ${GRASS_PREFIX} (${GRASS_VERSION})")
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/CMakeLists.txt
@@ -1,5 +1,5 @@

SUBDIRS(config modules scripts themes)
SUBDIRS(config modules modules-old scripts themes)

ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/grass/modules-old/CMakeLists.txt
@@ -0,0 +1,6 @@
IF ( GRASS_NUM_VERSION LESS 60400 )
FILE (GLOB MODULE_FILES *.qgm *.svg *.png)
INSTALL (FILES ${MODULE_FILES}
DESTINATION ${QGIS_DATA_DIR}/grass/modules)
ENDIF ( GRASS_NUM_VERSION LESS 60400 )

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/plugins/grass/modules-old/r.surf.fractal.qgm
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Create fractal surface of given fractal dimension" module="r.surf.fractal">
<option key="d" />
<option key="n" />
<option key="out" />
</qgisgrassmodule>
13 changes: 13 additions & 0 deletions src/plugins/grass/modules-old/v.buffer.1.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/plugins/grass/modules-old/v.buffer.2.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/plugins/grass/modules-old/v.buffer.qgm
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Vector buffer" module="v.buffer">
<option key="input" typeoption="type" layeroption="layer" />
<option key="buffer"/>
<option key="output" />
</qgisgrassmodule>
Binary file added src/plugins/grass/modules-old/v.db.select.1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/plugins/grass/modules-old/v.db.select.2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/plugins/grass/modules-old/v.db.select.qgm
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Display vector attributes" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/plugins/grass/modules-old/v.db.select.where.qgm
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Display vector map attributes with SQL" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<option key="where" />
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
Binary file added src/plugins/grass/modules-old/v.to.db.1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/plugins/grass/modules-old/v.to.db.2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/plugins/grass/modules-old/v.to.db.qgm
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Put geometry variables in database" module="v.to.db">
<option key="map" layeroption="layer"/>
<option key="option"/>
<option key="units"/>
<field key="column" layer="map" type="integer,double" label="Attribute field" />
</qgisgrassmodule>
6 changes: 3 additions & 3 deletions src/plugins/grass/modules/r.surf.fractal.qgm
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Create fractal surface of given fractal dimension" module="r.surf.fractal">
<option key="d" />
<option key="n" />
<option key="out" />
<option key="dimension" />
<option key="number" />
<option key="output" />
</qgisgrassmodule>
2 changes: 1 addition & 1 deletion src/plugins/grass/modules/v.buffer.qgm
Expand Up @@ -3,6 +3,6 @@

<qgisgrassmodule label="Vector buffer" module="v.buffer">
<option key="input" typeoption="type" layeroption="layer" />
<option key="buffer"/>
<option key="distance"/>
<option key="output" />
</qgisgrassmodule>
2 changes: 1 addition & 1 deletion src/plugins/grass/modules/v.db.select.qgm
Expand Up @@ -3,6 +3,6 @@

<qgisgrassmodule label="Display vector attributes" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<field key="columns" layer="map" type="integer,double,varchar"/>
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
2 changes: 1 addition & 1 deletion src/plugins/grass/modules/v.db.select.where.qgm
Expand Up @@ -3,7 +3,7 @@

<qgisgrassmodule label="Display vector map attributes with SQL" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<field key="columns" layer="map" type="integer,double,varchar"/>
<option key="where" />
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
2 changes: 1 addition & 1 deletion src/plugins/grass/modules/v.to.db.qgm
Expand Up @@ -5,5 +5,5 @@
<option key="map" layeroption="layer"/>
<option key="option"/>
<option key="units"/>
<field key="column" layer="map" type="integer,double" label="Attribute field" />
<field key="columns" layer="map" type="integer,double" label="Attribute field" />
</qgisgrassmodule>

0 comments on commit 23ae11e

Please sign in to comment.