<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"MS ゴシック";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:游ゴシック;
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"MS Pゴシック";
panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@游ゴシック";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"\@MS Pゴシック";}
@font-face
{font-family:"\@MS ゴシック";
panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0mm;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:游ゴシック;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"書式なし \(文字\)";
margin:0mm;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:游ゴシック;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0mm;
margin-right:0mm;
margin-bottom:0mm;
margin-left:36.0pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:游ゴシック;}
span.a
{mso-style-name:"書式なし \(文字\)";
mso-style-priority:99;
mso-style-link:書式なし;
font-family:游ゴシック;}
span.25
{mso-style-type:personal-reply;
font-family:游ゴシック;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:99.25pt 30.0mm 30.0mm 30.0mm;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1239361752;
mso-list-type:hybrid;
mso-list-template-ids:1769893842 -397275682 67698711 67698705 67698703 67698711 67698705 67698703 67698711 67698705;}
@list l0:level1
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%1;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:aiueo-full-width;
mso-level-text:"\(%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:44.0pt;
text-indent:-22.0pt;}
@list l0:level3
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%3;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:66.0pt;
text-indent:-22.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:88.0pt;
text-indent:-22.0pt;}
@list l0:level5
{mso-level-number-format:aiueo-full-width;
mso-level-text:"\(%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:110.0pt;
text-indent:-22.0pt;}
@list l0:level6
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%6;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:132.0pt;
text-indent:-22.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:154.0pt;
text-indent:-22.0pt;}
@list l0:level8
{mso-level-number-format:aiueo-full-width;
mso-level-text:"\(%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:176.0pt;
text-indent:-22.0pt;}
@list l0:level9
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%9;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:198.0pt;
text-indent:-22.0pt;}
@list l1
{mso-list-id:1551456310;
mso-list-template-ids:-1721732252;}
ol
{margin-bottom:0mm;}
ul
{margin-bottom:0mm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026">
<v:textbox inset="5.85pt,.7pt,5.85pt,.7pt" />
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="JA" link="#467886" vlink="#96607D" style="word-wrap:break-word;text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">I tried executing with --config CPL_DEBUG ON, but it did not provide any useful information.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">I'm sending you the command that's causing the issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">We're using curl command to obtain the Shape file from the internet.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">---<o:p></o:p></span></p>
<ol style="margin-top:0mm" start="1" type="�">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo3">
<span lang="EN-US" style="font-size:11.0pt">Obtaining the Shape file:<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">$curl -f --output-dir ./ -O
<a href="https://data.bodik.jp/dataset/d4b9a284-58c0-4559-9e48-b7c83a4275f0/resource/28aa8f13-7cf0-4dc5-9dbf-a77f58c3f2c8/download/shape.zip">
https://data.bodik.jp/dataset/d4b9a284-58c0-4559-9e48-b7c83a4275f0/resource/28aa8f13-7cf0-4dc5-9dbf-a77f58c3f2c8/download/shape.zip</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<ol style="margin-top:0mm" start="2" type="�">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo3">
<span lang="EN-US" style="font-size:11.0pt">Unzipping the ZIP file:<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">$unzip -o -j -d ./ ./shape.zip<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">③<span lang="EN-US"> Converting from Shape format to GeoJSON format:<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">$ogr2ogr -f GeoJSON -oo ENCODING=MS932 ./d1_raw.geojson ./d1.shp --config CPL_DEBUG ON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">---<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">These commands are executed within the convert.sh called from the Dockerfile.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0mm 0mm 0mm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Abel Pau <a.pau@creaf.uab.cat>
<br>
<b>Sent:</b> Wednesday, March 6, 2024 5:53 PM<br>
<b>To:</b> </span><span style="font-size:11.0pt;font-family:"MS Pゴシック"">寛座 智大</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <tomohiro.kanza.306@baycurrent.co.jp>; gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> RE: Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I reduced the amount of memory requested. I could do that because I am developing the driver that failed.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">After my mail I discovered another error, so, perhaps, this was the real cause.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">4Mb it’s so small, so I is not the cause...
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Perhaps you can add --config CPL_DEBUG ON at your command line to see if this give you more information about the place
where it crashes.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’m sorry not being able to help you more.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Perhaps you can send me the shape and the command line to see if it crashes in my computer and I can find out the problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">See you<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0mm 0mm 0mm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">De:</span></b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">
</span><span style="font-size:11.0pt;font-family:"MS ゴシック"">寛座 智大</span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <</span><span lang="EN-US"><a href="mailto:tomohiro.kanza.306@baycurrent.co.jp"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">tomohiro.kanza.306@baycurrent.co.jp</span></a></span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">>
<br>
<b>Enviado el:</b> dimecres, 6 de març de 2024 7:20<br>
<b>Para:</b> Abel Pau <</span><span lang="EN-US"><a href="mailto:a.pau@creaf.uab.cat"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">a.pau@creaf.uab.cat</span></a></span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">>;
</span><span lang="EN-US"><a href="mailto:gdal-dev@lists.osgeo.org"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">gdal-dev@lists.osgeo.org</span></a></span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><br>
<b>Asunto:</b> RE: Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Abel Pau,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Hi. Thank you for your response.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">>I reduced this capacity 10 times and it worked.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Does this mean you reduced the size of the Shape file?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Or does it mean that you reduced the amount of memory requested?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">(</span><span lang="EN-US">
</span><span lang="EN-US" style="font-size:11.0pt">If it's the latter, I'd like to learn how to do it.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Shape files are typically around 4MB, so I don't consider them to be very large files.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Additionally, I tried it on an AKS with a free memory size of over 20GB, but encountered the same issue.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">It seems unlikely that there is a lack of specifications in the execution environment.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Could the issue possibly be due to a bug in the command?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0mm 0mm 0mm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Abel Pau <</span><span lang="EN-US"><a href="mailto:a.pau@creaf.uab.cat"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">a.pau@creaf.uab.cat</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">>
<br>
<b>Sent:</b> Monday, March 4, 2024 4:57 PM<br>
<b>To:</b> </span><span style="font-size:11.0pt;font-family:"MS Pゴシック"">寛座 智大</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <</span><span lang="EN-US"><a href="mailto:tomohiro.kanza.306@baycurrent.co.jp"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">tomohiro.kanza.306@baycurrent.co.jp</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">><br>
<b>Subject:</b> RE: Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I did similar tests with a driver I am implementing and I obtained exact the same behavior as yours.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">After a few speculations I deduced that my driver was asking for too much memory for the docker capacity.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I reduced this capacity 10 times and it worked.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">So, perhaps, Shape or Geojson asks for too much memory for the docker capacity.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I don’t know if it’s possible to make it bigger.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Abel.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0mm 0mm 0mm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">De:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> gdal-dev <</span><span lang="EN-US"><a href="mailto:gdal-dev-bounces@lists.osgeo.org"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">gdal-dev-bounces@lists.osgeo.org</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">>
<b>En nombre de </b>?? ?? via gdal-dev<br>
<b>Enviado el:</b> dilluns, 4 de març de 2024 3:30<br>
<b>Para:</b> </span><span lang="EN-US"><a href="mailto:gdal-dev@lists.osgeo.org"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">gdal-dev@lists.osgeo.org</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><br>
<b>Asunto:</b> [gdal-dev] Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="CA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">I am implementing batch processing to convert Shape files, publicly available as open data,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">into Geojson format within a container environment.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">I installed gdal-bin on top of ubuntu:22.04 base image.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">The Dockerfile I implemented is as follows:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">FROM ubuntu:22.04<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">ENV DEBIAN_FRONTEND=noninteractive<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">RUN apt update<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">RUN apt -y install apt-transport-https jq unzip openjdk-17-jdk-headless curl<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"># Install gdal-bin<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"># Reference: </span>
<span lang="EN-US"><a href="https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html#how-to-install-gdal-ogr-packages-on-ubuntu"><span style="font-size:11.0pt">https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html#how-to-install-gdal-ogr-packages-on-ubuntu</span></a></span><span lang="EN-US" style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">RUN apt -y install software-properties-common<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">RUN add-apt-repository -y ppa:ubuntugis/ppa<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">RUN apt update<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">RUN apt -y install gdal-bin<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">COPY ./convert.sh /convert.sh<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">CMD ["bash","convert.sh"]<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">When executing the ogr2ogr command within convert.sh, the following error occurs:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">Shape: DBF Codepage = SJIS for /d1.shp<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">Shape: Treating as encoding 'MS932'.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDAL: GDALOpen(/d1.shp, this=0x55f1edd77f30) succeeds as ESRI Shapefile.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDAL: QuietDelete(/d1_raw.geojson) invoking Delete()<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDAL: GDALDriver::Create(GeoJSON,/d1_raw.geojson,0,0,0,Unknown,(nil))<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDALVectorTranslate: 5315 features written in layer 'd1'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">Shape: 5315 features read on layer 'd1'.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDAL: GDALClose(/d1.shp, this=0x55f1edd77f30)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDAL: GDALClose(/d1_raw.geojson, this=0x55f1edd75fd0)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">GDAL: In GDALDestroy - unloading GDAL shared library.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">Segmentation fault (core dumped)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">I checked if convert.sh execution is possible on the VM (host OS running Docker).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">The error seems to occur only when executed within the container.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">How should I resolve this?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-size:11.0pt">※</span><span lang="EN-US" style="font-size:11.0pt">Environment<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">Host OS: ubuntu 22.04<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">Docker Deamon: 25.0.3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt">gdal-bin: 3.6.4<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>