Align feature does not work for country boundaries

801
6
06-30-2021 11:14 PM
Labels (3)
tonybestpro
New Contributor II

Using ArcGIS Pro and ArcPy (https://pro.arcgis.com/en/pro-app/latest/tool-reference/editing/align-features.htm), I was trying to align the Canada border to the USA border, but the tool does not work.

- downloaded the shapefiles of countries from https://hub.arcgis.com/datasets/2b93b06dc0dc4e809d3c8db5cb96ba69_0/explore?location=-2.688200%2C0.00...

- simplify the Canada shapefile by using mapshaper, so the borders between Canada and USA have small gaps: mapshaper ca.shp -simplify 30% keep-shapes -o ca_30.shp

- arcpy.edit.AlignFeatures("ca_30.shp", "us.shp", "0.00005 Decimal Degrees") # I also tried a lot of other search distance

- opened ArcGIS Pro and opened the "Align feature" tool and tried a lot of different search distances

- The results are either wired Canada borders or the gaps are still there

Attached are the shapefiles

 

Tags (3)
0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

If the borders are oversimplified, then finding candidate matches will be less likely.

Perhaps a screen grab of the inputs prior to alignment would be useful


... sort of retired...
tonybestpro
New Contributor II

@DanPatterson Please see the attached screenshots. The actual shapefiles are also attached in the OP. Thanks

tonybestpro_0-1625151596890.png

tonybestpro_1-1625151651020.png

 

 

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

Both inputs are multipart features. There is a known issue with Align Features tool in processing multipart features.

Please try the following:

  • Use Multipart To Singlepart tool on both inputs so they become singleparts.
  • Run Align Features with 0.05 decimal degree. You should get the expected result. The 0.00005 decimal degree you used is too small.

Hope that helps.

tonybestpro
New Contributor II

@DanLee Wow, it works for the above ESRI data after converting to single-part. However, it does not work for my another similar US/CA data, which is attached. Any idea?

Screenshot before align:

tonybestpro_1-1625585110765.png

 

 

Screenshot after align:

tonybestpro_2-1625585233842.png

 

 

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

Thank you for reporting this problem. Sorry for the inconvenience it may have caused. We have logged a bug and will try to fix it soon.  You can also submit a Tech Support issue; that way you will be able to check the bug fixing status.

tonybestpro
New Contributor II