<?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 Is there a way to calculate number of rows and columns in Python for Grid Index Features tool? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-a-way-to-calculate-number-of-rows-and/m-p/875646#M4889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the Grid Index Features to generate a grid based on scale and extent.&amp;nbsp; I want to dynamically determine the number of rows and columns, just like the tool dialog does.&amp;nbsp; Is there anyway to calculate these values dynamically based on the extent and scale?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Grid Index Features dialog" class="image-1 jive-image j-img-original" src="/legacyfs/online/454225_Grid Index Features dialog.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Python code I am trying to use.&amp;nbsp; However, no matter what I try, the number of rows and columns defaults to 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; line-height: 19px; font-family: Consolas, 'Courier New', monospace; font-size: 14px; font-weight: normal; white-space: pre; background-color: #1e1e1e;"&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GridIndexFeatures_cartography(Grid_Index_FC, Buffered_Extent_FC,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;intersect_feature&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NO_INTERSECTFEATURE"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;use_page_unit&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"USEPAGEUNIT"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;scale&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;2000&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;polygon_width&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"4 Inches"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;polygon_height&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"4 Inches"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#origin_coord=orig_coord,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#number_rows="", number_columns="",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;starting_page_number&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"1"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;label_from_origin&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NO_LABELFROMORIGIN"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jul 2019 18:30:35 GMT</pubDate>
    <dc:creator>JorgeGarcia-Iniguez</dc:creator>
    <dc:date>2019-07-24T18:30:35Z</dc:date>
    <item>
      <title>Is there a way to calculate number of rows and columns in Python for Grid Index Features tool?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-a-way-to-calculate-number-of-rows-and/m-p/875646#M4889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the Grid Index Features to generate a grid based on scale and extent.&amp;nbsp; I want to dynamically determine the number of rows and columns, just like the tool dialog does.&amp;nbsp; Is there anyway to calculate these values dynamically based on the extent and scale?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Grid Index Features dialog" class="image-1 jive-image j-img-original" src="/legacyfs/online/454225_Grid Index Features dialog.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Python code I am trying to use.&amp;nbsp; However, no matter what I try, the number of rows and columns defaults to 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; line-height: 19px; font-family: Consolas, 'Courier New', monospace; font-size: 14px; font-weight: normal; white-space: pre; background-color: #1e1e1e;"&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GridIndexFeatures_cartography(Grid_Index_FC, Buffered_Extent_FC,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;intersect_feature&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NO_INTERSECTFEATURE"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;use_page_unit&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"USEPAGEUNIT"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;scale&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;2000&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;polygon_width&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"4 Inches"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;polygon_height&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"4 Inches"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#origin_coord=orig_coord,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#number_rows="", number_columns="",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;starting_page_number&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"1"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;label_from_origin&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"NO_LABELFROMORIGIN"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 18:30:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-a-way-to-calculate-number-of-rows-and/m-p/875646#M4889</guid>
      <dc:creator>JorgeGarcia-Iniguez</dc:creator>
      <dc:date>2019-07-24T18:30:35Z</dc:date>
    </item>
  </channel>
</rss>

