<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>The image at
      <a class="moz-txt-link-freetext" href="https://proj.org/en/stable/operations/projections/ortho.html">https://proj.org/en/stable/operations/projections/ortho.html</a> and
      note "Defined area: Global, although only one hemisphere can be
      seen at a time" should answer your question</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 20/01/2025 à 22:45, afernandez via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:1de7c0cb09301.f8a71a8aca6ab@odyhpc.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div>
        <div dir="auto" id="compose-body-wrapper">
          <div dir="auto">
            <div dir="auto">Hello,</div>
            <div dir="auto">While transforming point coordinates from
              lat/lon to a specified projection, I keep running into
              errors while trying to use some projections. The line
              generating the error reads:</div>
            <div dir="auto">        transform =
              osr.CoordinateTransformation(srs_in, srs_out)</div>
            <div dir="auto">For example, when defining  "+proj=webmerc
              +datum=WGS84" srs_out reads:</div>
            <div dir="auto">PROJCS["unknown",</div>
            <div dir="auto">    GEOGCS["unknown",</div>
            <div dir="auto">        DATUM["WGS_1984",</div>
            <div dir="auto">            SPHEROID["WGS
              84",6378137,298.257223563,</div>
            <div dir="auto">                AUTHORITY["EPSG","7030"]],</div>
            <div dir="auto">            AUTHORITY["EPSG","6326"]],</div>
            <div dir="auto">        PRIMEM["Greenwich",0,</div>
            <div dir="auto">            AUTHORITY["EPSG","8901"]],</div>
            <div dir="auto">        UNIT["degree",0.0174532925199433,</div>
            <div dir="auto">            AUTHORITY["EPSG","9122"]]],</div>
            <div dir="auto">    PROJECTION["Mercator_1SP"],</div>
            <div dir="auto">    PARAMETER["central_meridian",0],</div>
            <div dir="auto">    PARAMETER["scale_factor",1],</div>
            <div dir="auto">    PARAMETER["false_easting",0],</div>
            <div dir="auto">    PARAMETER["false_northing",0],</div>
            <div dir="auto">    UNIT["metre",1,</div>
            <div dir="auto">        AUTHORITY["EPSG","9001"]],</div>
            <div dir="auto">    AXIS["Easting",EAST],</div>
            <div dir="auto">    AXIS["Northing",NORTH],</div>
            <div dir="auto">    EXTENSION["PROJ4","+proj=merc +a=6378137
              +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m
              +nadgrids=@null +wktext +no_defs"]].</div>
            <div dir="auto">The completes the transformation and yields
              good results. However, defining the projection as
              "+proj=ortho +lon_0=-75.0 +ellps=WGS84 +datum=WGS84"
              yields srs_out equal to</div>
            <div dir="auto">PROJCS["unknown",</div>
            <div dir="auto">    GEOGCS["unknown",</div>
            <div dir="auto">        DATUM["WGS_1984",</div>
            <div dir="auto">            SPHEROID["WGS
              84",6378137,298.257223563,</div>
            <div dir="auto">                AUTHORITY["EPSG","7030"]],</div>
            <div dir="auto">            AUTHORITY["EPSG","6326"]],</div>
            <div dir="auto">        PRIMEM["Greenwich",0,</div>
            <div dir="auto">            AUTHORITY["EPSG","8901"]],</div>
            <div dir="auto">        UNIT["degree",0.0174532925199433,</div>
            <div dir="auto">            AUTHORITY["EPSG","9122"]]],</div>
            <div dir="auto">    PROJECTION["Orthographic"],</div>
            <div dir="auto">    PARAMETER["latitude_of_origin",0],</div>
            <div dir="auto">    PARAMETER["central_meridian",-75],</div>
            <div dir="auto">    PARAMETER["false_easting",0],</div>
            <div dir="auto">    PARAMETER["false_northing",0],</div>
            <div dir="auto">    UNIT["metre",1,</div>
            <div dir="auto">        AUTHORITY["EPSG","9001"]],</div>
            <div dir="auto">    AXIS["Easting",EAST],</div>
            <div dir="auto">    AXIS["Northing",NORTH]]</div>
            <div dir="auto">but the code generates the following error:</div>
            <div dir="auto">  File
              "/usr/lib/python3/dist-packages/osgeo/ogr.py", line 7400,
              in Transform</div>
            <div dir="auto">    return _ogr.Geometry_Transform(self,
              *args)</div>
            <div dir="auto">RuntimeError: Point outside of projection
              domain</div>
            <div dir="auto">I've tried many other definitions of the
              projection (e.g. "+proj=ortho +lon_0=-75.0 +R=6371229.0")
              but with the same error. I really don't know if I'm doing
              something wrong or if this is a bug and I should create a
              Github ticket. Thanks.</div>
            <div><br>
            </div>
          </div>
        </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">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">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>
  </body>
</html>