Chocolatey Fest - Chocolatey's inaugural conference on Windows Automation (WinOps) is coming - Learn more!

QGIS LTR (Long Term Release)

2.18.21

Package test results are passing.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved as a trusted package on 7/16/2018.

QGIS is a user friendly Open Source Geographic Information System (GIS) licensed under the GNU General Public License. QGIS is an official project of the Open Source Geospatial Foundation (OSGeo). It runs on Linux, Unix, Mac OSX, Windows and Android and supports numerous vector, raster, and database formats and functionalities.

General Features

  • View data -- Spatially-enabled tables and views, vector formats, raster and imagery formats, GRASS raster and vector data and online spatial data.
  • Explore data and compose maps -- Interactively explore spatial data with a friendly GUI with many helpful tools.
  • Create, edit, manage and export data -- Vector and raster layers in several formats.
  • Analyze data -- vector analysis, sampling, geoprocessing, geometry and database management tools including the complete GRASS functionality of more than 400 modules.
  • Publish maps on the Internet -- QGIS can be used as a WMS, WMTS, WMS-C or WFS and WFS-T client, and as a WMS, WCS or WFS server.
  • Extensible functionality through plugins
  • Python console

This package will install the identified, "Long Term Release" version of QGIS intended for stability. If you want to install a version more rich with features but potentially less stable, try the package for the latest release of QGIS. These packages can now co-exist!

Keeping old releases

Upon installation/upgrade, this package will attempt to remove the newest version of QGIS less than or equal to this package version. (It will no longer remove non-"LTR" versions.) If you would like to skip the uninstallation of any older versions, use the a "Keep" package parameter as follows:

choco install qgis-ltr -params '"/Keep"'

This parameter will be ignored if the newest version has the same major.minor value as this package because the QGIS installer won't allow two different builds of the same major.minor release. (I.E. Version 2.18.14 has the same "2.18" as version 2.18.20.) This parameter would allow you to keep a v2.14.x install of QGIS when installing a v2.18.x package.

Uninstallation should remove only the installed, Chocolatey package version.

To install QGIS LTR (Long Term Release), run the following command from the command line or from PowerShell:

C:\> choco install qgis-ltr

To upgrade QGIS LTR (Long Term Release), run the following command from the command line or from PowerShell:

C:\> choco upgrade qgis-ltr

Files

Hide
  • tools\chocolateyinstall.ps1 Show
    $ErrorActionPreference = 'Stop'
    
    $AppVersion = '2.18.21'   # may not match package version
    
    $InstallArgs = @{
       packageName    = 'qgis-ltr'
       fileType       = 'EXE'
       softwareName   = "$env:ChocolateyPackageName $env:ChocolateyPackageVersion*"
       url            = 'http://qgis.org/downloads/QGIS-OSGeo4W-2.18.21-1-Setup-x86.exe'
       url64bit       = 'http://qgis.org/downloads/QGIS-OSGeo4W-2.18.21-1-Setup-x86_64.exe'
       checksumType   = 'sha256'
       checksum       = '176fde41b36a4c0f6abdd1fc3de99c7457455321e48a5c560b7a7ed59a5cc127'
       checksum64     = '00d4e445d24b106bbb2dd3c4dfe6492c11de125f20b89fe50982cbe891e88f8e'
       silentArgs     = '/S'
       validExitCodes = @(0)
    }
    
    $pp = Get-PackageParameters
    
    # QGIS install is best done with older versions uninstalled
    [array]$Keys = Get-UninstallRegistryKey -SoftwareName "QGIS *"
    if ($Keys) {
       $TargetKey = $null
       # Only want to uninstall the latest, Long Term Release version.
       # First, gather only the versions older than this LTR package.
       [array]$Keys = $Keys | Where-Object {[version]($_.DisplayName -replace '[^0-9.]','') -le [version]$AppVersion}
       if ($Keys.Count -gt 1) {
          Write-Warning "Multiple, previously-installed Long Term Release versions of QGIS found."
          # If there are several old versions, only remove the most recent.
          $MaxVer = [version]'0.0'
          Foreach ($key in $Keys) {
             $v = [version]($key.DisplayName -replace '[^0-9.]','')
             if ($v -ge $Maxver) { 
                $MaxVer = $v 
                $TargetKey = $key
             }
          }
          if (-not $pp.contains("Keep")) {
             Write-Warning "Only the newest version (v$($MaxVer.ToString())) will be removed before installing version $AppVersion"
          }
       } elseif ($Keys.Count -eq 1) {
          $TargetKey = $Keys[0]
       }
       $TargetVersion = $TargetKey.DisplayName -replace '[^0-9.]',''
       $TargetShortVersion = [version](([version]$TargetVersion).tostring(2))
       $AppShortVersion = [version](([version]$AppVersion).tostring(2))
       if ($pp.contains("Keep")) {
          Write-Host "You have requested for this package to NOT uninstall any previous installs of QGIS." -ForegroundColor Cyan
       }
       if ((-not $pp.contains("Keep")) -or ($TargetShortVersion -eq $AppShortVersion)) {
          if ($pp.contains("Keep")) {
             Write-warning "Multiple installs of minor (xx.yy) releases are not possible.  Version $TargetVersion will be uninstalled."
          }
          # The QGIS uninstaller sometimes leaves stuff behind that still prevents install
          Get-ChildItem HKLM:\SOFTWARE | 
                      Where-Object {$_.name -match "QGIS ?$TargetShortVersion"} |
                      Remove-Item -Recurse -Force 
    
          # AND it leaves behind dead, public desktop shortcuts
          if ( Test-Path "$env:PUBLIC\Desktop\QGIS $TargetShortVersion") { 
             Remove-Item "$env:PUBLIC\Desktop\QGIS $TargetShortVersion" -Recurse -Force 
          }
          $OrphanedLinks = Get-ChildItem "$env:PUBLIC\Desktop\" -Filter "*.lnk" 
          Foreach ($Item in $OrphanedLinks) {
             $LinkTarget = (new-object -comobject Wscript.Shell).CreateShortcut($Item.FullName).TargetPath
             if ($LinkTarget -match "QGIS $TargetShortVersion") {
                Remove-Item $Item.FullName -Recurse -Force 
             }
          }
    
          Write-Host "Uninstalling older QGIS version $TargetVersion. Please wait." -ForegroundColor Cyan
          $UninstallArgs = @{
             ExeToRun       = $TargetKey.UninstallString
             Statements     = '/S'
             ValidExitCodes = @(0)
          }
          $null = Start-ChocolateyProcessAsAdmin @UninstallArgs
          # The uninstaller starts another process and immediately returns.  
          Get-Process | Where-Object {$_.path -match '.*Temp.*chocolatey.*Au_.exe'} |wait-process
       }
    }
    
    # Finally, install.
    Write-Host "Installing QGIS can take a few minutes.  Please be patient." -ForegroundColor Cyan
    Install-ChocolateyPackage @InstallArgs
    
  • tools\chocolateyuninstall.ps1 Show
    $ErrorActionPreference = 'Stop'
    
    $AppShortVersion = ([version]$env:ChocolateyPackageVersion).tostring(2)
    
    [array]$key = Get-UninstallRegistryKey -SoftwareName "QGIS $AppShortVersion*"
    
    if ($key.Count -eq 1) {
       $UninstallArgs = @{
          PackageName = $env:ChocolateyPackageName
          FileType    = 'exe'
          SilentArgs  = '/S'
          File        = $key[0].UninstallString
       }
       Uninstall-ChocolateyPackage @UninstallArgs
    
       # The uninstaller starts an "Au_" process and immediately returns.  
       Write-Host "Despite the line above, $env:ChocolateyPackageName is still uninstalling.  Please wait." -ForegroundColor Cyan
       Get-Process | Where-Object {$_.path -match '.*Temp.*chocolatey.*Au_.exe'} | Wait-Process
    
       # The QGIS uninstaller sometimes leaves stuff behind
       Get-ChildItem HKLM:\SOFTWARE | 
                   Where-Object {$_.name -match "QGIS $AppShortVersion"} | 
                   Remove-Item -Recurse -Force 
    
       # AND it leaves behind dead, public desktop shortcuts
       if (Test-Path "$env:PUBLIC\Desktop\QGIS $AppShortVersion") { 
          Remove-Item "$env:PUBLIC\Desktop\QGIS $AppShortVersion" -Recurse -Force 
       }
       $OrphanedLinks = Get-ChildItem "$env:PUBLIC\Desktop\" -Filter "*.lnk" 
       Foreach ($Item in $OrphanedLinks) {
          $LinkTarget = (new-object -comobject Wscript.Shell).CreateShortcut($Item.FullName).TargetPath
          if ($LinkTarget -match "QGIS $AppShortVersion") {
             Remove-Item $Item.FullName -Recurse -Force 
          }
       }
    
    } elseif ($key.Count -gt 1) {
       Throw 'Multiple, previous installs found!  For safety, no uninstall will occur.'
    } elseif ($key.Count -eq 0) {
      Write-Warning "$env:ChocolateyPackageName $AppShortVersion has already been uninstalled by other means."
    }
    
    
    

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Dependencies

This package has no dependencies.

Package Maintainer(s)

Software Author(s)

  • OSGeo

Tags

Release Notes

https://qgis.org/en/site/forusers/visualchangelog218

Version History

Version Downloads Last updated Status
QGIS LTR (Long Term Release) 2.18.20.20180620 44 Wednesday, June 20, 2018 approved
QGIS LTR (Long Term Release) 2.18.20 79 Monday, May 28, 2018 approved
QGIS LTR (Long Term Release) 2.18.19 94 Tuesday, April 24, 2018 approved
QGIS LTR (Long Term Release) 2.18.18 62 Friday, April 13, 2018 approved
QGIS LTR (Long Term Release) 2.18.17 100 Monday, March 12, 2018 approved
QGIS LTR (Long Term Release) 2.14.22 73 Thursday, January 25, 2018 approved
QGIS LTR (Long Term Release) 2.14.21 91 Tuesday, December 19, 2017 approved
QGIS LTR (Long Term Release) 2.14.17 161 Monday, August 14, 2017 approved

Discussion for the QGIS LTR (Long Term Release) Package

Ground rules:

  • This discussion is only about QGIS LTR (Long Term Release) and the QGIS LTR (Long Term Release) package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or QGIS LTR (Long Term Release), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok