Hi Idan,

 

Yes, the operating system is Windows.

You mean that I should zip the whole Python installation folder and copy it to 
the customer environment? 

Or just the Scripts folder? 

Sorry, I am a beginner in Python.

 

I had also thought of the third option with the "stand alone app".

I was just not sure if all dependencies (e.g. numpy) are included.

 

I will try out the options soon, thank you.

I had just hoped that there was an easier way.

It's a pity that the path with Python is so difficult for beginners and that 
you may have to install it from an unofficial source.

I had already tried to install GDAL via „pip install GDAL“, but it requires c++ 
build tools.

Can't this be simplified?

 

Why are scripts like gdal_calc not included to the „standard“ package so that 
they can be run similarly to gdalinfo?

This would probably make everything a little easier.

 

Regards,

Carsten

 

Von: Idan Miara <i...@miara.com> 
Gesendet: Freitag, 6. Januar 2023 21:15
An: Carsten Lockenkötter <carsten.lockenkoet...@web.de>
Cc: gdal-dev@lists.osgeo.org
Betreff: Re: [gdal-dev] Using gdal_calc without python

 

Hi!

 

gdal_calc is implemented fully in python, so you would need python to run it.

 

Assuming your client uses Windows and you don't have admin privileges to 
install software, you could install official Python and gdal (from 
https://www.lfd.uci.edu/~gohlke/pythonlibs/, which unfortunately is not 
maintained anymore) on another Windows machine and then just zip it and unzip 
on your clients' pc. 

 

Another option is using OSGeo4W (or QGIS).

In the same way, you could also be able to install it, zip and unzip (I haven't 
tried this method recently)

 

You might still need to install on your clients' pc Visual Studio 
Redistributables (which I think both Python and QGIS installers install for you 
automatically).

I was successful with both methods, but I think that the first method is easier.

 

Maybe also https://pyinstaller.org/en/stable/ could help if you needed to pack 
gdal_calc more like a "stand alone app", but I think that wasn't your issue.

 

Kind regards,

Idan

 

On Fri, 6 Jan 2023 at 21:34, Carsten Lockenkötter <carsten.lockenkoet...@web.de 
<mailto:carsten.lockenkoet...@web.de> > wrote:

Hi,

 

I'm currently building a workflow to crop possible white or black borders from 
my Geotiff files and create raster tiles with an alpha band.

I'm using some Python functions provided by you, such as gdal_calc.py.

 

My workflow works so far, but my problem is that I have to run everything on my 
customer's server. 

Unfortunately, I don't have the ability to install software there, so I can't 
install Python and gdal_calc.py can't be run.

 

So far, I've always downloaded the compiled binaries from gisinternals.com 
<http://gisinternals.com>  and copied them to the server (the zip archive) to 
use gdalwarp, for example. 

But with that, I can't run gdal_calc, right? Python is still needed for that, 
or am I mistaken?

 

Is there a way to use gdal_calc/gdal_retile without having to install software 
components? 

If there are approaches to control the functions through a wrapper, that would 
also help me. 

I have knowledge in C# and could use MaxRev.Gdal.Core, for example. However, I 
haven't found an approach yet to use gdal_calc. 

I probably have to rewrite the Python script in C#?

 

Regards,

Carsten

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org <mailto:gdal-dev@lists.osgeo.org> 
https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to