<?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: Fishnet nor following input layer outline/boundary in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1373718#M69710</link>
    <description>&lt;P&gt;It appears that the fishnet shifted, there is now a gap at the bottom right corner. This time I ran it in the tool, see attached. I mad sure the coordinate system and the extent were the same as the input, as well as the maps coordinate system.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2024 23:53:33 GMT</pubDate>
    <dc:creator>TonyAlmeida</dc:creator>
    <dc:date>2024-01-23T23:53:33Z</dc:date>
    <item>
      <title>Fishnet nor following input layer outline/boundary</title>
      <link>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1372617#M69696</link>
      <description>&lt;P&gt;I am trying to create a fishnet that is created orientated or built incorrectly. Why does the create fishnet do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code, but I am not sure why it's not creating it with the boundary of the input layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy

# Set the workspace (replace with the path to your data)
arcpy.env.workspace = r"C:\temp\Test.gdb"

# Input county PLSS grid feature class
county_plss_grid = r"C:\temp\Test.gdb\SEC_231N3W"

# Output grid feature class
output_grid = "SEC_231N3W_Grid_New2"

# Specify the coordinate system (NAD 1983 HARN StatePlane Oregon North FIPS 3601)
coordinate_system = arcpy.SpatialReference("NAD 1983 HARN StatePlane Oregon North FIPS 3601 (US Feet)")

# Get the extent of the county PLSS grid
extent = arcpy.Describe(county_plss_grid).extent

# Calculate the overall length and width of the input layer
length = extent.width
width = extent.height

# Determine the cell size based on the overall length and width
cell_size = min(length, width) / 10  # You can adjust the denominator for the desired number of cells

# Set the number of rows and columns
num_rows = 10
num_columns = 10

# Set the output coordinate system
arcpy.env.outputCoordinateSystem = coordinate_system

# Create a fishnet with 10 rows and 10 columns using the input layer width and height
fishnet_path = arcpy.management.CreateFishnet(
    out_feature_class=output_grid,
    origin_coord=f"{extent.XMin} {extent.YMin}",
    y_axis_coord=f"{extent.XMin} {extent.YMin + cell_size}",  # Move south to north
    cell_width=cell_size,
    cell_height=cell_size,
    number_rows=num_rows,
    number_columns=num_columns,
    labels="NO_LABELS",
    geometry_type="POLYGON",
    template=county_plss_grid  # Use the original shape as a template
)[0]

print(f"Fishnet created: {output_grid}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 23:48:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1372617#M69696</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2024-01-19T23:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fishnet nor following input layer outline/boundary</title>
      <link>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1372637#M69697</link>
      <description>&lt;P&gt;What do you get if you let the tool calculate the cell size, keeping the LL and UR coordinates the same and the same number of rows and columns?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-fishnet.htm" target="_blank"&gt;Create Fishnet (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 02:11:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1372637#M69697</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-01-20T02:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fishnet nor following input layer outline/boundary</title>
      <link>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1373718#M69710</link>
      <description>&lt;P&gt;It appears that the fishnet shifted, there is now a gap at the bottom right corner. This time I ran it in the tool, see attached. I mad sure the coordinate system and the extent were the same as the input, as well as the maps coordinate system.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 23:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fishnet-nor-following-input-layer-outline-boundary/m-p/1373718#M69710</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2024-01-23T23:53:33Z</dc:date>
    </item>
  </channel>
</rss>

