How to make all polygons origin(start point) same?

1213
1
12-04-2016 08:02 PM
chandrasekhar_reddyguda
New Contributor III

Hi All,

I have nearly ~ 5 lakh polygons, according with customer requirement we need make all polygons origin is same.

from the below illustration first row polygons has no same start point (red start is start point of each polygon)

from the second row we can notice that all polygon start point is same (blue start at upper left corner of polygon)

now i would like to change all polygons start point (vertex) should be the same. Hence kindly provide a best solution in order to solve the above issue via  programmatically ( .net ,python)  or in-built ArcMap 10.2.2 tool.

Thanks in advance

Regards,

Chandrasekhar Guda

1 Reply
TieshengWu
Occasional Contributor

Hi Guda,

My python script will look like below if it's me to deal with the problem.

row_poly=arcpy.SearchCursor('mypolygon')

row_poly.reset()

row_s=row_poly.next()

while row_s:

    feat=row_s.shape

    ...                    # x,y=feat.x, feat.y ,       find all the x,  y   coordinates of every polygon

    x0s=min(x)        #   the leftmost x coordinates, can be  many points

    y0=max( y for x=x0s) ?             #   it depends on your difinition of start point

    array_new=...    # reorder your point array with the x0,y0 be the first point

    ...                      #delete old polygon

    row_s.shape=polygon(array_new,...)

    ...

row_s=row.poly.next()

But I don't know whether it's the best solution.