<?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 ArcGIS API for Python - geometry.project in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-geometry-project/m-p/837659#M3402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;I tried this script with ArcGIS API from Python 1.4.2 like &lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.geometry.html#project" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.geometry.html#project"&gt;arcgis.geometry module — arcgis 1.4.2 documentation&lt;/A&gt; .&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;from arcgis.gis import GIS&lt;/P&gt;&lt;P&gt;from arcgis import geometry&lt;/P&gt;&lt;P&gt;input_geom = [{"x": -17568824.55, "y": 2428377.35}, {"x": -17568456.88, "y": 2428431.352}]&lt;/P&gt;&lt;P&gt;result = geometry.project(geometries = input_geom, in_sr = 3857, out_sr = 4326)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I get this error: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt; &lt;SPAN class=""&gt;AttributeError&lt;/SPAN&gt; Traceback (most recent call last) &lt;SPAN class=""&gt;&amp;lt;ipython-input-8-a89d8e1c23f7&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class=""&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt; &lt;SPAN class=""&gt;----&amp;gt; 1&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;result &lt;SPAN class=""&gt;=&lt;/SPAN&gt; geometry&lt;SPAN class=""&gt;.&lt;/SPAN&gt;project&lt;SPAN class=""&gt;(&lt;/SPAN&gt;geometries &lt;SPAN class=""&gt;=&lt;/SPAN&gt; input_geom&lt;SPAN class=""&gt;,&lt;/SPAN&gt; in_sr &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;3857&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; out_sr &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;4326&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\geometry\functions.py&lt;/SPAN&gt; in &lt;SPAN class=""&gt;project&lt;/SPAN&gt;&lt;SPAN class=""&gt;(geometries, in_sr, out_sr, transformation, transform_foward, gis)&lt;/SPAN&gt; &lt;SPAN class=""&gt; 646&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; gis &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt; 647&lt;/SPAN&gt; gis &lt;SPAN class=""&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class=""&gt;.&lt;/SPAN&gt;env&lt;SPAN class=""&gt;.&lt;/SPAN&gt;active_gis &lt;SPAN class=""&gt;--&amp;gt; 648&lt;/SPAN&gt;&lt;SPAN class=""&gt; return gis._tools.geometry.project( &lt;/SPAN&gt;&lt;SPAN class=""&gt; 649&lt;/SPAN&gt; geometries&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt; 650&lt;/SPAN&gt; in_sr&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;AttributeError&lt;/SPAN&gt;: 'NoneType' object has no attribute '_tools'&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;What I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Karsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2018 17:47:18 GMT</pubDate>
    <dc:creator>KarstenRank</dc:creator>
    <dc:date>2018-07-31T17:47:18Z</dc:date>
    <item>
      <title>ArcGIS API for Python - geometry.project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-geometry-project/m-p/837659#M3402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;I tried this script with ArcGIS API from Python 1.4.2 like &lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.geometry.html#project" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.geometry.html#project"&gt;arcgis.geometry module — arcgis 1.4.2 documentation&lt;/A&gt; .&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;from arcgis.gis import GIS&lt;/P&gt;&lt;P&gt;from arcgis import geometry&lt;/P&gt;&lt;P&gt;input_geom = [{"x": -17568824.55, "y": 2428377.35}, {"x": -17568456.88, "y": 2428431.352}]&lt;/P&gt;&lt;P&gt;result = geometry.project(geometries = input_geom, in_sr = 3857, out_sr = 4326)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I get this error: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt; &lt;SPAN class=""&gt;AttributeError&lt;/SPAN&gt; Traceback (most recent call last) &lt;SPAN class=""&gt;&amp;lt;ipython-input-8-a89d8e1c23f7&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class=""&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt; &lt;SPAN class=""&gt;----&amp;gt; 1&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;result &lt;SPAN class=""&gt;=&lt;/SPAN&gt; geometry&lt;SPAN class=""&gt;.&lt;/SPAN&gt;project&lt;SPAN class=""&gt;(&lt;/SPAN&gt;geometries &lt;SPAN class=""&gt;=&lt;/SPAN&gt; input_geom&lt;SPAN class=""&gt;,&lt;/SPAN&gt; in_sr &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;3857&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; out_sr &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;4326&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\geometry\functions.py&lt;/SPAN&gt; in &lt;SPAN class=""&gt;project&lt;/SPAN&gt;&lt;SPAN class=""&gt;(geometries, in_sr, out_sr, transformation, transform_foward, gis)&lt;/SPAN&gt; &lt;SPAN class=""&gt; 646&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; gis &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt; 647&lt;/SPAN&gt; gis &lt;SPAN class=""&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class=""&gt;.&lt;/SPAN&gt;env&lt;SPAN class=""&gt;.&lt;/SPAN&gt;active_gis &lt;SPAN class=""&gt;--&amp;gt; 648&lt;/SPAN&gt;&lt;SPAN class=""&gt; return gis._tools.geometry.project( &lt;/SPAN&gt;&lt;SPAN class=""&gt; 649&lt;/SPAN&gt; geometries&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt; 650&lt;/SPAN&gt; in_sr&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;AttributeError&lt;/SPAN&gt;: 'NoneType' object has no attribute '_tools'&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;What I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Karsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:47:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-geometry-project/m-p/837659#M3402</guid>
      <dc:creator>KarstenRank</dc:creator>
      <dc:date>2018-07-31T17:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python - geometry.project</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-geometry-project/m-p/837660#M3403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you need to connect to a&amp;nbsp;GIS first.&amp;nbsp; This worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P&gt;from arcgis.geometry import project&lt;BR /&gt;from arcgis.gis import GIS&lt;BR /&gt;&lt;BR /&gt;# This is the line you're missing&lt;BR /&gt;gis = GIS()&lt;BR /&gt;input_geoms = [{"x": -17568824.55, "y": 2428377.35}, {"x": -17568456.88, "y": 2428431.352}]&lt;BR /&gt;result = project(geometries=input_geoms, in_sr=3857, out_sr=4326)&lt;BR /&gt;result&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 17:28:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-geometry-project/m-p/837660#M3403</guid>
      <dc:creator>ChristinaMosnick</dc:creator>
      <dc:date>2018-12-12T17:28:29Z</dc:date>
    </item>
  </channel>
</rss>

