Skip to content

Commit

Permalink
[GRASS] remove GRASS 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Jul 12, 2017
1 parent 7cbf9df commit eb6301e
Show file tree
Hide file tree
Showing 154 changed files with 576 additions and 1,063 deletions.
19 changes: 8 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,16 @@ SET (WITH_CORE TRUE CACHE BOOL "Determines whether QGIS core should be built.")
MARK_AS_ADVANCED(WITH_CORE)

IF(WITH_CORE)
# try to configure and build GRASS plugin by default
FOREACH (GRASS_SEARCH_VERSION 6 7)
# For GRASS 6 are used cached variables without version suffix so that existing caches don't have to be reconfigured.
# Cached variables: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
# Only GRASS 7 is currently supported but we keep dual version support in cmake for possible future switch to GRASS 8.
# Try to configure and build GRASS plugin by default
FOREACH (GRASS_SEARCH_VERSION 7)
# Legacy note:
# For GRASS 6 there were used cached variables without version suffix so that existing caches didn't have to be reconfigured.
# Cached variables were: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
# Everywhere else each variable has version major appended.
# Normal variables: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
# Normal variables were: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
# In addition there is also GRASS_FOUND, which is TRUE if at least one version of GRASS was found
IF (GRASS_SEARCH_VERSION EQUAL 6)
SET (GRASS_CACHE_VERSION "")
ELSE (GRASS_SEARCH_VERSION EQUAL 6)
SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION})
ENDIF (GRASS_SEARCH_VERSION EQUAL 6)

SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION})
SET (WITH_GRASS${GRASS_CACHE_VERSION} TRUE CACHE BOOL "Determines whether GRASS ${GRASS_SEARCH_VERSION} plugin should be built")
IF (WITH_GRASS${GRASS_CACHE_VERSION})
FIND_PACKAGE(GRASS ${GRASS_SEARCH_VERSION})
Expand Down
17 changes: 2 additions & 15 deletions cmake/FindGRASS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ MACRO (CHECK_GRASS G_PREFIX)
SET(GRASS_FOUND TRUE) # GRASS_FOUND is true if at least one version was found
SET(GRASS_PREFIX${GRASS_CACHE_VERSION} ${G_PREFIX})
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
IF(GRASS_FIND_VERSION EQUAL 6)
# Set also normal variable with number
SET(GRASS_INCLUDE_DIR${GRASS_FIND_VERSION} ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}})
SET(GRASS_PREFIX${GRASS_FIND_VERSION} ${G_PREFIX})
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
ENDIF(GRASS_FIND_VERSION EQUAL 6)
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
ENDIF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)
Expand All @@ -164,20 +158,13 @@ IF (WIN32)
ENDIF (WIN32)

IF (UNIX)
IF (GRASS_FIND_VERSION EQUAL 6)
LIST(APPEND GRASS_PATHS /usr/lib64/grass64 /usr/lib/grass64)
ELSEIF (GRASS_FIND_VERSION EQUAL 7)
IF (GRASS_FIND_VERSION EQUAL 7)
LIST(APPEND GRASS_PATHS /usr/lib64/grass70 /usr/lib/grass70 /usr/lib64/grass71 /usr/lib/grass71 /usr/lib64/grass72 /usr/lib/grass72)
ENDIF ()
ENDIF (UNIX)

IF (APPLE)
IF (GRASS_FIND_VERSION EQUAL 6)
LIST(APPEND GRASS_PATHS
/Applications/GRASS-6.3.app/Contents/MacOS
/Applications/GRASS-6.4.app/Contents/MacOS
)
ELSEIF (GRASS_FIND_VERSION EQUAL 7)
IF (GRASS_FIND_VERSION EQUAL 7)
LIST(APPEND GRASS_PATHS
/Applications/GRASS-7.0.app/Contents/MacOS
/Applications/GRASS-7.1.app/Contents/MacOS
Expand Down
5 changes: 0 additions & 5 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ ifeq ($(GRASSVER),7)
-DWITH_GRASS=TRUE \
-DWITH_GRASS7=TRUE \
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
else
CMAKE_OPTS += \
-DWITH_GRASS=TRUE \
-DWITH_GRASS6=TRUE \
-DGRASS_PREFIX=/usr/lib/$(GRASS)
endif

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
Expand Down
1 change: 0 additions & 1 deletion ms-windows/osgeo4w/package-nightly.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ cmake -G Ninja ^
-D WITH_SERVER=TRUE ^
-D SERVER_SKIP_ECW=TRUE ^
-D WITH_GRASS=TRUE ^
-D WITH_GRASS6=FALSE ^
-D WITH_GRASS7=TRUE ^
-D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^
-D WITH_GLOBE=FALSE ^
Expand Down
1 change: 0 additions & 1 deletion ms-windows/osgeo4w/package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ cmake -G Ninja ^
-D WITH_SERVER=TRUE ^
-D SERVER_SKIP_ECW=TRUE ^
-D WITH_GRASS=TRUE ^
-D WITH_GRASS6=FALSE ^
-D WITH_GRASS7=TRUE ^
-D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^
-D WITH_GLOBE=FALSE ^
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/grass/modules/db.in.ogr.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Import attribute tables in various formats" module="db.in.ogr">
<file key="dsn" type="old" label="Input table" filters="dbf, csv (*.csv *.dbf)" version_max="6.4"/>
<file key="input" type="old" label="Input table" filters="dbf, csv (*.csv *.dbf)" version_min="7.0"/>
<file key="input" type="old" label="Input table" filters="dbf, csv (*.csv *.dbf)"/>
<option key="output"/>
</qgisgrassmodule>
6 changes: 2 additions & 4 deletions src/plugins/grass/modules/db.out.ogr.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

<qgisgrassmodule label="Exports attribute tables into various format" module="db.out.ogr">
<option key="input" />
<file key="dsn" type="new" version_max="6"/>
<file key="output" type="new" version_min="7"/>
<file key="output" type="new"/>
<option key="format" />
<option key="db_table" version_max="6"/>
<option key="table" version_min="7"/>
<option key="table"/>
</qgisgrassmodule>
3 changes: 1 addition & 2 deletions src/plugins/grass/modules/db.select.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
<option key="database" answer="$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/" />
<option key="driver" />
<option key="sql" />
<option key="fs" answer="|" hidden="yes" version_max="6"/>
<option key="separator" answer="|" hidden="yes" version_min="7"/>
<option key="separator" answer="|" hidden="yes"/>
</qgisgrassmodule>
3 changes: 1 addition & 2 deletions src/plugins/grass/modules/g.region.multiple.raster.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Set the region to match multiple rasters" module="g.region">
<option key="rast" version_max="6.4"/>
<option key="raster" version_min="7.0"/>
<option key="raster"/>
</qgisgrassmodule>
3 changes: 1 addition & 2 deletions src/plugins/grass/modules/g.region.multiple.vector.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Set the region to match multiple vectors" module="g.region">
<option key="vect" version_max="6.4"/>
<option key="vector" version_min="7.0"/>
<option key="vector"/>
</qgisgrassmodule>
10 changes: 3 additions & 7 deletions src/plugins/grass/modules/i.fft.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Fast fourier transform for image processing" module="i.fft">
<option key="input_image" version_max="6"/>
<option key="input" version_min="7"/>
<option key="real_image" version_max="6"/>
<option key="real" version_min="7"/>
<option key="imaginary_image" version_max="6"/>
<option key="imaginary" version_min="7"/>
<option key="range" version_max="6"/>
<option key="input"/>
<option key="real"/>
<option key="imaginary"/>
</qgisgrassmodule>
18 changes: 6 additions & 12 deletions src/plugins/grass/modules/i.his.rgb.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Hue Intensity Saturation (HIS) to Red Green Blue (RGB) raster color transform function" module="i.his.rgb">
<option key="hue_input" version_max="6"/>
<option key="hue" version_min="7"/>
<option key="intensity_input" version_max="6"/>
<option key="intensity" version_min="7"/>
<option key="saturation_input" version_max="6"/>
<option key="saturation" version_min="7"/>
<option key="red_output" version_max="6"/>
<option key="red" version_min="7"/>
<option key="green_output" version_max="6"/>
<option key="green" version_min="7"/>
<option key="blue_output" version_max="6"/>
<option key="blue" version_min="7"/>
<option key="hue"/>
<option key="intensity"/>
<option key="saturation"/>
<option key="red"/>
<option key="green"/>
<option key="blue"/>
</qgisgrassmodule>
9 changes: 3 additions & 6 deletions src/plugins/grass/modules/i.ifft.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Inverse fast fourier transform for image processing" module="i.ifft">
<option key="real_image" version_max="6"/>
<option key="real" version_min="7"/>
<option key="imaginary_image" version_max="6"/>
<option key="imaginary" version_min="7"/>
<option key="output_image" version_max="6"/>
<option key="output" version_min="7"/>
<option key="real"/>
<option key="imaginary"/>
<option key="output"/>
</qgisgrassmodule>
8 changes: 2 additions & 6 deletions src/plugins/grass/modules/i.image.mosaic.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Mosaic up to 4 images" module="i.image.mosaic">
<option key="image1" version_max="6"/>
<option key="image2" version_max="6"/>
<option key="image3" version_max="6"/>
<option key="image4" version_max="6"/>
<option key="input" version_min="7"/>
<option key="output" version_min="7"/>
<option key="input"/>
<option key="output"/>
</qgisgrassmodule>
6 changes: 2 additions & 4 deletions src/plugins/grass/modules/i.in.spotvgt.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Import SPOT VGT NDVI" module="i.in.spotvgt">
<file key="file" type="new" version_max="6.4"/>
<file key="input" version_min="7.0"/>
<file key="input"/>
<flag key="a" />
<option key="rast" version_max="6.4"/>
<option key="output" version_min="7.0"/>
<option key="output"/>
</qgisgrassmodule>
10 changes: 2 additions & 8 deletions src/plugins/grass/modules/i.oif.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Calculate optimal index factor table for LANDSAT-TM raster" module="i.oif">
<option key="image1" version_max="6"/>
<option key="image2" version_max="6"/>
<option key="image3" version_max="6"/>
<option key="image4" version_max="6"/>
<option key="image5" version_max="6"/>
<option key="image7" version_max="6"/>
<option key="input" version_min="7"/>
<option key="output" version_min="7"/>
<option key="input"/>
<option key="output"/>
</qgisgrassmodule>
18 changes: 6 additions & 12 deletions src/plugins/grass/modules/i.rgb.his.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Red Green Blue (RGB) to Hue Intensity Saturation (HIS) raster color transformation function" module="i.rgb.his">
<option key="red_input" version_max="6"/>
<option key="red" version_min="7"/>
<option key="green_input" version_max="6"/>
<option key="green" version_min="7"/>
<option key="blue_input" version_max="6"/>
<option key="blue" version_min="7"/>
<option key="hue_output" version_max="6"/>
<option key="hue" version_min="7"/>
<option key="intensity_output" version_max="6"/>
<option key="intensity" version_min="7"/>
<option key="saturation_output" version_max="6"/>
<option key="saturation" version_min="7"/>
<option key="red"/>
<option key="green"/>
<option key="blue"/>
<option key="hue"/>
<option key="intensity"/>
<option key="saturation"/>
</qgisgrassmodule>
14 changes: 3 additions & 11 deletions src/plugins/grass/modules/i.tasscap4.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Tasseled Cap (Kauth Thomas) transformation for LANDSAT-TM 4 raster" module="i.tasscap">
<flag key="4" answer="on" hidden="yes" version_max="6"/>
<option key="band1" version_max="6"/>
<option key="band2" version_max="6"/>
<option key="band3" version_max="6"/>
<option key="band4" version_max="6"/>
<option key="band5" version_max="6"/>
<option key="band7" version_max="6"/>
<option key="outprefix" version_max="6"/>
<option key="input" label="Landsat 4 bands 1, 2, 3, 4, 5, 7" version_min="7"/>
<option key="output" version_min="7"/>
<option key="sensor" answer="landsat4_tm" hidden="yes" version_min="7"/>
<option key="input" label="Landsat 4 bands 1, 2, 3, 4, 5, 7"/>
<option key="output"/>
<option key="sensor" answer="landsat4_tm" hidden="yes"/>
</qgisgrassmodule>
14 changes: 3 additions & 11 deletions src/plugins/grass/modules/i.tasscap5.qgm
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Tasseled Cap (Kauth Thomas) transformation for LANDSAT-TM 5 raster" module="i.tasscap">
<flag key="5" answer="on" hidden="yes" version_max="6"/>
<option key="band1" version_max="6"/>
<option key="band2" version_max="6"/>
<option key="band3" version_max="6"/>
<option key="band4" version_max="6"/>
<option key="band5" version_max="6"/>
<option key="band7" version_max="6"/>
<option key="outprefix" version_max="6"/>
<option key="input" label="Landsat 5 bands 1, 2, 3, 4, 5, 7" version_min="7"/>
<option key="output" version_min="7"/>
<option key="sensor" answer="landsat5_tm" hidden="yes" version_min="7"/>
<option key="input" label="Landsat 5 bands 1, 2, 3, 4, 5, 7"/>
<option key="output"/>
<option key="sensor" answer="landsat5_tm" hidden="yes"/>
</qgisgrassmodule>
14 changes: 3 additions & 11 deletions src/plugins/grass/modules/i.tasscap7.qgm