Questions tagged [command-line]

A string of text that acts as a command, typed at an interface prompt.

6
votes
1answer
5k views

What is the “command line” in QGIS?

I am trying to follow advice here on Stack Exchange [for converting or using .e00 files, although that is not the point of this question]. In the meandering path of search results, I keep seeing ...
5
votes
1answer
397 views

ogr2ogr won't read directory of GeoJSON into GPKG

I have a directory of GeoJSON files, which I want to load as layers into a single new GeoPackage file. According to the GDAL GeoPackage documentation, I can name my destination GeoPackage file, enter ...
1
vote
1answer
667 views

Launching QGIS from the command-line

When I run qgis (version 2.14) from the command line in Ubuntu 14.04 LTS I get a Segmentation fault (core dumped) (detailed error messages included below). However QGIS opens and runs perfectly when I ...
1
vote
0answers
27 views

Dissolve polygons from layer1 witch overlaps with polygons of layer2 using GRASS

I want to dissolve polygons from layer1 witch overlap with polygons of layer2 keeping attributes table of layer1 and using command line. What I've done : v.in.ogr -o input=original_plygons output=...
2
votes
0answers
54 views

String together multiple commands at command line - Qgis

I am using the command line to export images from Qgis. is there a way to export a series of images in a single command? It takes a while for the data to load each time. I have tried simply including ...
1
vote
1answer
424 views

How to export a 16bit image from QGIS via command line?

I export portions of a height map from Qgis using the command line. The options are path, resolution and extents, but it exports an 8 bit image. I am getting terracing because of this. Is there a way ...
1
vote
2answers
1k views

Error when using gdal_calc.py

I'm trying to perform some raster calculations (ex:A+B, A*(A>0)) using gdal_calc.py, but I'm stuck with an error when I try to make this simple test command: import subprocess import sys ...
2
votes
1answer
377 views

How to connect QtDesigner with python console on QGIS

I've created a script with python console on QGIS and an interface for my plugin with Qt Designer with QGIS 2.14.0 custom widgets. I would like to connect my sript with the interface but I can't find ...
1
vote
1answer
330 views

How to extract MODIS QA informaton

I want to use the LDOPE tool unpack_sds_bits to extract the bit information from the State QA layer of the MYD09GA Aqua Surface Reflectance product. However, I have never run a command line before ...
2
votes
0answers
499 views

Unable to compile using make test(windows)

While trying to compile my test plugin I encounter this error. At the moment i can't figure out why it isn't working. I m using a windows and try to execute the command in OSGeo Shell. I typed in ...
1
vote
2answers
1k views

Gdal_calc.py problems from command line?

I hope someone can help me with this issue with gdal_calc.py. When I call gdal_calc.py from the command line, I get the following error (after displaying the error message I will describe my current ...
-2
votes
2answers
11k views

Postgres error: fatal role “username” does not exist [closed]

I by mistake installed PostgreSQL twice, uninstalled one, and now I am trying to create a new PostGIS connection in QGIS but receive the following error when testing the connection: fatal role "...
2
votes
1answer
1k views

Using Panoply command line scripts

I have been using Panoply for a while now, and I noticed that you can export a command line script to reproduce the figure. If I look at the first lines of the script, it tells me that I should run it ...
1
vote
1answer
89 views

Batch clipping Shapefiles using Argparse

Is there a way to batch clip shapefiles in ArcPy using an argument-Argparse (which calls a shapefile or group of shapefiles) specified by an outside user in command line?
3
votes
1answer
62 views

Globbing in Windows to process images - how do bash loops look in DOS?

I'm doing some batch image processing with imagemagick on OSX using this line: for file in $(cat all.txt); do convert -crop 50X50@ +repage +adjoin "$file" "$file"_tile_50x50@_%d.jpeg; done It takes ...
3
votes
1answer
1k views

GRASS 6.4 Reinstallation for Ubuntu

I need to reinstall GRASS 6.4 on this Ubuntu computer due to compatibility issues. I had installed GRASS 6.4 a few weeks ago to work with a simulation program. I used the command apt-get install ...
2
votes
1answer
214 views

How can I get a shapefile of coverage from the Planet Labs scenes API?

I'm using the Planet Labs Scenes API and need to get the results of a (large) search I'm making as a shapefile. Any hints on how to go about it? I'm comfortable with command line tools like the ...
1
vote
1answer
811 views

Is there a way to create an mxd from the command line?

Is there a way to run ArcMap in a batch script to create a basic mxd containing specified layers? Something like: "Path to ArcMap exe" -create "Path to new mxd" -include "layers to add"
1
vote
1answer
338 views

How to export to KML from Spatialite command line

The Spatialite GUI can export a Geometry column to KML file. How would one go about doing that from the Spatialite command line? I am looking for an example code preferably - the .help doesn't mention ...
3
votes
1answer
1k views

Creating GeoTIFF from TIFF using GDAL?

I have a tiff image and I would like to georeference it, and so create a Geotiff. To do that, I have to use GDAL. I use in particular, the executable store in the QGIS file (gdalwarp.exe, ...
1
vote
0answers
71 views

Is it possible to interact with a running instance of QGIS from the command line?

I just started looking at QGIS on MacOSX. I installed the MacPorts package and found the executable: /Applications/MacPorts/QGIS.app/Contents/MacOS/QGIS* Unfortunately it appears that the command ...
2
votes
1answer
749 views

Couldn't Excute command line PostGIS pgsql2shp

I am using postgres 9.3 with postgis 2.1 on Ubuntu 14. When I tried to dump pgsql table using pgsql2shp, I get the following error. Error: pg_wrapper: pgsql2shp was not found in /usr/lib/postgresql/...
8
votes
2answers
4k views

Using PyQGIS, ArcPy, NumPy, SciPy Together in Windows Command Prompt

I ran across this slight issue when I was looking to access python installations from ArcGIS, QGIS, Anaconda (cited because SciPy & NumPy come with it), and version 2.7 vs 3. Sometimes, I find it ...
3
votes
2answers
2k views

How to convert CSV file in VRT

I use the gdal executable in QGIS file, with a DOS command. I have a csv file like this (test.csv) : X Y -5.48 42.81 -4.78 42.52 -5.06 42.02 This coordinates are GCP. I would like to ...
3
votes
1answer
853 views

Clip multiple .las files data to polygon shapefile using FUSION

I followed this thread in order to clip .las data based off of a polygon shapefile. However I have over 100 .las files I need to clip based off of this polygon and merged into a single .lasd file and ...
0
votes
1answer
718 views

Create blank table from unix shell

I am in the middle of trying to create my first PostGiS database and seem to be running into problems developing scripts to automate importing the various spatial formats so I can use them in my ...
3
votes
1answer
1k views

Unable to compile using make test in Linux

While trying to compile my test plugin I encounter this error, for the moment I can't figure out why, last week I had some issues on windows but eventually solved them via OSGeo Shell but this time ...
1
vote
3answers
4k views

Subtracting rasters using gdal_calculate command?

How do I subtract two raster using gdal_calculate command? Note that gdal_calc is different from gdal_calculate.py. The rasters I am using have different dimensions.
1
vote
0answers
475 views

Unable to call GDAL functionalities from Python

I am trying to call GDAL functionalities from the following script I made in the past. import os, fnmatch from subprocess import call call("dir", shell=True) # define the variables inFolder= os.path....
3
votes
1answer
118 views

ogr2ogr window closes after termination

I'm using ogr2ogr for export from PostGIS to FileGDB. It works fine, but after termination the command window closes immediately. Is there a way to keep it open and get some kind of message or report ...
1
vote
1answer
675 views

Unexpected closing of mxdperfstat tool?

I'm trying to test an mxd with mxdperfstat. I want to test several scales, but as soon as I provide a scale over 500, the program simply quits. No Error warning. It just stops working. If I provide ...
1
vote
1answer
151 views

How to add grass64 to PATH variable

I recently installed GRASS 6.4 in a Unix environment. The application opens fine, but I would like to also be able to run the GUI from the command line. The tutorials says that the grass64 command ...
4
votes
1answer
2k views

Convert GeoPDF with GDAL

I'm attempting to convert a USGS US Topo GeoPDF in Windows. I'm using GDAL 1.11.1. My initial attempts were with this Python script, which automates the process by feeding a command to the Windows ...
1
vote
1answer
291 views

Need to quickly know (CLI) whether point lies inside polygon

in my app I am parsing an XML from the web which gives me such coordinate info: I am able to use my app to get a pair of float values like 14.871381 and 50.065968. I do not want any complicate ...
2
votes
2answers
416 views

Adding dynamic text to ArcGIS map documents

I've been making some map layouts and just noticed this command: < dyn type="document" property="name"/>.mxd It make possible to change automatically my current file name: http://prntscr.com/...
1
vote
0answers
317 views

How to run cmd prompt in the background and show progress bar

I am warping files using gdal. Since I have numerous files to warp how will I run the cmd in background and just have a progress bar to indicate the percentage in warping the files? Because when I ...
1
vote
1answer
822 views

Interacting with GRASS GIS vector map topology “level/layers” from terminal/command line? [closed]

Can anybody assist in the simplest form of code to call on command line to "export topology" (which is level 2 information in GRASS) as separate spatial data, as explained below? I have imported cad ...
0
votes
0answers
61 views

Running ILWIS commands from DOS (cmd) prompt?

ILWIS commands from DOS (cmd) prompt I am able to run MapDrainageNetworkExtraction from ILWIS's command prompt interface. However, I now want to run it from a DOS (cmd) prompt like this: C:\Program ...
1
vote
0answers
230 views

Contour command in Spatial Ecology's GME

Has anyone been successful using the contour command from GME (Geospatial Modelling Environment)? I'm trying to create contours out of a DEM. I know you can do it in ArcGIS with 3D or Spatial Analyst ...
1
vote
0answers
288 views

Command-line tool for writing a print-composer to file?

I'm looking for a command-line tool, to write a previously generated print-composer to an image-file. The following resources I already saw: Related questions (1, 2) A gist Nevertheless, all them ...
1
vote
2answers
163 views

GRASS GIS: auto-completion fails in commande line

I'm running GRASS GIS 6.4.3. on Win 7, SP1, 64 bit. The path to my grass-DB is: D:\grassdb Within the GRASS GIS Commande Line, if I press the tab-key to auto-complete only folders, files and ...
1
vote
2answers
670 views

How can I store shapefile in PostgreSQL database as a table using PHP?

I want to create a table from a shapefile in PostgreSQL. To do that, I can run this command in cmd: shp2pgsql -s 4326 -W LATIN1 E:\Any\THA_adm public.test123 | psql -h localhost -d DATA -U postgres -...
1
vote
2answers
672 views

how to start qgis with --configpath option on windows

how can I start QGIS on Windows 7 with the --configpath option? I'm used to work with Linux where this procedure is very very simple (just write in a terminal qgis --configpath) with all the options. ...
0
votes
0answers
72 views

Is it possible to compile a grass addon into a commandline app?

As the title says, I'm wondering if it's possible to take the source of a grass add-on and compile it into a commandline app. Or, alternatively, use the add-on in a python program. Basically, I don'...
1
vote
0answers
50 views

Can an external application start ArcCatalog.exe and immediately navigate to a specific folder?

I'm looking something similar to explorer's command line switches: explorer.exe /select,c:\examples\condensed\need\obtains\dispute\under\billion\floor or explorer.exe /e,c:\examples\condensed\need\...
3
votes
3answers
746 views

Applying specific Rendering to Raster and export to JPEG?

We have a specific process which generate an interpolated single band 32-bit Float Raster in Erdas Imagine (.IMG) format. This process generates an image every hour. We wish to apply a specific ...
1
vote
2answers
1k views

Osmconvert command-line window closes when I press Return

I am dealing with Open street map Data. I want to convert some of these .o5m files to .osm format so that I can process them in QGIS. So, I have downloaded Osmconvert to run on my Windows XP ...
0
votes
0answers
97 views

QGIS crashes on exit()

Here his my test code import os print("in qgis, quitting") os.sys.exit() When i execute it in QGIS2.0 with line qgis --nologo --code q.py it shows an error on line 3 os.sys.exit() Can you tell me ...
-1
votes
1answer
701 views

d.rast problem in GRASS command line

In response to @gene I type d.mon in command line, getting a popout GUI look like this: I choose the top three flags(-l, -L, -p), and I got this: And I don't know what to type in 4 blanks below: ...
1
vote
1answer
222 views

g.list problem in GRASS command line

I am using GRASS 6.4.3 (installed with osGeo4w), and I have this question: As I type g.list, a function window will pop out, and all functions and results are fine. But when I type g.list rast, I got ...