<div dir="ltr"><div>Dear Even,</div><div> Apologies for taking your time. I couldn’t locate the mentioned error in
 arcpy. It runs smoothly . I’ve shared  the arcpy projection python script and associated data with the link <a href="https://u.pcloud.link/publink/show?code=kZj5wh0ZtFWXtI9UGjQiD6KXxn5A9hiWDpEX">https://u.pcloud.link/publink/show?code=kZj5wh0ZtFWXtI9UGjQiD6KXxn5A9hiWDpEX</a>. If you find a way using 
gdaltransform and gdalwarp to achieve the  re-projection, that would be 
appreciated.<br></div><div>thank you in advance<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2024 at 2:55 AM Liyuneh Gebre <<a href="mailto:liyenew@gmail.com">liyenew@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Well the arcpy made transformation before re-projection. Appended the sample script in the shared folder as txt. Anyway how can I achieve this ArcPy output re-projection from gdal with the given gdalinfo on the input file  and by editing the PROJ.4 string (target projection )?</div><div>PARAMETER["Latitude of natural origin",20,<br>
      ANGLEUNIT["degree",0.0174532925199433],<br>
      ID["EPSG",8801]],<br>
      PARAMETER["Longitude of natural origin",6378137,<br>
      ANGLEUNIT["degree",0.0174532925199433],<br>
      ID["EPSG",8802]],<br>
      PARAMETER["False easting",5,<br>
      LENGTHUNIT["metre",1],<br>
      ID["EPSG",8806]],</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2024 at 1:11 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    <p>At first sight, I'd say that the ArcPy output is incorrect. The
      SRS definition of its output doesn't match what you want since it
      has <br>
    </p>
    <p>PARAMETER["Latitude of natural origin",20,<br>
      ANGLEUNIT["degree",0.0174532925199433],<br>
      ID["EPSG",8801]],<br>
      PARAMETER["Longitude of natural origin",6378137,<br>
      ANGLEUNIT["degree",0.0174532925199433],<br>
      ID["EPSG",8802]],<br>
      PARAMETER["False easting",5,<br>
      LENGTHUNIT["metre",1],<br>
      ID["EPSG",8806]],</p>
    <p>The "Longitude of natural origin" is completely wrong, and should
      be 5 given the PROJ.4 string you mentionned</p>
    <p>And the the "False easting" should be 0.</p>
    <p>The output of GDAL looks plausible.<br>
    </p>
    <p><br>
    </p>
    <div>Le 30/04/2024 à 00:00, Liyuneh Gebre a
      écrit :<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Hi Even,</div>
        <div>thank you for your response,</div>
        <div>gdal version is: GDAL 3.6.4, released 2023/04/17</div>
        <div>I got the defined target projection included in the link.
          yes, it's geocentric and for further exploration the custom
          project transformation file .gtf extension is also included.</div>
        <div><a href="https://u.pcloud.link/publink/show?code=kZj5wh0ZtFWXtI9UGjQiD6KXxn5A9hiWDpEX" target="_blank">https://u.pcloud.link/publink/show?code=kZj5wh0ZtFWXtI9UGjQiD6KXxn5A9hiWDpEX</a></div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Apr 29, 2024 at
          4:23 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Hi,</p>
            <p>it is difficult to help you with just the elements you've
              provided.</p>
            <p>What could be helpful is:</p>
            <p>- the output of gdalinfo on the input file</p>
            <p>- the output of gdalinfo on the output file generate by
              ArcPy</p>
            <p>- how you define the target projection in ArcPy<br>
            </p>
            <p>- the output of gdalinfo on the output file generate by
              GDAL</p>
            <p>- links to all the above files<br>
            </p>
            <p>- the GDAL version you use</p>
            <p><br>
            </p>
            <p>Totally blind guess: try to add "+towgs84=0,0,0 " in your
              -t_srs PROJ string, to ask PROJ to consider that your
              target CRS datum has the same center and axis orientation
              as WGS84 (and thus go to geographic <--> geocentric
              conversion when changing datums). Otherwise without datum
              shifts, PROJ will consider that longitude,latitude
              coordinates of the geographic CRS underlying the source
              and target CRS is the same.<br>
            </p>
            <p>Even<br>
            </p>
            <div>Le 29/04/2024 à 14:57, Liyuneh Gebre via gdal-dev a
              écrit :<br>
            </div>
            <blockquote type="cite">
              <div>
                <div>
                  <div style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:1rem;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none">Dear
                    all,</div>
                  <div style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:1rem;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none" dir="auto">I am requesting again if you kind have
                    some responds or direction, thank you</div>
                  <div style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:1rem;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none" dir="auto">I have difficulties in accurately
                    reprojecting a raster file to a user-defined
                    projection.</div>
                  <div style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:1rem;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none">I
                    used the following commands in gdal while the output
                    is not similar to arcpy results.  kindly offer your
                    guidance to achieve the same result.  The arcpy uses
                    custom transformation and then reprojection.  <br>
                  </div>
                  <span style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none;display:inline;float:none">gdalwarp
                    -t_srs '+proj=laea +a=6378137.0 +f=0.0 +pm=0
                    +x_0=0.0 +y_0=0.0 +lon_0=20.0 +lat_0=5.0 +units=m
                    +axis=enu +no_defs'  -dstalpha  </span><span style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:1rem;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none">-wo
                    SOURCE_EXTRA=1000 </span><span style="color:rgb(49,49,49);font-family:"-apple-system","helvetica neue";font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:1px;text-decoration:none;display:inline;float:none">-r
                    nearest rain_in.bil rain_projected.bil</span></div>
                <br clear="all">
                <br clear="all">
                <div>
                  <div dir="ltr" class="gmail_signature">
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <div dir="ltr">
                                <div dir="ltr">
                                  <div dir="ltr">
                                    <div dir="ltr"><i><b>Liyuneh Gebre</b></i><i>,
                                      </i><i><i><span><i>Associate
                                              Researcher</i></span></i></i></div>
                                    <div><i>Ethiopian Institute of
                                        Agricultural Research,EIAR<br>
                                      </i></div>
                                    <div dir="ltr">
                                      <div><i>Cell Phone:+251 911858155<br>
                                        </i></div>
                                      <div><i>linkedIn: <a href="https://www.linkedin.com/in/liyuneh-gebre-b842b440/" target="_blank">https://www.linkedin.com/in/liyuneh-gebre-b842b440/</a><br>
                                        </i></div>
                                      <div><i><i><a>skype:liyenew_1</a></i></i></div>
                                      <div><i>Addis Ababa, Ethioipa</i></div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </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">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <br>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr"><i><b>Liyuneh Gebre</b></i><i>, </i><i><i><span><i>Associate
                                  Researcher</i></span></i></i></div>
                        <div><i>Ethiopian Institute of Agricultural
                            Research,EIAR<br>
                          </i></div>
                        <div dir="ltr">
                          <div><i>Cell Phone:+251 911858155<br>
                            </i></div>
                          <div><i>linkedIn: <a href="https://www.linkedin.com/in/liyuneh-gebre-b842b440/" target="_blank">https://www.linkedin.com/in/liyuneh-gebre-b842b440/</a><br>
                            </i></div>
                          <div><i><i><a>skype:liyenew_1</a></i></i></div>
                          <div><i>Addis Ababa, Ethioipa</i></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><i><b>Liyuneh Gebre</b></i><i>, </i><i><i><span><i>Associate Researcher</i></span></i></i></div><div><i>Ethiopian Institute of Agricultural Research,EIAR<br></i></div><div dir="ltr"><div><i>Cell Phone:+251 911858155<br></i></div><div><i>linkedIn: <a href="https://www.linkedin.com/in/liyuneh-gebre-b842b440/" target="_blank">https://www.linkedin.com/in/liyuneh-gebre-b842b440/</a><br></i></div><div><i><i>skype:liyenew_1</i></i></div><div><i></i></div><div><i>Addis Ababa, Ethioipa</i></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><i><b>Liyuneh Gebre</b></i><i>, </i><i><i><span><i>Associate Researcher</i></span></i></i></div><div><i>Ethiopian Institute of Agricultural Research,EIAR<br></i></div><div dir="ltr"><div><i>Cell Phone:+251 911858155<br></i></div><div><i>linkedIn: <a href="https://www.linkedin.com/in/liyuneh-gebre-b842b440/" target="_blank">https://www.linkedin.com/in/liyuneh-gebre-b842b440/</a><br></i></div><div><i><i>skype:liyenew_1</i></i></div><div><i></i></div><div><i>Addis Ababa, Ethioipa</i></div></div></div></div></div></div></div></div></div></div></div>