Skip to main content

Questions tagged [powershell]

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework.

Filter by
Sorted by
Tagged with
1 vote
0 answers
34 views

Import shapefile using ogr2ogr with a subselect to fill a constraint fails to "cannot open datasource"

I try to import various shapefiles into a postgis database. The shapefiles have some foreign keys referencing other existing (and already successfully imported) tables. ogr2ogr -f "$($json....
semTex's user avatar
  • 111
0 votes
0 answers
73 views

Update Python via Powershell

We currently have older Windows QGIS installations on our clients that utilize Python 3.9.5.0. Due to identified vulnerabilities in this version, we are seeking to upgrade to the latest supported ...
Speed's user avatar
  • 1
1 vote
0 answers
204 views

ogr2ogr PostgreSQL installation without PostgreSQL driver (Windows). Why and how to change path to OSGeo installation

I'm trying to import a shapefile into my PostGIS database with ogr2ogr on Windows. Running the command ogr2ogr -f PostgreSQL PG:"dbname=database host=localhost user=postgres port=5432" ...
Roska's user avatar
  • 135
2 votes
1 answer
69 views

Problem running QGIS r.horizon command in PowerShell

I would to run this command in images below via CMD also without opening QGIS GUI on Windows 10 I added "C:\Program Files\QGIS 3.28.2\bin\qgis_process-qgis.bat" to PATH then run my command ...
Khaled's user avatar
  • 287
0 votes
1 answer
87 views

gdal_translate closes without any error when translating a big tif to map

I run gdal_translate from powershell for file: Size is 32571, 35947 Coordinate System is: PROJCS["Asia_North_Lambert_Conformal_Conic", GEOGCS["WGS 84", DATUM["WGS_1984&...
Nikolay Yasinskiy's user avatar
0 votes
0 answers
65 views

Highlight a feature in ArcMap from a web page

I have a web page that calls a PowerShell script to switch to ArcMap. I only want one instance of ArcMap running. If I open a new instance of ArcMap I can easily pass the PlotId as an Argument. ...
Ruairi's user avatar
  • 11
0 votes
1 answer
363 views

Batch conversion of .hgt files to .tif using Powershell returns filename.hgt.tif files

I have a folder which contains DEM in .hgt. I want to convert them via GDAL. So to convert a single file, it's gdal_translate -of 'GTiff' N16E122.hgt N16E122.tif. To do it in Powershell, I figured it'...
BallpenMan's user avatar
  • 1,217
2 votes
1 answer
314 views

Running proj/cs2cs command in Powershell

I'm reading a book where it says to run the following in the commandline, I think he used Linux. Therefore the command doesn't run in Windows Powershell cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +...
BallpenMan's user avatar
  • 1,217
1 vote
0 answers
3k views

How to merge all raster files in a folder using gdal_merge?

I have DEMs in a folder like this If I run gdal_merge -o out.tif *.hgt, it says ERROR 4: `/*.hgt' does not exist in the file system, and is not recognized as a supported dataset name. A similar ...
BallpenMan's user avatar
  • 1,217
1 vote
0 answers
139 views

How to run topojson from Powershell?

I have already installed node.js and used it to install topojson via npm install topojson. But when I run command like topojson input.geojson -o output.topojson, I get the familiar error of topojson :...
BallpenMan's user avatar
  • 1,217
1 vote
1 answer
736 views

GDAL version different if called from Windows Powershell and shows "ERROR 1: Can't load requested DLL 193: %1 is not a valid Win32 application."

I have two GDAL installation, one from the OSGEO4W installer and one from Tamas Szekeres’ Windows binaries. I set the necessary variables according to the article. I open Powershell and ran gdalinfo --...
BallpenMan's user avatar
  • 1,217
1 vote
0 answers
35 views

Cannot provide inputs for saga:difference using qgis_process-qgis (command line qgis)

I'm using the following command to find the difference between two Sentinel 2 rasters using saga:difference tool in Powershell (works fine in standard QGIS3): ./qgis_process-qgis run saga:difference --...
Steffan's user avatar
  • 518
3 votes
2 answers
700 views

Executing standalone Python script for QGIS processing from within PowerShell script

Is there a way to execute either a python script or pyhton commands from within a powershell script to do some QGIS geoprocessing on a Windows 10 machine (64 bit)? I have a powershell script that ...
Tolotos's user avatar
  • 53
1 vote
1 answer
2k views

Python setup to run ArcPy scripts

I am trying to set up Python so that I can execute ArcPy scripts outside of ArcMap. I'm new to Python, however I have previously been able to execute Pythons scripts from the cmd prompt (PowerShell), ...
edward29's user avatar
0 votes
1 answer
379 views

Invoking-command in powershell 2012 (remotely) for ArcPy errors but local cmd or python shell work

I've written a data update script that works really well, it deletes a target feature class and uses the feature class to feature class geoprocessing tool to copy data from SQL 2012 into it's ...
GISI's user avatar
  • 1,169