Skip to content
Permalink
Browse files

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@10903 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rugginoso
rugginoso committed Jun 11, 2009
1 parent 535490a commit 59750316e6a21e016c8fa86bb7034c677ce04ba7
@@ -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})")
@@ -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})
@@ -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 )

Binary file not shown.
Binary file not shown.
@@ -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>
@@ -0,0 +1,13 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="500" x="0" y="0" height="500" id="/putrela0/mpasol/blazek/inst/qgiscvs07/plugins/grass/modules/v.buffer.1" >
<rect width="500" x="0" y="0" height="500" style="stroke:rgb(0,0,0);stroke-width:0;fill:rgb(255,255,255);" />
<g style="stroke:rgb(0,0,0);stroke-width:0.9;fill:none;" >
<clipPath id="clip1" >
<rect width="500" x="0" y="0" height="500" />
</clipPath>
<g style="clip-path:url(#clip1)" >
<polyline points="80 416 94 381 110 352 130 322 161 298 213 281 276 264 323 245 353 217 399 168 418 125 431 95 438 77" style="stroke:rgb(0,0,255);stroke-width:15;fill:none;" />
</g>
</g>
</svg>
@@ -0,0 +1,14 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="500" x="0" y="0" height="500" id="/putrela0/mpasol/blazek/inst/qgiscvs07/plugins/grass/modules/v.buffer.2" >
<rect width="500" x="0" y="0" height="500" style="stroke:rgb(0,0,0);stroke-width:0;fill:rgb(255,255,255);" />
<g style="stroke:rgb(0,0,0);stroke-width:0.9;fill:none;" >
<clipPath id="clip1" >
<rect width="500" x="0" y="0" height="500" />
</clipPath>
<g style="clip-path:url(#clip1)" >
<polygon points="125 435 125 436 118 447 107 457 95 463 81 465 68 463 55 458 44 449 36 438 32 424 32 411 35 397 49 363 51 359 66 329 70 324 90 295 94 289 100 284 130 260 137 255 145 251 197 234 200 233 260 218 297 203 318 183 358 140 374 105 386 76 393 59 393 58 401 46 411 37 423 31 437 28 450 30 463 35 474 43 482 54 486 68 487 81 484 95 477 113 476 115 463 145 463 145 443 188 440 194 435 201 389 250 386 253 357 281 350 286 342 290 294 310 288 312 226 327 184 341 166 356 152 377 139 402 125 435" style="stroke:rgb(0,0,0);stroke-width:0;fill:rgb(170,255,255);" />
<polygon points="125 435 125 436 118 447 107 457 95 463 81 465 68 463 55 458 44 449 36 438 32 424 32 411 35 397 49 363 51 359 66 329 70 324 90 295 94 289 100 284 130 260 137 255 145 251 197 234 200 233 260 218 297 203 318 183 358 140 374 105 386 76 393 59 393 58 401 46 411 37 423 31 437 28 450 30 463 35 474 43 482 54 486 68 487 81 484 95 477 113 476 115 463 145 463 145 443 188 440 194 435 201 389 250 386 253 357 281 350 286 342 290 294 310 288 312 226 327 184 341 166 356 152 377 139 402 125 435" style="stroke:rgb(0,0,255);stroke-width:15;fill:none;" />
</g>
</g>
</svg>
@@ -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 not shown.
Binary file not shown.
@@ -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>
Binary file not shown.
Binary file not shown.
@@ -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 not shown.
Binary file not shown.
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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 5975031

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