<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;">
<p><font size="4"><font face="Helvetica, Arial, sans-serif">This
might be a good case for installing conda
(<a class="moz-txt-link-freetext" href="https://conda.io/miniconda.html">https://conda.io/miniconda.html</a>). The installation goes in a
user's home directory (no need for admin rights), then you can
setup a conda environment with whatever version of python you
prefer, and install gdal in that env. and have access to all
necessary gdal python scripts.</font></font></p>
<p><br>
</p>
<div class="moz-cite-prefix">On 07/01/2023 2:18, Carsten
Lockenkötter wrote:<br>
</div>
<blockquote type="cite"
cite="mid:005401d9222d$9ce31220$d6a93660$@web.de">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi
Idan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Yes,
the operating system is Windows.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">You
mean that I should zip the whole Python installation folder
and copy it to the customer environment? <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Or
just the Scripts folder? <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Sorry,
I am a beginner in Python.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I
had also thought of the third option with the "stand alone
app".<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I
was just not sure if all dependencies (e.g. numpy) are
included.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I
will try out the options soon, thank you.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I
had just hoped that there was an easier way.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I
had already tried to install GDAL via „pip install GDAL“,
but it requires c++ build tools.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Can't
this be simplified?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Why
are scripts like gdal_calc not included to the „standard“
package so that they can be run similarly to gdalinfo?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">This
would probably make everything a little easier.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Carsten<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> Idan Miara
<a class="moz-txt-link-rfc2396E" href="mailto:idan@miara.com"><idan@miara.com></a> <br>
<b>Gesendet:</b> Freitag, 6. Januar 2023 21:15<br>
<b>An:</b> Carsten Lockenkötter
<a class="moz-txt-link-rfc2396E" href="mailto:carsten.lockenkoetter@web.de"><carsten.lockenkoetter@web.de></a><br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Betreff:</b> Re: [gdal-dev] Using gdal_calc without
python<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi!<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">gdal_calc is implemented fully in
python, so you would need python to run it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Assuming your client uses Windows and
you don't have admin privileges to install software, you
could install official Python and gdal (from <a
href="https://www.lfd.uci.edu/~gohlke/pythonlibs/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.lfd.uci.edu/~gohlke/pythonlibs/</a>,
which unfortunately is not maintained anymore) on another
Windows machine and then just zip it and unzip on your
clients' pc. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Another option is using OSGeo4W (or
QGIS).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">In the same way, you could also be able
to install it, zip and unzip (I haven't tried this method
recently)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I was successful with both methods, but
I think that the first method is easier.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Maybe also <a
href="https://pyinstaller.org/en/stable/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://pyinstaller.org/en/stable/</a>
could help if you needed to pack gdal_calc more like a
"stand alone app", but I think that wasn't your issue.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Idan<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, 6 Jan 2023 at 21:34, Carsten
Lockenkötter <<a
href="mailto:carsten.lockenkoetter@web.de"
moz-do-not-send="true" class="moz-txt-link-freetext">carsten.lockenkoetter@web.de</a>>
wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC
1.0pt;padding:0cm 0cm 0cm
6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I'm
using some Python functions provided by you, such as
gdal_calc.py.<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">My
workflow works so far, but my problem is that I have
to run everything on my customer's server. <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">So
far, I've always downloaded the compiled binaries
from <a href="http://gisinternals.com"
target="_blank" moz-do-not-send="true">gisinternals.com</a>
and copied them to the server (the zip archive) to
use gdalwarp, for example. <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">But
with that, I can't run gdal_calc, right? Python is
still needed for that, or am I mistaken?<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is
there a way to use gdal_calc/gdal_retile without
having to install software components? <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If
there are approaches to control the functions
through a wrapper, that would also help me. <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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. <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
probably have to rewrite the Python script in C#?<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Regards,<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Carsten<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
<a
href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></p>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>