<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is the proper way to reproject a geometry object using arcpy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89402#M6940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan...&amp;nbsp; Sometimes one just needs a pointer to the right doc. I tell ya, if the Esri UC was happening this year I'd hunt you down and buy you an adult beverage of your choice.&amp;nbsp; Really appreciate all the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2020 17:43:46 GMT</pubDate>
    <dc:creator>EricEagle</dc:creator>
    <dc:date>2020-06-10T17:43:46Z</dc:date>
    <item>
      <title>What is the proper way to reproject a geometry object using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89400#M6938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with a geometry object projected in EPSG 6455 but would like to add its extent to a feature class that is in EPSG 4326.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.Project_management() wants a feature class as input and output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I've got so far (please note that using ZLAS is in no way an endorsement of ZLAS as a proprietary format)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808080;"&gt;### ZLAS testing ###
&lt;/SPAN&gt;zlas = &lt;SPAN style="color: #6a8759;"&gt;"C:/Data/USGS_LPC_IL_4County_Cook_2017_LAS_15008550_LAS_2019.zlas"
&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;
&lt;/SPAN&gt;des = arcpy.Describe(zlas)

&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(des.dataType)
&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(des.spatialReference.factoryCode)
&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(des.extent)

polys = []

las_extent = [
            [
                [des.extent.YMin&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;des.extent.XMin]&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                &lt;/SPAN&gt;[des.extent.YMax&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;des.extent.XMin]&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                &lt;/SPAN&gt;[des.extent.YMax&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;des.extent.XMax]&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                &lt;/SPAN&gt;[des.extent.YMin&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;des.extent.XMax]
            ]
        ]
&lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;coord_ring &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;las_extent:
    poly = arcpy.Polygon(arcpy.Array([arcpy.Point(*coords) &lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;coords &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;coord_ring])&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;arcpy.SpatialReference(&lt;SPAN style="color: #6897bb;"&gt;6455&lt;/SPAN&gt;))
    polys.append(poly)&lt;/PRE&gt;&lt;P&gt;How would I coerce "poly" from 6455 to 4326 without incurring the IO expense of writing feature classes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The background, if useful: I am plowing through a directory structure with thousands and thousands of point clouds.&amp;nbsp; The intent is to gather their extents, add them to a global feature class, and then serve that feature class up as a service identifying where all of our holdings are, allowing users to browse our holdings geographically rather than trying to hunt through a directory tree.&amp;nbsp; Because many of the files are projected differently (some requiring transformation - default transformation being fine as this isn't high precision) I want to harmonize them all into a single GCS feature class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89400#M6938</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2021-12-10T23:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is the proper way to reproject a geometry object using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89401#M6939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this example in&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/classes/polygon.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/classes/polygon.htm"&gt;Polygon—ArcPy classes | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="" style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;PRE class="" style="margin-bottom: 1.55rem;"&gt;&lt;STRONG style="font-weight: 500;"&gt;projectAs (spatial_reference, {transformation_name})&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class="" style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;TABLE style="background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.55rem;"&gt;&lt;THEAD style="background-color: #efefef; border-bottom: 1px solid #cccccc; font-size: 1rem;"&gt;&lt;TR style="border-bottom: none;"&gt;&lt;TD class="" style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;Parameter&lt;/TD&gt;&lt;TD class="" style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;Explanation&lt;/TD&gt;&lt;TD class="" style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;Data Type&lt;/TD&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;DIV class=""&gt;spatial_reference&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;P&gt;The new spatial reference. This can be a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;object or the coordinate system name.&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/classes/spatialreference.htm" style="color: #0074b8; text-decoration: none;"&gt;SpatialReference&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-bottom: none;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;DIV class=""&gt;transformation_name&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;P&gt;The geotransformation name.&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;String&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 17:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89401#M6939</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-10T17:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: What is the proper way to reproject a geometry object using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89402#M6940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan...&amp;nbsp; Sometimes one just needs a pointer to the right doc. I tell ya, if the Esri UC was happening this year I'd hunt you down and buy you an adult beverage of your choice.&amp;nbsp; Really appreciate all the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 17:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89402#M6940</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2020-06-10T17:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: What is the proper way to reproject a geometry object using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89403#M6941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will be online &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&amp;nbsp; &amp;nbsp;&lt;IMG class="jive_emoji" src="https://community.esri.com/images/emojis/1f37a.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 18:19:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-is-the-proper-way-to-reproject-a-geometry/m-p/89403#M6941</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-06-10T18:19:46Z</dc:date>
    </item>
  </channel>
</rss>

