Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shell]

A shell is a command-line interpreter that provides a traditional user interface for the Unix-like operating systems or environments such as BSD, Linux, Mac OSX and Cygwin.

3
votes
2answers
108 views

Call QGIS geoprocessing tools from command line (terminal, bash-script)

Is there any possibility to call tools found in the QGIS processing toolbox from the command line, other than using python? It is my understanding that if you use any GDAL tools, the QGIS gui is ...
1
vote
1answer
44 views

Unable to execute Processing nativecentroid in python standalone scripts using PyQGIS

I am using QGIS 3.2 on Windows7. I had successfully set all enviroment variables in OSGeo4W shell. I have run small scripts without any issue. I have to run processing.run('native:centroids', {'...
1
vote
1answer
89 views

PDAL works in Windows command but not in OSGeo4WShell?

I want to import a pointcloud into a PostGIS database. AFAIK you accomplish this with PDAL which comes with OSGeo4W. I was following this tutorial: OSGeo4W LiDAR tutorial and also this tutorial PDAL....
1
vote
1answer
150 views

Avoid Python conflicts with the system environment (in Windows)

When are you new to QGIS and PyQGIS what works in the background you might be confused by the different Python Interpreters and customization by settings so called environment variables. How do avoid ...
0
votes
2answers
781 views

Use OSGeo4W shell command from python 2.7 script

I would like to convert jp2 files (sentinel-2) to geotiff format using python 2.7 on win 10. I saw some solutions using python and GDAL but they did not work for me. The only thing that did work was ...
2
votes
1answer
420 views

OSGeo4W Shell 'Command not found'

I have a sh script that I want to use to process raster files. eg #!/bin/sh # my first script, # copyright, year, Author r.mask -r for file in A*chlor_a_4km ; do echo "map: $file" ...
2
votes
2answers
501 views

Handle two versions of GDAL

I want to use two different GDAL versions on my Ubuntu 16.04. I installed GDAL via the UbuntuGIS ppa and via anaconda. My GDAL for python works fine, but when I want to use gdal_translate via the ...
0
votes
1answer
20 views

Working with Shell script and GRASS

So reading this GRASS/Shell documentation I decided to test my own for repeat using this lines CATS="(v.db.select -c map=training columns=cat)" echo $CATS for i in $CATS do where="cat = $CATS" ...
1
vote
0answers
71 views

GRASS within QGIS - can I access grass modules through shell?

I have QGIS/GRASS installation and I would like to do my process workflow through shell in Ubuntu. It is raster vectorisation -> selection by value -> saving as shp. I have done first step by gdal ...
0
votes
0answers
79 views

How to write a command in shell script to install GRASS extension?

I have a script shell (UBUNTU 14.4) installing an environment for batch processing in PYTHON. It installs GRASS like this : echo ' installing PYTHON-GDAL ' echo '-------------------------------...
1
vote
2answers
105 views

Installing grass extension through shell script

I wanted to install an GRASS extension through a shell script but, upon execution it says: You don't have permission to install extension to . Try to run g. extension with administration rights (su ...
1
vote
1answer
56 views

Shell script errors

So I am working with shell script on Ubuntu Linux and I'm trying to create a script that calculates the ndvi of 2 rasters using Grass GIS, but that is not the problem. The problem is that every time I ...
0
votes
2answers
440 views

Adressing files/directories in ogr2ogr using OSGeo4W shell? [closed]

I want to convert a .pbf-file (freiburg-regbez-latest.osm.pbf) into a SpatialLite Data Base using ogr2ogr. The file is located at W:\geodaten\UG I open OSGeo4W.bat in the directory C:\Program Files\...
5
votes
2answers
5k views

Merging all tiles from one directory using GDAL

I would like to use GDAL (under Windows; OSGeo4W Shell) to merge all GeoTIFFs from one directory into a new GeoTIFF. I have tried to address them by writing c:\data\....\*.tif which however does not ...
5
votes
1answer
552 views

Startup/Shutdown script for ArcGIS Enterprise?

I am after a startup/shutdown script for the newly named ArcGIS Enterprise at 10.5. This is my home machine, where I have installed ArcGIS Server, ArcGIS Data Store, Portal for ArcGIS and also ...
3
votes
1answer
572 views

How to access the terminal in Grass 7.0.4?

Just installed Grass 7.0.4 via " Download GRASS GIS for MS-Windows: Stand Alone Installer (64 bit)". It's been many many years since I last used Grass, I recall on my old computer there a start menu ...
0
votes
1answer
2k views

How to supply user and password to download USGS data with wget?

I think that http://e4ftl01.cr.usgs.gov/ has recently applied a login and pass authentication to retrieve data. my script was working before, but now it comes with an error HTTP request sent, ...
0
votes
2answers
71 views

GRASS iterate over multiple shapefiles using g.region

I have a shapefile called Ahmednagar. I have daily rainfall data from 1997 till 2008. I want to sum total rainfall from 152 till 273 day for each year for 1997 till 2008. This is how I do it. g....
1
vote
0answers
78 views

OS X Yosemite: copy / paste into shell GRASS 6.4.4. within QGIS 2.14.0

I want to know How to copy/paste into GRASS 6.4.4. shell within QGIS 2.14.0. I'm working with OS X Yosemite and the right mouse button doesn't work neither shortcut (cmd+c/cmd+v)
4
votes
1answer
236 views

How to resolve error when launching OSeo4W Shell: Windows cannot find .bat file?

I downloaded and installed OSGeo4W to use ogr2ogr, but the the program OSGeo4W will not run. On launching the shell, I receive an error stating the .bat file cannot be found in specified directory (...
0
votes
1answer
76 views

QGis's Geoferencer plugin isn't able to paste text that has been added to clipboard via mac's “pbcopy” terminal command [closed]

I recently wrote a little script that used mac's pbcopy shell command to dump some text into my clipboard for use in the QGis program. For some reason I'm not able to paste stuff that has been pbcopy'...
2
votes
1answer
77 views

GRASS PyWPS Create a new vector map from user selected polygon

My goal is to select a specific polygon in which the user clicked and make a new vector map that contains only the selected polygon. I see two ways: Convert XY coordinate from literal input to a ...
13
votes
2answers
16k views

What is OSGeo4W?

I have been using GIS for a few years now (ArcGIS and MapInfo). But only when I have started using QGIS I come across OSGeo4W, as there is an option to download it on the QGIS website. I have tried ...
1
vote
0answers
302 views

TransCAD file format for matrix data

I've never used TransCAD before. I have what I believe to be a TransCAD matrix file called data.mtx which I would like to be able to convert to some other file formats. I would prefer to do this at ...
3
votes
1answer
113 views

Redirect remote shell command output to ArcMap geoprocessing tool display?

I have a Python script that runs a shell command on a remote server (using the Fabric module). When I run the tool in the debugger, I see all the output scrolling, as the command can take hours to ...
3
votes
1answer
97 views

GDAL can i try to create a workflow?

When i try to compose a workflow im confused to the funcionality of that. I want to create a workflow to execute commands gdal. what syntax I can use if I wanted to create a .bat file? For example ...
1
vote
1answer
566 views

How to create shadows of buildings with r.sunmask?

I need to create image-raster with shadow of relief and shadow of buildings in one. I know how to create shadow of relief but how i can create shadow of buildings with r.sunmask? I dont know how from ...
0
votes
2answers
78 views

Shell/GRASS: Exit loop upon raster value

I am running a loop from a shell script in GRASS GIS 7. Basically, values are subtracted from a raster in each step. I want the script to stop/exit if any of the raster values is 0 or less. Is there a ...
1
vote
1answer
875 views

How to convert SPOT NDVI hdf file to tiff file using gdal_translate command

I have SPOT NDVI images. I want to convert NDVI hdf to tiff. I have used the following code to get the information of hdf file: gdalinfo 20060501_NDVI.HDF I get the following output Driver: ...
2
votes
1answer
1k views

Run OTB commands in OSGeo4W Shell scripts

I am trying to run shell scripts with Orfeo-toolbox commands, and I'm new to all this.... (I'm working in Windows 7). I can type otbcli_ComputeImagesStatistics -il Imagery/P1_10cm1.tif Imagery/...
3
votes
2answers
566 views

QGIS GRASS shell commands not working in Yosemite

First time asking a question here. Running GRASS 6.4.3 within QGIS 2.4.0 on Mac OS 10.10 Yosemite. I'm trying to run v.net.iso within the GRASS shell, but the following error is returned every time: ...
2
votes
2answers
616 views

shell script ogr2ogr export

I'm writing a simple script to export postgis data to geojson. The ogr2ogr command works well, but I'm having problems when I'm passing the parameters. #!/bin/bash echo 'enter country code' read ...
2
votes
1answer
183 views

repeating steps in GRASS r.mapcalc

I simply cannot find out the following: I want to repeat a calculation in GRASS GIS several times. Is there a command for r.mapcalc to repeat a calculation x times (similar to this possibility in r....
1
vote
1answer
33 views

Is my code for changing the resolution correct?

I have a raster files of daily minimum temperature (tmin) for the period 1962-2011 at a resolution of 1.125. I need to convert each single day raster file into 0.5 using inverse distance interpolation....
1
vote
0answers
46 views

GRASS 6.4.2 define Geographic boundaries using MSYS

I am working with daily gridded rainfall data of 50 years. The initial data had the extension .nc.gz.tar which I have unzipped using MSYS in GRASS 6.4.2. Now I have 365*50 days of daily data. My ...
1
vote
1answer
181 views

Calling GRASS 6 in GRASS 7 (shell)?

I am running a shell script for batch processing in GRASS 7 (calling it with sh [...sh] in the command line window), which creates a series of rasters through classifications, raster calculator and ...
0
votes
0answers
27 views

Possible to automate Buffer Wizard in ArcGis 10.x by working in the Shell? [duplicate]

I'm trying to automate the Buffer Wizard since I have several large sets of the data that I need to buffer at multiple distances. Doing it by hand will take a long time and be quite tedious, but I've ...
8
votes
1answer
2k views

Converting WMS getmap request to Geotiff

I'm accessing a WMS server that doesn't provide geotiff as one of the format capabilities, but does provide PNG and KMZ. http://tds.marine.rutgers.edu:8081/ncWMS/wms?SERVICE=WMS&REQUEST=...
0
votes
2answers
74 views

Making development patterns more efficient with ZSH

A common pattern I find myself encountering is converting a CSV to a projected GeoJSON as described here. That entails 3 steps, and I'd like to get it down to the following: GEOIFY {file} {...
0
votes
1answer
159 views

GRASS has broken my terminal

I'm using GRASS on OS X. After installing GRASS I can no longer open my terminal to a prompt. On opening the terminal, the following line runs by itselt '/Applications/GRASS-6.4.app/Contents/MacOS/...
5
votes
1answer
889 views

How to get started with GRASS shell?

I'm a beginner in programming but i have to work with GRASS at work, and do it quickly. I'm completely lost with all the variety of tutorials that are existing and to me, don't look the same...and ...
3
votes
1answer
7k views

How to use QGIS from command line on Windows

I have QGIS running on a windows operating system. I am willing to use QGIS from command line to follow this procedure. Unfortunately, i cannot manage to have qgis declared in the command windows. I ...
3
votes
1answer
564 views

st_clip and gdal_translate: “Error browsing database for PostGIS Raster properties” - Why?

Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It ...
4
votes
1answer
503 views

Personal shell launcher for PyQGIS

I have changed a shell launcher found at http://inasafe.linfiniti.com/html/id/developer-docs/platform_windows.html as to fit my wish: setting the system environment variables to be able to use PyQGIS ...
6
votes
1answer
3k views

How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
1
vote
1answer
8k views

ImportError: 'No module named pyproj'

I'm running Mac OS X with native Python 2.6.1 installed. Later today installed GDAL complete pkg, and added the program to the shell path on the terminal with the folowing cmd: ~: echo "export PATH=/...
1
vote
1answer
431 views

Shell script commands

I have this shell script: #!/bin/sh r.mapcalc water = 120 d.rast water i=1 while [ $i != 100 ] do n=1 while [ $n != 10 ] do r.mapcalc < water.mapcalc d.rast ...