<div dir="auto">EPSG 9835 is an conversion method which needs some parameters defined:<div dir="auto"><a href="https://pyproj4.github.io/pyproj/stable/api/crs/coordinate_operation.html#lambertcylindricalequalareaconversion" target="_blank" rel="noreferrer">https://pyproj4.github.io/pyproj/stable/api/crs/coordinate_operation.html#lambertcylindricalequalareaconversion</a></div><div dir="auto"><br></div><div dir="auto">You can use that conversion to build a projected CRS: <a href="https://pyproj4.github.io/pyproj/stable/build_crs.html#projected-crs">https://pyproj4.github.io/pyproj/stable/build_crs.html#projected-crs</a></div><div dir="auto"><br></div><div dir="auto">That being said, you might also be interested in geodesic area if you have geographic coordinates: <a href="https://pyproj4.github.io/pyproj/stable/examples.html#geodesic-area">https://pyproj4.github.io/pyproj/stable/examples.html#geodesic-area</a></div><div dir="auto"><br></div><div dir="auto">And you can use this to get the Geod class for EPSG:4326:</div><div dir="auto"><a href="https://pyproj4.github.io/pyproj/stable/api/crs/crs.html#pyproj.crs.CRS.get_geod">https://pyproj4.github.io/pyproj/stable/api/crs/crs.html#pyproj.crs.CRS.get_geod</a></div><div dir="auto"><br></div><div dir="auto">Hopefully this helps,</div><div dir="auto">Alan</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, Sep 18, 2020, 9:31 PM Mikhail Kruk <<a href="mailto:meshko@gmail.com" target="_blank" rel="noreferrer">meshko@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Yes, you are correct, that was one of my first attempts and was wrong because I don't really understand these projection systems.</div><div>I now have a better one which sort of works and produces areas in meters by setting first system to</div><div>sr.SetWellKnownGeogCS("EPSG:4326")</div><div>Now I am struggling with selecting the projection coordinate system.  Some suggested that I use cylindrical projection <span> EPSG:9835 which should preserve the area anywhere on the planet but when I try <br></span></div><div><span>sr_proj.ImportFromEPSG(9835)</span></div><div><span>I get error:<br></span></div><div><span>PROJ: proj_create_from_database: crs not found</span></div><div><span><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 18, 2020 at 9:50 PM Michael Patrick <<a href="mailto:geodesy99@gmail.com" rel="noreferrer noreferrer" target="_blank">geodesy99@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 class="gmail_quote"><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>... but
 basically I came to the conclusion that when people talk about an area 
of something on Earth they really mean the area of a projection (am i 
right about that?) and so i need to specify a projection before getting a
 meaningful area.  So i ended up with this code:</div><div><pre><code><span>wkt </span><span>=</span><span> </span><span>"POLYGON ((lon1 lat1, lon2 lat2, lon3 lat3))"</span><span>
poly </span><span>=</span><span> ogr</span><span>.</span><span>CreateGeometryFromWkt</span><span>(</span><span>wkt</span><span>)</span><span>
sr </span><span>=</span><span> osr</span><span>.</span><span>SpatialReference</span><span>()</span><span>
sr</span><span>.</span><span>SetWellKnownGeogCS</span><span>(</span><span>"NAD83"</span><span>)</span><span>
sr</span><span>.</span><span>SetProjCS</span><span>(</span><span>"SRS_PT_TRANSVERSE_MERCATOR"</span><span>)</span><span>
poly</span><span>.</span><span>AssignSpatialReference</span><span>(</span><span>sr</span><span>)</span><span>
poly</span><span>.</span><span>GetArea</span><span>()</span></code><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank"></a></pre></div></div></blockquote><div>I might be dense, but it seems you are assigning sr as a specific transverse mercator, i.e. 
UTM zone 18N, or a custom one centered on the centroid of your polygon. i.e. you don't have sufficient arguments. 

</div><div> </div></div></div><div id="m_-5507655572585127822m_8065453534991225343gmail-m_-2581199688950320765gmail-m_6579958654730313444DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid rgb(211,212,222)">
        <tbody><tr>
        <td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon" rel="noreferrer noreferrer" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" style="width:46px;height:29px" width="46" height="29"></a></td>
                <td style="width:470px;padding-top:12px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link" style="color:rgb(68,83,234)" rel="noreferrer noreferrer" target="_blank">www.avast.com</a>
                </td>
        </tr>
</tbody></table><a href="#m_-5507655572585127822_m_8065453534991225343_m_-2581199688950320765_m_6579958654730313444_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1" rel="noreferrer noreferrer"></a></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>
</div>