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
0answers
34 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=**** ...
2
votes
1answer
40 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 ...
1
vote
1answer
17 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....
1
vote
1answer
78 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 --...
1
vote
0answers
91 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\...
-1
votes
1answer
152 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 ...
-1
votes
1answer
38 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' -> `...
0
votes
1answer
63 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 ...
1
vote
0answers
20 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....
0
votes
1answer
132 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 ...
4
votes
1answer
248 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 ...
1
vote
1answer
78 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 ...
4
votes
2answers
519 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 ...
1
vote
1answer
119 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 ...
0
votes
0answers
247 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 ...
1
vote
1answer
61 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 ...
1
vote
1answer
30 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 ...
0
votes
2answers
71 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 ...
4
votes
3answers
275 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 ...
4
votes
3answers
1k 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 ...
1
vote
2answers
60 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 ...
2
votes
2answers
1k views

Using LAStools to repair headers for several LiDAR files?

So, I have 21 LiDAR files with incorrect information in their file headers. For example, when I import a single file into R using the following code, I get several warnings saying that there are no ...
4
votes
1answer
709 views

Command line tool to repair self-intersection in GeoJSON

I am working with this file. Kansas seems to have a self intersection: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -98.918045000000006 37.379078 at -98....
1
vote
2answers
401 views

Saving LAZ files to different location from input (LAS) files? [duplicate]

All of the command line examples I'm seeing show how to create LAZ files in the same folder as the LAS files, e.g.: C:\Folder\tools>laszip F:\Folder\LAS_points\*.las Unfortunately, I don't have ...
0
votes
1answer
94 views

gdalwarp for clipping images using multiple polygon in a bash shell for loop

C:\OSGeo4W64\bin\gdalwarp.exe -dstnodata 0 -q -cutline D:\hillsborough_Images_work\split_Polygon\120-140k\Hillborough_FINAL_140000_region_IGD_120570003d29ed0dc.shp -crop_to_cutline -dstalpha -tr 0....
2
votes
2answers
48 views

Translate manual operations to GRASS commands

I am new in GRASS GIS and i wanted to know how i could translate GRASS manual operations to GRASS commands in the console. I imported a raster and i was able to see the command r.import input=XXXXX\...
2
votes
1answer
142 views

Build spatialite db from scratch within build process

Having a scripted build process on Windows 10 (CMD or Powershell, both is possible) I want to build a spatialite database with the ready to use but empty schema created from a couple of sql files. I ...
0
votes
3answers
665 views

Use command line to call an FME workbench from a python tool in ArcGIS

I have a Python script that I run in ArcGIS Desktop 10.2. I also have an FME workbench I use in part of the same process. I currently have to run half of the script, switch to FME then run the other ...
2
votes
0answers
78 views

Pass attribute to python script with QGIS command line launcher

I didn't find the answer to this question : is there a way for passing attributes to python script when you try to run it from QGIS command line launch : os.system('qgis --nologo --project project....
2
votes
1answer
113 views

Cropping osm.pbf data without missing overlapping features?

for our offline maps tool we use *.osm.pbf data for input. As we often need cross border selections or just a country with some "buffer" around borders we use cropped osm data using osmctools. ...
1
vote
1answer
101 views

r.viewshed output location

I'm very new on GRASS and trying to extract the viewshed of a SRTM HGT file. This is what I've done so far: (why I'm using GRASS command line this way is not in question. Please answer this same way) ...
2
votes
0answers
455 views

Converting OSM.PBF to Geopackage in CLI?

I would like to refresh this tutorial for my purposes - background vector map in one file - just to load in QGIS. My idea is a script doing this: Import directly downloaded Openstreetmap PBF file (...
0
votes
0answers
28 views

GRASSGIS Batch Process Command Not Running

I'm trying to rescale MODIS LST data by running the following command but it gives this error (Image Attached) Kindly help if the syntax is not right. Command: for %i (*MOD11A1.A2000065.LST_Day_1km*...
2
votes
1answer
297 views

Pipe, redirect or stream to osmfilter from “standard in” (stdin)

So many tools support chaining, or piping in data from standard input. This can decrease times needed for disk writing and also better use the memory of a machine. Examples of chaining: GDAL - "...
4
votes
1answer
408 views

Opening PyQGIS in command prompt?

I want to run PyQGIS in the command prompt. But every time I get an error because python can not be found by the command prompt. I installed QGIS Desktop 3.0 64 bit via the OSGeo4W installer. C:\...
1
vote
1answer
78 views

Command line-tool to convert line-delimited geojson file to regular geojson

Now I need the opposite tool from this one: something to convert a line-delimited GeoJSON file to a single GeoJSON file. In other words: Write { "type": "FeatureCollection", "features": [ on the ...
1
vote
1answer
312 views

How to use sqlite symdifference with ogr via command line

I am trying to use the sqlite symdifference function in windows command line with ogr but can't seem to get the syntax right. Here is what I have: ogr2ogr -dialect sqlite -sql "select symdifference(a....
1
vote
2answers
487 views

Access is Denied in cmd prompt shp2pgsql

I was wondering if anyone has come across the error access is denied in command prompt when wanting to load a shapefile using shp2pgsql for postgresql. I have set my user access security level to ...
3
votes
3answers
1k views

Command line-tool to convert geojson file to line-delimited geojson

I'm loving the ndjson-cli tools for working with newline-delimited GeoJSON files. But I can't seem to find a tool that converts a standard GeoJSON (whether minified or prettified) ond converts it to ...
2
votes
1answer
1k views

GRASS GIS 7.4 in Linux for command line usage - setting up environment (.bashrc file)

I need to use GGRAS GIS 7.4.0 on Linux server (Debian 8.10 Jessie) via command line (with flag --exec) and I'm still having troubles with it. Description: I compile and install GRASS GIS 7.4.0 with ...
3
votes
2answers
4k views

What are GDAL utilities?

I often come across code examples when searching for something like GeoTiff size - what to do?. Sometimes, the presented code examples seem to do exactly what I was searching for. There is just one ...
4
votes
3answers
1k views

Converting large CSV to line-delimited GeoJSON?

What is a good way to convert a large (100MB) CSV file to GeoJSON on the command line, preferably without GDAL? I tried Mapbox's csv2geojson but it ran out of memory.
2
votes
0answers
102 views

Using rasterio and rio_color command line problem/question

I'm an amateur when it comes to the command line. My problem is that the script I'm trying to run (rio) is in the Python\Python36-32\Scripts folder on my C:drive and I'm trying to run it using ...
3
votes
3answers
5k views

Trying to run GDALbuildVRT in command line

I have a directory of OS data stored as tiff files (approximately 2000), which I want to create a virtual raster with. I understand that you can run this in the QGIS UI but because of the large number ...
5
votes
1answer
3k views

Alternative to Tippecanoe for generating Mapbox vector tiles on command-line

Tippecanoe is the tool I always use for converting Shapefiles/GeoJSONs to Mapbox vector tiles in PBF format, for rendering in Mapbox-GL-JS. But it doesn't seem ideal: its primary use case seems to be ...
1
vote
0answers
140 views

Obtain the number of features in a Shapefile using NodeJS

I'm using the shapefile NPM library which works well, but it doesn't provide a count of the number of features in a Shapefile. Is there some other library which can access this information (other than ...
1
vote
1answer
2k views

Efficiently convert from Shapefile to GeoJSON without GDAL

Ogr2ogr is the standard way to convert files from Shapefile to GeoJSON on the command line. But it has a few limitations for me: The output format is not condensed (ie, it contains a lot of needless ...
3
votes
1answer
156 views

QGIS keeping settings in sync?

I have several field PCs using QGIS and need to be able to use a thumb drive to re-set each one to the same window, commands, symbols etc.. I have read about the --configpath but am totally at a loss ...
1
vote
1answer
73 views

FOSS Command-line data viewer?

Is there a simple, free and open source command-line-accessible (other otherwise programmatically-available) viewer that can be called to visualize a GIS dataset? I know one could do fancy things ...
3
votes
1answer
982 views

Use Orfeo Toolbox in R

I was wondering if it is possible to use the algorithm of Orfeo Toolbox in RStudio. I have been looking for some information but didn't find anything relevant. From the Orfeo toolbox I see that it can ...