Hot answers tagged

115

selimnairb's answer is close but you wont have the headers unless you've installed libgdal-dev: sudo apt-get install libgdal-dev with that done, export CPLUS_INCLUDE_PATH=/usr/include/gdal export C_INCLUDE_PATH=/usr/include/gdal and then pip install GDAL The compilation ran to completion and I have GDAL in my virtual env. Phew! (edit 2018) Note: To ...


85

The instructions on the QGIS download site are not as intuitive as I'd like, but they do work when you know the command syntax: First, what version of Debian Linux (Ubuntu / Mint) are you running? The Ubuntu Codename of your APT repository will depend on the version of the OS and which version of QGIS you can run. QGIS 3.10/14 will run on Ubuntu 20.04 (focal)...


48

To create SVG symbols with modifiable fill color, stroke color and stroke width in QGIS, you should replace the style attribute from the path element with these 3 attributes: fill="param(fill) #FFF" stroke="param(outline) #000" stroke-width="param(outline-width) 1" If you are using InkScape, after writing the new SVG file, edit the file and replace the ...


35

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo apt-get update If you already have qgis installed: sudo apt-get upgrade If you don't already have it: sudo apt-get install qgis


35

It looks like there actually is Xenial support in the debian repository and although I haven't tried the following solution myself I guess it is worth a try. Before trying the following I would uninstall all previous qgis packages using sudo apt-get remove qgis python-qgis qgis-plugin-grass and remove deb http://qgis.org/debian wily main and deb-src http://...


35

Based on old notes, the following seems to work: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 51F523511C7028C3 -- Update -- As of August 2020: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F7E06F06199EF2F2


21

Got the same problem on Linux Mint and finally fixed it. The problem is that you've installed a few python libraries and one of them is a dependency of QGIS. QGIS ~2.18 works fine with Scipy 0.17, and after upgrade this library to the newest version you have 0.19. QGIS won't load with 0.19 because libqhull error. All you need to do is downgrade, simply: ...


19

After following a subset of this advice, this is how I got the Python GDAL 1.11.0 (the solution should be version-independent, see below) install to work on Ubuntu 14.04 with pip: Install dependencies: sudo apt-get install libgdal-dev libgdal1h pip install by passing along the include path (prefix with sudo for system-wide install) and instructing pip to ...


17

I was also following the OP's installation method of PostgreSQL and PostGIS, namely sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib-9.4 I enabled the PostGIS extension in a database but didn't get shp2pgsql to work until I did sudo apt-get install postgis as listed toward the bottom of the page. Why postgresql-9.4-postgis-2.1 ...


15

Installing Python package gdal into virualenv on Linux GDAL provides nice toolkit for GEO related operations. However, installing it to virtualenv on Linux is not trivial task. This recipe describes, how to do that. note here I use lowercase gdal for Python package and upper case GDAL for general system wide library. Requirements allow using ...


15

Following the advice at the postgis-users maillist it was possible to identify the existence of outdated ligbeos libraries as the source of the problem: $ locate libgeos_c.so /usr/lib/libgeos_c.so /usr/lib/libgeos_c.so.1 /usr/lib/libgeos_c.so.1.8.2 /usr/local/lib/libgeos_c.so /usr/local/lib/libgeos_c.so.1 /usr/local/lib/libgeos_c.so.1.7.1 /usr/local/src/...


15

Going from what @user30184 said in the comment. This issue is that the gdal2tiles.py script tells gdal to output 'mercator' as EPSG:900913. This is fine as long as it knows how to convert to this. The fix is to change the following line in gdal2tile.py (line 785): if self.options.profile == 'mercator': self.out_srs.ImportFromEPSG(900913) to: if self....


14

At present ArcGIS Desktop is not supported on the Linux platform but you can install Server platform software on Linux such as ArcGIS Server. Updated :- For more details please check Similar question: ArcGIS for Desktop on Linux? See also Desktop GIS for Linux (in Linux Journal)


14

In https://gis.stackexchange.com/questions/158457/gdal2tiles-how-to-make-filenames-of-tiles-to-represent-xyz-coordinates, somebody mentions doing: sudo ln -s /usr/lib/libproj.so.0 /usr/lib/libproj.so Which absolutely fixed the same error (ERROR 6: Unable to load PROJ.4 library (libproj.so)) for me. On the x86_64 architecture you may need to use this ...


14

I suspect you'll get a lot of subjective answers to this question, but here's some (hopefully objective!) points to keep in mind: running Linux natively will always be faster than running it in a virtual machine, so dual booting will be the faster option if you want to run under Linux Linux filesystems are usually much faster than Window's (source: the ...


12

For easier installation the module is in the repositories: sudo apt-get install python-shapely From the directory you said, you've installed the module in a non standard place and not in a path that is being watched by python. To check which paths are currently active you can issue the following from within the python interpreter: import sys print sys....


12

Since you have PostGIS 2.1.1 you're ahead of the game. Make sure you have wget installed, it is what will download the data from the Census FTP site. Create a gisdata directory with: sudo mkdir /gisdata Use chown and chgrp commands to change the ownership and group of /gisdata so that your normal user can read and write to /gisdata. Start psql and ...


11

Try the following commands from a command line: sudo add-apt-repository ppa:johanvdw/saga-gis sudo apt-get update sudo apt-get install saga The problem may be that synaptic has not updated it sources because the signing key was not imported. This should be the most easy way to fix that error. [update] It seems the wxwidgets package for raring was uploaded ...


11

You can specify the platform in your APT line with [ arch=amd64 ]: deb [ arch=amd64 ] https://qgis.org/ubuntu/ focal main Source : https://unix.stackexchange.com/questions/272908/apt-looking-for-i386-files-even-though-architecture-is-amd64 You might need to add the key from the qgis.org server: wget -O - https://qgis.org/downloads/qgis-2019.gpg.key | gpg ...


10

I had similar issue. Found that the problem could be due to the following possibilities: When you set up the QgsApplication, the PrefixPath must be done correctly. My QGIS was installed on /usr/share/qgis. But somehow I need to set the PrefixPath as "/usr" & not "/usr/share/qgis": QgsApplication.setPrefixPath("/usr", True) The path of the .shp ...


10

A quick way to check is to type which qgis - it will give you the path as was stated above: /usr/bin/qgis


10

By now, ubuntugis-unstable has added trusty packages for QGIS 2.2 and GDAL 1.11. Unfortunately, libgdal-ecw-src is still missing, and the available versions for raring and precise are intended for GDAL 1.10. However, I got it working (with some help from the qgis user mailing list): Add ubuntugis-unstable for trusty to the sources list, or Ubuntu Software ...


10

According to ubuntugis documentation. "A convenient new command is available for adding Launchpad PPA (Personal Package Archive) repositories via the command line: add-apt-repository." For the stable PPA: sudo add-apt-repository ppa:ubuntugis/ppa Add this PPA and remove from /etc/apt/sources.list the sentences: deb https://qgis.org/ubuntugis/ bionic main ...


9

Yes, doing the following before running PIP appears to work: export CPLUS_INCLUDE_PATH=/usr/include/gdal export C_INCLUDE_PATH=/usr/include/gdal


9

It seems worth providing a simple answer about the basics of SVGs to go alongside the details provided here about specifics around software... An SVG file is just a text file. The file ending will be .svg but it can be opened in a text editor the same as a file with the ending .txt A simple svg file looks something like this: <svg width="580" height="...


9

The Ubuntu and UbuntuGIS repositories really do lag very far behind the latest release of QGIS, so the best thing is to download directly from qgis.org. Here is perhaps the simplest way to do this, assuming you already have Ubuntu Software Center: Open Ubuntu Software Center, go to Edit -> Software Sources -> Other Software -> Add, and then in ...


9

After several wrong ways, including multiple reinstall of libproj0 package and even installing QGIS from sources different from the Ubuntu Software Center default (I think it's from the official QGIS repository - http://qgis.org/debian trusty main), I understood how to apply advice by @EvilGenius: ldd ogrinfo didn't show libproj no matter how many times I ...


9

I get the same error with the Ubuntugis version of QGIS and GRASS version 7.2.0. It seems that 7.2 is not yet correctly adopted in processing. There is already a ticket for it: https://hub.qgis.org/issues/16019 and https://lists.osgeo.org/pipermail/qgis-developer/2017-January/046671.html As a workaround, you may edit (as sudo) /usr/share/qgis/python/...


8

In Project Settings, you can specify if absolute or relative paths should be used. Dropbox can be a good solution if your files don't grow too big for the free data plan. If you provide more information about your requirements, we might be able to offer different solutions.


8

you need to add the ppa of ubuntugis first. From commandline: sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo apt-get update the add the following line to the file /etc/apt/sources.list (you can also use the sofware center for that) deb http://qgis.org/debian-nightly precise main then install qgis sudo apt-get update sudo apt-get ...


Only top voted, non community-wiki answers of a minimum length are eligible