<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
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:#0563C1;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><u>Context<o:p></o:p></u></p>
<p class="MsoNormal">We are trying to reproject a GeoJSON polygon to EPSG:4326.<o:p></o:p></p>
<p class="MsoNormal">In some cases, depending on whether we use the ogr2ogr command line or the equivalent in python, the resulting polygon is different.
<o:p></o:p></p>
<p class="MsoNormal">In those situations, the command line gives us the appropriate polygon, whereas the python code gives us a distorted polygon.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>Question<o:p></o:p></u></p>
<p class="MsoNormal">Any idea why there is a difference between the command line and the python results? Is there a mistake in our interpretation of the code/how we converted it in python?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>Sample GeoJSON</u>: <a href="https://pastebin.com/hUiVVjFv">
https://pastebin.com/hUiVVjFv</a><o:p></o:p></p>
<p class="MsoNormal">Proj4: "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=264 +x_0=0 +y_0=0 +R=6371229 +units=m +no_defs"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>Command line that works</u>: ogr2ogr -s_srs "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=264 +x_0=0 +y_0=0 +R=6371229 +units=m +no_defs" -t_srs EPSG:4326 result_command_line.json geojson.json<o:p></o:p></p>
<p class="MsoNormal">Result: <a href="https://pasteboard.co/cTpZBRamEYv8.jpg">https://pasteboard.co/cTpZBRamEYv8.jpg</a>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><u>Python code</u> (we would expect the same output as the command line):
<a href="https://pastebin.com/QgWDBL1W">https://pastebin.com/QgWDBL1W</a><o:p></o:p></p>
<p class="MsoNormal">Result: <a href="https://pasteboard.co/8iSv0vbnQlHw.jpg">https://pasteboard.co/8iSv0vbnQlHw.jpg</a><br>
<br>
Thank you!<o:p></o:p></p>
<p class="MsoNormal">Nicolas D.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>