Skip to main content
deleted 42 characters in body; edited title
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

How to generate Generating sequence of numbers based on an existing attribute and the spatial configuration of polygons using ArcGIS Desktop?

I have come across a very specific problem and I'm sure there must be a way to get around it with Python in ArcGIS, but can't figure it out on my own.

The situation is as follows:

  • The initial data consisted of a Fishnet set of equal sized 150x150m polygons stack side-by-side and covering a total area of 10.2x6.9km (that is 68x46 rectangular polygons = 3128 total polygons). Each polygon received a unique ID (labelled TID) based on a quasi-random pattern.
  • The next step required the creation of a Fishnet of equally sized 25x25m polygons for the given area, which resulted to the production of a fishnet of 408x276 polygons. Using the Spatial Join command, the TID was transferred to the new smaller rectangular polygons and the resulting table has 112608 rows.
  • In the resulting table, there is a column titled TID, which is of type Long and carries the numbers from the underlying layer. More specifically the numbers run from 1 to 3128, and as each polygon was dissected to smaller ones there are now 36 rows associated with each number (therefore 3128*36= 112608 rows).
  • In the same table, there is also a column titled GID and is of type Text, as it is meant to carry the ID of each specific polygon, ideally using some form of concatenation per the following formula: TID + "-" + Sequential numbering of the specific rectangle. This column is currently empty.

What I want to do is the following (the result was created manually editing properties): [![Final outcome][1]][1] [1]: https://i.sstatic.net/cIxOs.jpg

For this to work it needs the following:

  • Assign sequential number based on specific pattern (South to North for each column) for each TID.
  • Concatenate the TID with the sequential number.

My question: Is this possible with Python? If and, if so, would it be possible for someone to guide me through? 

Currently, I'm a novice learner of Python, hence most concepts are beyond my grasp.

Thank you for any aid on this!

How to generate sequence of numbers based on an existing attribute and the spatial configuration of polygons?

I have come across a very specific problem and I'm sure there must be a way to get around it with Python in ArcGIS, but can't figure it out on my own.

The situation is as follows:

  • The initial data consisted of a Fishnet set of equal sized 150x150m polygons stack side-by-side and covering a total area of 10.2x6.9km (that is 68x46 rectangular polygons = 3128 total polygons). Each polygon received a unique ID (labelled TID) based on a quasi-random pattern.
  • The next step required the creation of a Fishnet of equally sized 25x25m polygons for the given area, which resulted to the production of a fishnet of 408x276 polygons. Using the Spatial Join command, the TID was transferred to the new smaller rectangular polygons and the resulting table has 112608 rows.
  • In the resulting table, there is a column titled TID, which is of type Long and carries the numbers from the underlying layer. More specifically the numbers run from 1 to 3128, and as each polygon was dissected to smaller ones there are now 36 rows associated with each number (therefore 3128*36= 112608 rows).
  • In the same table, there is also a column titled GID and is of type Text, as it is meant to carry the ID of each specific polygon, ideally using some form of concatenation per the following formula: TID + "-" + Sequential numbering of the specific rectangle. This column is currently empty.

What I want to do is the following (the result was created manually editing properties): [![Final outcome][1]][1] [1]: https://i.sstatic.net/cIxOs.jpg

For this to work it needs the following:

  • Assign sequential number based on specific pattern (South to North for each column) for each TID.
  • Concatenate the TID with the sequential number.

My question: Is this possible with Python? If so, would it be possible for someone to guide me through? Currently, I'm a novice learner of Python, hence most concepts are beyond my grasp.

Thank you for any aid on this!

Generating sequence of numbers based on existing attribute and spatial configuration of polygons using ArcGIS Desktop?

I have come across a very specific problem and I'm sure there must be a way to get around it with Python in ArcGIS, but can't figure it out on my own.

The situation is as follows:

  • The initial data consisted of a Fishnet set of equal sized 150x150m polygons stack side-by-side and covering a total area of 10.2x6.9km (that is 68x46 rectangular polygons = 3128 total polygons). Each polygon received a unique ID (labelled TID) based on a quasi-random pattern.
  • The next step required the creation of a Fishnet of equally sized 25x25m polygons for the given area, which resulted to the production of a fishnet of 408x276 polygons. Using the Spatial Join command, the TID was transferred to the new smaller rectangular polygons and the resulting table has 112608 rows.
  • In the resulting table, there is a column titled TID, which is of type Long and carries the numbers from the underlying layer. More specifically the numbers run from 1 to 3128, and as each polygon was dissected to smaller ones there are now 36 rows associated with each number (therefore 3128*36= 112608 rows).
  • In the same table, there is also a column titled GID and is of type Text, as it is meant to carry the ID of each specific polygon, ideally using some form of concatenation per the following formula: TID + "-" + Sequential numbering of the specific rectangle. This column is currently empty.

What I want to do is the following (the result was created manually editing properties): [![Final outcome][1]][1] [1]: https://i.sstatic.net/cIxOs.jpg

For this to work it needs the following:

  • Assign sequential number based on specific pattern (South to North for each column) for each TID.
  • Concatenate the TID with the sequential number.

Is this possible with Python and, if so, would it be possible for someone to guide me through? 

Currently, I'm a novice learner of Python, hence most concepts are beyond my grasp.

Source Link

How to generate sequence of numbers based on an existing attribute and the spatial configuration of polygons?

I have come across a very specific problem and I'm sure there must be a way to get around it with Python in ArcGIS, but can't figure it out on my own.

The situation is as follows:

  • The initial data consisted of a Fishnet set of equal sized 150x150m polygons stack side-by-side and covering a total area of 10.2x6.9km (that is 68x46 rectangular polygons = 3128 total polygons). Each polygon received a unique ID (labelled TID) based on a quasi-random pattern.
  • The next step required the creation of a Fishnet of equally sized 25x25m polygons for the given area, which resulted to the production of a fishnet of 408x276 polygons. Using the Spatial Join command, the TID was transferred to the new smaller rectangular polygons and the resulting table has 112608 rows.
  • In the resulting table, there is a column titled TID, which is of type Long and carries the numbers from the underlying layer. More specifically the numbers run from 1 to 3128, and as each polygon was dissected to smaller ones there are now 36 rows associated with each number (therefore 3128*36= 112608 rows).
  • In the same table, there is also a column titled GID and is of type Text, as it is meant to carry the ID of each specific polygon, ideally using some form of concatenation per the following formula: TID + "-" + Sequential numbering of the specific rectangle. This column is currently empty.

What I want to do is the following (the result was created manually editing properties): [![Final outcome][1]][1] [1]: https://i.sstatic.net/cIxOs.jpg

For this to work it needs the following:

  • Assign sequential number based on specific pattern (South to North for each column) for each TID.
  • Concatenate the TID with the sequential number.

My question: Is this possible with Python? If so, would it be possible for someone to guide me through? Currently, I'm a novice learner of Python, hence most concepts are beyond my grasp.

Thank you for any aid on this!