I have a shapefile (polygon) with a large number of polygons (roughly 10,000) that form a narrow but very long belt that windes through half a country and another shapefile (polyline) that represents the western border of the belt. Of those 10,000 polygons only about one third touches the border. So simply cutting the line into smaller lines using intersect, number those and then join back does not work. I need to gibe each polygon a unique ID-number that consecutively increases from the first polygon in the north to the last polygon in the south. My first idea, to simply create centroids, calculate the y-value for them and sort decreasingly, does not work either because the southern end is not the most southern point of the belt.
My question now is how to get this done with an automated action and without leaving the polygons behind that do not touch the border.