Skip to main content

Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

.mode column results in strange output with spatialite

I'm currently experimenting with SpatiaLite because I plan to eventually use it to programmatically generate a geodatabase from an API I have subscribed to. I already have sqlite3 available as a ...
user32882's user avatar
  • 3,544
0 votes
0 answers
46 views

Esri shapefile converter to PDF/picture format

is there any converter that can convert Esri shapefiles into PDF or some image format such as JPEG or PNG? My organization has dbf, prj, sbn, sbx, shp and shx files in database, and now I need to ...
Sedp's user avatar
  • 1
0 votes
1 answer
29 views

ogr2ogr list all table error

I don't understand the problem when I use this command : $ ogr2ogr -f "GPKG" "/.../..../.../.../.../gabarits gpkg/aep.gpkg" PG:"host='localhost' user='...' password='...' ...
pasqal's user avatar
  • 538
0 votes
0 answers
13 views

clip .o5m dataset with commandline tools instead within the GIS software

I work with statewide OSM datasets (retrieved form geofabrik.de) I need just one county at the time tough. Especially for the buildings it takes quite some time before they all have loaded in QGIS. Is ...
BAE_23's user avatar
  • 677
0 votes
1 answer
53 views

gdal translate Error 6 Too many command options

I use the following command and gets the error "too many command options" gdal_translate -of AAIGrid –tr 10 10 alle_mine_tif_filer.vrt min_nu_samlede_10km_fil.asc Can you help me?
Peter's user avatar
  • 1
0 votes
1 answer
144 views

Buffer lines using ogr2ogr

I'm trying to create a contour around polygons. I already managed to convert the polygons to lines and now I am trying to use SQLite and the ogr2ogr command to give them thickness. From online ...
paul maier's user avatar
1 vote
1 answer
106 views

Get the same behaviour as the 'Difference tool' of QGIS, in ogr2ogr

I have shapefile with lines, and another with polygons. I want to generate an output of those lines that are not covered by any polygon. I can perfectly do this in QGIS's Difference tool, but want to ...
Devdatta Tengshe's user avatar
3 votes
2 answers
290 views

Command line/Python (Linux) GDAL Warp result much bigger than in QGIS (Windows) [duplicate]

I'm trying to run the following code to downsample a ~3GB GTiff while coregistering it to a reference extent: def coreg_downsamp(source, destination, output_type="GTiff"): #essentially ...
Clay's user avatar
  • 73
2 votes
0 answers
320 views

Run my QGIS Python script in headless mode

I have the following Python script that I've been manually pasting into QGIS in order to do some importing/analysis: import math import csv from pathlib import Path # This script ranks properties in ...
Mayor of the Plattenbaus's user avatar
0 votes
1 answer
134 views

OSGeo4W command line utilities provoke "Access is Denied" error [closed]

I regularly use OSGeo4W's Advanced Install to update and add packages. I have a Windows 10 Enterprise OS with Administrator rights, and a bunch of OSGeo commandline utilities installed. I installed ...
mbela's user avatar
  • 127
1 vote
1 answer
114 views

v.in.ogr does not provide any error information

I am using the mundialis/grass-py3-pdal:8.2.0-alpine docker image to run GRASS. I run the following from the bash command line (inside the container): /usr/local/grass/bin/v.in.ogr input=/path/to/...
Mayor of the Plattenbaus's user avatar
1 vote
0 answers
133 views

Limiting saga_cmd memory usage

I'm trying to perform a shrink operation on a large (13GB LZW compressed) raster in SAGA GIS on Linux: saga_cmd grid_tools 28 -INPUT in.tif -RESULT out.tif -OPERATION 0 -RADIUS 5 I have 64GB of RAM +...
kontextify's user avatar
2 votes
2 answers
368 views

Merging large number of .shp files via command line with ogrmerge.py

I have a directory containing many (about 100,000) .shp files. I would like to merge them together via the command line using ogrmerge.py like this: $ ogrmerge.py -single -o output.shp *inputs.shp I ...
cmaggiostrong's user avatar
5 votes
4 answers
980 views

Looping through GeoPackage layers with GDAL

I've a gpkg with several vector layers inside, i'd like to build a spatial index for each I'm using very simple gdal/sql process: ogrinfo -SQL "SELECT CreateSpatialIndex('gis_layer_01', 'geom')&...
Vectorito's user avatar
  • 141
2 votes
1 answer
124 views

How to find which raster cells are overlapped by polygons

(QGIS 3.22) I'm trying to compare a raster layer with a vector layer and find all the raster cells overlapped by a vector. Unfortunately, the polygons are much smaller than the pixels of the raster, ...
Carter Dills's user avatar
1 vote
1 answer
395 views

How to enable QGIS plugins from command line?

I was able write a test plugin and install it to QGIS (ver 3.24, Ubuntu 20.04 LTS). The plugin shows up in the dialogbox from the Plugins -> Manage and Install plugins... menu. It is shown under ...
tinlyx's user avatar
  • 11.1k
3 votes
1 answer
1k views

Cannot run qgis_process on WSL2, its trying to connect to a display

I'm trying to run qgis_process on WSL2 on Windows 10 using Ubuntu and I get this Error message: qt.qpa.xcb: could not connect to display xxx.xxx.xxx.x:x qt.qpa.plugin: Could not load the Qt platform ...
John Boswell's user avatar
0 votes
1 answer
2k views

Can't get osmium to run on command line in windows 10

I have installed osmium but when trying to run it through command line I get the error 'osmium' is not recognized as an internal or external command, operable program or batch file. This is usually ...
brink's user avatar
  • 820
2 votes
1 answer
146 views

Reading/writing PostGIS layers with qgis_process-qgis command line tool

How do I use the qgis_process command line tool with PostGIS layers as input and/or output?
Manfre Lörson's user avatar
0 votes
0 answers
201 views

lasinfo - Codec can't decode byte

I am adding lidar info into qgis, and when I run lasinfo I get the errors listed below. I have tried redownloading the data but the same errors always come back Errors Parameters verbose False run new ...
Roz Jones's user avatar
1 vote
1 answer
151 views

Is it possible to execute the command line inside SpatiaLite?

Let's say I have a dataset filled with points on SpatiaLite and I don't have these points address location on this database. So, I make a new column on it for adding this address as the following: ...
raylight's user avatar
  • 1,163
3 votes
1 answer
716 views

Unable to run qgis_process from command line for native:atlaslayouttopdf QGIS algorithm

I've tried to run below commands in my terminal 1st try qgis_process run native:atlaslayouttopdf --project=/home/thomasg/own-projects/sample-qgis-server/projects/atlas_minimum.qgs --LAYOUT=...
ThomasG77's user avatar
  • 31k
1 vote
1 answer
109 views

Orfeo Toolbox output rasters are 300x larger than inputs of the same size

I am trying to use Orfeo Toolbox CLI to do some processing, e.g. Smoothing: otbcli_Smoothing -in path/to/mosaic.tif -out output/smoothing.tif uint8 -type mean For now, the input, mosaic.tif, is just ...
Jan Pisl's user avatar
  • 736
6 votes
0 answers
767 views

qgis_process run script from command line

qgis_process allows us to run scripts already installed in QGIS from the command line. But is there a way to run qgis scripts not yet installed? e.g. if I have a file script.py from qgis.core import ...
Sideshow Bob's user avatar
  • 2,343
1 vote
1 answer
784 views

Get input layer extent as new GeoJSON polygon on the command line

Starting from a GeoJSON file containing a country boundary polygon, I would like to obtain a rectangular approximation: another GeoJSON consisting of the bounding box/envelope of the original polygon. ...
Socci's user avatar
  • 225
3 votes
1 answer
218 views

GDAL - Register Pixel Function for Command-Line Utilities

I'm new to GDAL and am just learning the inner-workings of C++ compilation at the moment so please bear with me. I am trying to define a pixel function to produce a VRT from input TIFs, with a band ...
mcindoe's user avatar
  • 41
3 votes
1 answer
1k views

Working a PyQGIS Script in cmd, outside of the QGIS python console

I have a perfectly fine working script that runs within the QGIS Python Console and I would like to run the script outside of the software, preferably in cmd as a .bat, so then I can use task ...
LiamHems's user avatar
  • 203
2 votes
0 answers
103 views

Load gzipped HDF5 layer without decompressing using GDAL

I am interested in loading a VIIRS raster that's contained in a gzipped H5 file, but I get an error. I am using the following command to get the info: gdalinfo HDF5:"/vsigzip/imagery/viirs/test3/...
Nikos's user avatar
  • 380
1 vote
1 answer
78 views

Error when trying to display a raster from command line! (GRASS GIS)

I am using GRASS GIS 7.8 on Ubuntu 20.04. Currently working my way through a couple of tutorials. I am trying to display a raster from the command line using the d.rast command on a new monitor that I'...
J.Beer's user avatar
  • 137
0 votes
1 answer
165 views

ogr2ogr PostGIS to GeoJSON using batch file

I am trying to export a PostGIS table to GeoJSON using ogr2ogr. The following works perfectly when I launch it in Windows command : ogr2ogr -f "GeoJSON" F:\output.json PG:"host=**** ...
daustin's user avatar
2 votes
1 answer
3k views

Converting raster to integer values and exporting as 16 bit using QGIS

I am trying to export a DEM raster as a 16 bit image using the Raster>Conversion>Translate drop down menus in QGIS. I have seen somewhere I need to save it with a -ot tag to turn it into a 16 ...
Karyn's user avatar
  • 217
1 vote
1 answer
32 views

Find sublines, given initial and final offsets, via the command line

I have a CSV file that looks essentially like this: id,id_wkt,start,end,wkt 11,11,0,43,"LINESTRING(3.3623676 51.3132714,3.3626663 51.3130068,3.363068 51.3126811,3.3636323 51.3122504,3.3640754 51....
Socci's user avatar
  • 225
1 vote
1 answer
212 views

QGIS Output Command Line Results on the Terminal [closed]

QGIS as a command line mode with limited fonctionnality. The following code examples use QGIS 3.14 on Windows 10 For example to access QGIS version number, you can type: C:\OSGeo4W64\bin\qgis-bin --...
D Pilon's user avatar
  • 608
1 vote
0 answers
601 views

Error using HEC-HMS via command line

I am attempting to invoke HMS to run headlessly by prompting a batch file containing the following: cd C:\Program Files\HEC\HEC-HMS\4.4 hec-hms -s C:\Users\abudhabikid\Desktop\TESTING\Project\...
abudhabikid's user avatar
-1 votes
2 answers
1k views

Python fmask from command line or in Python script

I'd like to mask some clouds in Sentinel-2-Images with the python-fmask-library. As I'm not too experienced with Python and remote sensing, I have some questions. When I installed the library I ...
Robin Kohrs's user avatar
-1 votes
1 answer
116 views

Suppress the list of drivers when ogr2ogr fails

I'm quite sick of seeing this spammy output when ogr2ogr fails: FAILURE: Unable to open datasource `foo.csv' with the following drivers. -> `PCIDSK' -> `netCDF' -> `JPEG2000' -> `...
Steve Bennett's user avatar
0 votes
1 answer
546 views

Simple raster calculation in batch mode (for folders)

I have thousands of raster organized in several folders. All of their cell values have to be divided by 10. Seems simple, but I didn't find any solution to do it in batch. QGIS offers batch mode, but ...
MartinMap's user avatar
  • 8,338
1 vote
0 answers
134 views

Loading specific area from an osm.pbf file into Maperitive

Is there a way to download a specific longtitude / latitude boundary area (a city) from a country osm.pbf file in Maperitive? In my case I am trying to load Greater Sydney from http://download....
Oli Sard's user avatar
0 votes
1 answer
1k views

Reading large PBF file with GDAL [closed]

I'm trying to use GDAL to read-in a large .pbf file containing OSM data for London. The problem is that ogrinfo returns an error message, Too many features have accumulated ... as shown in the ...
RobinLovelace's user avatar
4 votes
1 answer
2k views

ogr2ogr commands with cmd

I'm trying to run a ogr2ogr command with cmd. When I run the cmd the Osgeow command prompt just flashes and nothing happens. When I enter my ogr2ogr script directly to the Command Prompt everythinh ...
woundari's user avatar
  • 131
1 vote
1 answer
213 views

Running GRASS GIS on Text-based interface alone

I'm required to run GRASS GIS functions on a CentOS 7 server using the GRASS Text-based interface as it is not possible to use the GUI. I basically want to import some shapefiles as vector layers and ...
Nandula's user avatar
  • 783
9 votes
3 answers
5k views

Running QGIS on command-line alone?

For a certain project I'm required to run QGIS processes on a large data set on a Linux server as my PC does not have the sufficient memory to execute them (snapping points to lines + Steiner tree ...
Nandula's user avatar
  • 783
1 vote
1 answer
402 views

Connection Time out during Terrain Correction in Snap gpt command line process - Sentinel 1

I am processing Sentinel-1 using the Snap command line gpt. The xml file i am using was produced using the graph builder within the SNAP software, and slightly modified to suit my needs. Please see ...
Rhodri_22's user avatar
  • 360
1 vote
0 answers
1k views

ogr2ogr: How to export / explode GeoJSON features from collections into separate files

I would like to use an ogr2ogr command to export features as multiple separate geojson files from a single GeoJSON feature collection. I have tried using the -explodecollections command but I am ...
B-Jizzle's user avatar
1 vote
1 answer
512 views

Convert lists of coordinates to multiple lines based on ID at start of each block of coordinates

I have a list of XY coordinates along multiple lines. The lines are separated by a single identifier at the start of each block of coordinates. How do I convert this to multiple lines linking the ...
xyzblue's user avatar
  • 154
1 vote
1 answer
65 views

Prioritising values in accordance to various Columns

I previously asked for help in Prioritizing the Attribute table of a self made polygon layer Prioritising polygons in QGIS Now I want to change this prioritisation in accordance to multiple values ...
Philip Gatzlaff's user avatar
1 vote
2 answers
268 views

How to efficiently extract specific metadata for many shapefiles?

I have a directory with 50 subdirectories containing a total of 300 shapefiles which I would like to query for their feature count and output to a text file. Thus far I am able to get the feature ...
mbela's user avatar
  • 127
4 votes
3 answers
342 views

Prioritising polygons in QGIS

I just created a layer in which I hand drew a lot of polygons. Now I want to fill out the Attribute table through commands since it will save me a bunch of time. Therefore, I calculated the area of ...
Philip Gatzlaff's user avatar
5 votes
3 answers
3k 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 just ...
loki's user avatar
  • 514
1 vote
2 answers
202 views

FME workspace runner mangles WFS parameters

When running a workspace using a WorkspaceRunner transformer in FME some non-standard query string parameters in the WFS url are discarded and/or seemingly randomly replaced by equals signs. Setup is ...
til_b's user avatar
  • 5,154