<div dir="auto">Thanks for insights. I will try the lukeroth/gdal repo.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 12, 2024, 4:58 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<p>Abul,</p>
<p>gdal_ls.py is a non officially promoted script that isn't
installed with GDAL. Your best luck is just to fetch it from
<a href="https://github.com/OSGeo/gdal/blob/master/swig/python/gdal-utils/osgeo_utils/samples/gdal_ls.py" target="_blank" rel="noreferrer">https://github.com/OSGeo/gdal/blob/master/swig/python/gdal-utils/osgeo_utils/samples/gdal_ls.py</a>
, ship it with your program, and directly points at it. It
obviously requires users to have the GDAL Python bindings
installed.</p>
<p>Your other alternative could be to "port" it to Go using Go
bindings, but I don't know much about the distribution story of go
bindings, so don't ask me more about that part. I see that
lukeroth/gdal has VSIReadDirRecursive() which is essentially what
you need:
<a href="https://github.com/search?q=repo%3Alukeroth%2Fgdal%20VSIReadDir&type=code" target="_blank" rel="noreferrer">https://github.com/search?q=repo%3Alukeroth%2Fgdal%20VSIReadDir&type=code</a></p>
<p>Even<br>
</p>
<div>Le 12/12/2024 à 21:23, Abdul Raheem
Siddiqui via gdal-dev a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hello,<br>
<br>
I am developing a compiled program in Golang that calls GDAL
through subprocess calls. In one of the program's features
that I am developing, I want to call <b>gdal_ls</b>. However,
I see that gdal_ls is not available in PATH by default and
hence can't be called directly in a terminal without
specifying the full path or moving `gdal_ls.py` script to the
path.<br>
<br>
My program will be shipped as a binary, and GDAL is expected
to be available on the machine where the binary is executed.
This has worked well so far but now that I want to call <b>gdal_ls
</b>in the new feature, the new feature will not work out of
the box.<br>
<br>
Is there a way to install GDAL with gdal_ls available in Path
(so that I can ask my users to do this) or is there a better
solution for my problem?</div>
<div><br>
Thanks,</div>
<div>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<p style="margin:0px 0px 10px;font-size:12px;line-height:14px"><font style="color:rgb(33,33,33)" face="arial, helvetica, sans-serif"><span style="font-weight:bold">Abdul Siddiqui<br>
</span></font></p>
<p style="margin:0px 0px 10px;font-size:12px;line-height:14px"><font style="color:rgb(33,33,33)" face="arial, helvetica, sans-serif"><span style="font-weight:bold">ERT Corp.</span></font></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank" rel="noreferrer">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank" rel="noreferrer">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
</div>
</blockquote></div>