New answers tagged


Yes. You can run from the command line on one file like this: grass --tmp-location foo.tif --exec bash -c "r.external input=foo.tif output=foo; foo" And if you have many, I would suggest using GNU parallel ( Perhaps something like: parallel --bar "grass --tmp-location {1} --exec bash -...


If you have rename installed on you system, you can also use: rename oldname newname oldname.* or if you prefer a regex: rename 's/oldname/newname/g' oldname.* If you don't have rename, you can install it with your package manager, e.g. apt: sudo apt install rename


Here is my little tool to "move shapes" coded in Perl. If more "sidecar files" show up, append them to the line. # Shape file extention candidates + so called side car files my @ext = qw(shp shx dbf prj sbn sbx fbn fbx atx ixs mxs cpg); May be it is a little bit noisy in terms of output. #!/usr/bin/env perl # -----------------------------...


Expanding from this answer it is possible to do for f in oldname.*; do mv -- "$f" "newname${f#oldname}" done


Newer versions of GDAL now have a -json output which can easily be parsed with jq. For example gdalinfo -json file.tif | jq -r .cornerCoordinates.upperLeft


This should work in Ubuntu 20.04: export GISBASE=/lib/grass78/ export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib if [ ! "$PYTHONPATH" ] ; then PYTHONPATH="$GISBASE/etc/python" else PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH" fi export PYTHONPATH export GIS_LOCK=$$...


I suggest that you read the documentation on the GRASS Wiki page. There are several steps needed to set up the GRASS environment. My answer will mostly be some copy/paste of this page in order to avoid a "link only" answer. # Example in bash shell syntax: # path to GRASS binaries and libraries: export GISBASE=/usr/lib64/grass78 ...

Top 50 recent answers are included