Hot answers tagged

3

You have a QGIS tag and in QGIS you can do: import os shapefolder = r'/home/bera/GIS/ok_riks_Sweref_99_TM_shape/oversikt/riks/' shapefiles = [os.path.join(shapefolder,f) for f in os.listdir(shapefolder) if os.path.isfile(os.path.join(shapefolder, f)) and f.endswith('.shp')] for shapefile in shapefiles: layer = QgsVectorLayer(shapefile, 'templyr') ...


3

Under Linux, from the command line, one can neatly use unoconv to batch convert the associated .dbf files into .csv streams, pipe it through head and extract only the file name and the first line, which contains the headers: apt-get install unoconv ls -1 */*.dbf |xargs -n1 -I{} sh -c 'echo {};unoconv -f csv --stdout {}|head -n1' The output will be similar ...


3

If you run a QGIS Processing tool from the toolbox, you can then open the Processing History dialog from the Processing menu. Clicking any item in the history will show you an equivalent Python command in the lower half of this dialog. You can then copy this command and paste into a Python script, which can be called directly from the terminal/bash shell. ...


3

Since your attempt to install MrSID "did not end well", you should get rid of the self-compiled stuff. It might be that your OS is too old to support current the LizardTech codebase. So remove everything that is self-compiled, and install GDAL and QGIS 2.14 from the ubuntugis-unstable ppa as long as they support trusty. If that works, upgrade to QGIS 2.18 ...


2

libltidsdk.so is a dependency. It should be a symbolic link to the current version called something like libltidsdk.so.20.0.0. If the symbolic link was broken during an update you can relink it using a method similar to here. Instead of libgdal.so figure out the needed link for libltidsdk.so. In my experience, dependencies break here and there for qgis and ...


2

If you are using python 3.6.7, for installing shapely you need to do: pip3 install shapely If you got an error and you use Debian or Debian derivatives distros you need to do first: apt-get install python3-pip as superuser (for other Linux distros you need to use equivalent command). By default: pip install shapely install shapely for your python 2.7....


2

(Wrote a comment about this and the OP said it was right, so I will put it here for other people to read as a answer) About the point that causes the different result: is it clearly inside the polygon? Is it right on the border of the polygon? I have had this issue sometimes with points that are right on the border of the polygon. For some reason, when ...


2

As touched on in the comments above, your distro has a very outdated version of the Qt libraries where required 3D functionality is not available. You need to update your distro to remedy this.


1

In the shell: cd /path/to/script/directory vi script_file_name In vi: :%s/XXXX/your_password/ :%s/XXX/your_login_name/ :wq In the shell: ./script_file_name


1

The older version of OpenJPEG was installed with cmake. I gathered that GDAL's shared objects from OpenJPEG (expecting v2.3.0) were misplaced since the install but it wasn't initially obvious where the v2.1.0 files were, how to remove, or update the links. Luckily, cmake creates a file called install_manifest.txt to keep track of its installed files. I ...


1

Assuming you want to use PyQGIS python scripts to automate your workflow, you could do something like the following (roughly based on what I do for automated testing of a QGIS 3 python plugin in my Travis CI setup): export PREFIX=/usr # for a standard install, I also use PREFIX=$CONDA_PREFIX if I've installed into an activated conda env export ...


1

As people wrote, OSGEO4W shell is the way to go, there is on the path a lot of geoprocessing tools, if not all, that is used internally inside QGIS. One must that you should really take a look is gdalwarp, it may be used to a big variety of raster operations like reproject, change format extensions, pixel value, and the list goes on and on. see reference ...


1

This permissions' issue was caused by the flatpak versions of QGIS and PyCharm, installed directly from the linuxmint Software Manager. I realized this because the QGIS folder was: /home/USER/.var/app/org.qgis.qgis/data/QGIS/QGIS3/ instead of: /home/user/.local/share/QGIS/QGIS3 Sandbox permissions of flatpak intend to isolate apps from each other in ...


1

We can do one error at a time: Warning: The target file has a 'nc' extension, which is normally used by the GMT, netCDF drivers, but the requested output driver is GTiff. Is it really what you want? If you don't want a geotiff output, which is the default. You need to set a format so add: -of GMT It might be a vector file as well as suggested in the ...


1

Alternative to building from source. Issue: with the QGIS install instructions (assuming I followed them correctly) - it was unable to find the python3-qgis package. Solution: basically use a different mirror than what the install recommends. Starting from a fresh Raspbian Stretch with Desktop install. Run: sudo apt-get update Run: sudo nano /etc/apt/...


1

So the command which worked for me is the following: screen -L sudo mapproxy-util serve-develop mapproxy.yaml -b 0.0.0.0:8010


1

It turns out that this was not an issue with OpenDroneMap. My computer ran out of physical memory. Deleting/moving other files freed memory and allowed me to finish the reconstruction.


1

I'm late to the party and don't have enough reputation to comment on the accepted answer, but I want to add a bonus. You can avoid the two-step process with the intermediate VRT file by using the /vsistdout/ and /vsistdin/ Virtual File Systems and piping the initial command's VRT output to gdal_translate. gdalwarp -t_srs epsg:3857 -te -8527009.1 4762026.9 -...


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