I first generated a square tessellation (using Generate Tesselation) using the following:

arcpy.GenerateTessellation_management(Output_Feature_Class="/File Location Removed", Extent="371935.1483 411977.256099999 1618490.2735 1596583.8365", Shape_Type="SQUARE", Size="1 SquareKilometers", Spatial_Reference="PROJCS['NAD_1983_Texas_Statewide_Mapping_System',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',1000000.0],PARAMETER['False_Northing',1000000.0],PARAMETER['Central_Meridian',-100.0],PARAMETER['Standard_Parallel_1',27.41666666666667],PARAMETER['Standard_Parallel_2',34.91666666666666],PARAMETER['Latitude_Of_Origin',31.16666666666667],UNIT['Meter',1.0]];-37624400 -27099700 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision")

Now I am needing to add centroid coordinates for each grid using ArcGIS Pro.

I have tried to use add geometry attributes, polygon to point, and using Python code in ArcGISPro. I also tried using (using How To: Find the centroid of polygons using Calculate Geometry). However, I keep getting the same centroid information for all of the individual grids.

  • What parameters did you use with Create Fishnet? There is a checkbox that outputs the centroids as a second feature class of points. – PolyGeo Feb 22 '17 at 23:56
  • I actually used Generate Tessellation to create the grid and then select by location the grids that intersect my location. – Amber Feb 23 '17 at 0:01
  • My request for clarification then becomes "What parameters did you use with Generate Tesselation and how precisely did you try to add centroid information?" Please use the edit button beneath your question to provide any requested clarifications. – PolyGeo Feb 23 '17 at 0:05
  • Make sure that all polygons is not in fact one big multipart polygon – BERA Feb 23 '17 at 20:08
  • Very busy day and had limited time to look at this issue, but I do believe it is one large polygon. However, when I add centroids it will add a point in each grid. So my attribute table shows over 700,000 individual coordinates for each grid. But, the coordinates are all identical. – Amber Feb 24 '17 at 1:44

I just created a Square tessellation, added X and Y fields (DOUBLE as data type) and ran code below. Could you try this on your data:

with arcpy.da.UpdateCursor("GenerateTessellation",['X','Y','SHAPE@XY']) as cursor:
    for row in cursor:

enter image description here

  • Thank you that worked---I had to do before I clipped the grid to my state shapefile. – Amber Feb 24 '17 at 19:29
  • Could you mark my answer as solution if it solved your problem – BERA Feb 25 '17 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.