Affine Transformation using script

798
2
05-27-2018 11:47 PM
IndraBisen
Occasional Contributor

Hi, 

I am looking for help on one of the requirement related to spatial adjustment in a automated manner. Scenario and problem statement is as below-

Scenario: 

We have a set of around 55,000 non geo-referenced shape files of land records, converted from CAD drawings. Each shape file contains around 1000 parcels. In a parallel exercise these shape files were geo-referenced using the help of satellite images and control points.  Due to continue updation in original shape file some parcels were split or merged. One of the important point here is we cannot update the original shape file by geo-referenced shape file due to distortion in shape of parcels which is important due to legal aspects. 

Problem Statement:

Now, we want to update the geo-referenced shape file by taking updates from updated shape files. If we do the exercise manually through spatial adjustment then a lot of time and efforts would required, also we have to do the same exercise in a fix interval (once in a month). 

Our Idea:

Around 50% parcels are not changed and have equal number of vertices in both the shape files. As per minimum requirement if we selects 3-4 vertices to create the link then we can do the spatial adjustment using Affine Transformation. We can easily extract co-ordinate values of vertices programmatically from both the shape files for matching parcels. As we know the transformed co-ordinates can be obtained from following formula-

x’ = Ax + By + C

y’ = Dx + Ey + F

We have x & y but how can we get the values of A,B, C, D , E & F.

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

The coefficients are obtained from the matching pair of coordinates undergoing the affine transformation.

Rather than reinvent the wheel, you can use the builtin tools or examine 3rd party libraries that will return the coefficients for you

https://www.lfd.uci.edu/~gohlke/code/transformations.py.html

this would of course assume that the same transformation applies to all files, otherwise you will need the matching pairs.

ArcGIS PRO also has an 'affine' package that can be installed for use within PRO which is derived from this package

https://anaconda.org/anaconda/affine

IndraBisen
Occasional Contributor

Thanks Dan,

Start trying, will revert soon.

Regards

0 Kudos