Migrate ArcMap COGO To Pro

8201
29
04-22-2019 04:17 PM
Labels (1)
JasonCamerano
Esri Contributor
9 29 8,201

Hello Land Records Folks!

We have just published a tool that allows you to migrate your ArcMap COGO feature classes into the new ArcGIS Pro COGO Enabled line feature class schema.  Those Text fields that contained your COGO information will be converted to the numerical (Double) field type and all the values will be carried over. 

Where Is This Tool?

You can find the tool here: https://bit.ly/2GFEiNl

Download the zip and unpack it to find the tool.  In the future more tools will be added.  We will notify you when this happens so you can re-download the tool box to get all the new changes.

How Do I Use This Tool?

Once you have the toolbox unpacked from the Zip browse to it in the Catalog Pane in ArcGIS Pro by adding a folder connection to the tools location.  You can then right click the toolbox and say Add To Project and this will and the tool box to the Toolboxes group in the Catalog pane for easy access in the future. Finally, to run, double click the tool.  You will be presented with 3 options:

1. First you will point to the Line Feature that you want to migrate

2. Then you will provide a name for the new line feature class that will be created by running this tool. 

3. Optionally you can then provide a name for an error feature class.  This error feature class will have all the line geometries that failed to properly migrate the COGO values.  You can use this to update the new COGO feature class created. 

Field Mapping:

If you have a standard ArcMap COGO enabled Line feature class then there won't be any field mapping necessary.  But if you have a different field that you are using to represent COGO measurements you can field map them in this area.  Additionally if your COGO Direction Field is using North Azimuth you can adjust how that format is handled here.  Just change the first drop down from Quadrant Bearing to the North Azimuth. 

I Have Questions

Please feel free to reply to this blog post or comment on the ArcGIS Online Item and we will get back to you as soon as possible. 

Thanks!

Jason Camerano

29 Comments
CUPPAD
by
New Contributor II

I got errors trying migrating the COGO Lines. 

JasonCamerano
Esri Contributor

Would you be able to send a small sample of the lines that you are trying to migrate?

JasonCamerano
Esri Contributor

Tool has been updated:

Enhancements: Supports users who already have Radius 2 field in their data.  It will convert it form Text to Double if necessary

Fixes: Updated Metadata.  Now both layers (new Pro lines and error lines feature classes) will be added to the map.

WileyBogren
New Contributor III

This tool was working great for me before the latest Pro/PF upgrades to v2.6, but now it gives me what seems like a broken-packages/paths kind of error, although I haven't seen this one anywhere else before.

Is anyone else having success migrating ArcMap COGO to Pro in v2.6?

Thank you!

Wiley

-----------------------------

some screenshots of the error below.  In the cmd line example, it's an early part of a much larger data migration process that also includes things like simplify curves and some corruption resolution.  In the Pro example, it's just the latest (April 2020) version of the toolbox-packaged script.

full error text:

overrun

Traceback (most recent call last):

  File "PFDataLoader.py", line 854, in <module>

    buildDatabase(caddb, srcLines, srcPoints, stageCSV)

  File "PFDataLoader.py", line 90, in buildDatabase

    db.upgradeCOGO2Pro()

  File "PFDataLoader.py", line 350, in upgradeCOGO2Pro

    arcpy.MigrateArcMapCOGOToPro.MigrateCOGOToPro2(self.cadastralLines, self.proCogoLines, self.proCogoErrors, "Quadrant Bearing", "ANGLE", "DISTANCE", "RADIUS", "RADIUS2", "ARCLENGTH", "Arc Length", "Field with L and R", "SIDE")

  File "C:\Users\wbogren\Documents\ArcGIS\pro_toolbox\MigrateCOGO_toArcGIS_Pro.tbx", line 66, in MigrateCOGOToPro2

  File "C:\Users\wbogren\Documents\ArcGIS\pro_toolbox\MigrateCOGO_toArcGIS_Pro.tbx", line 63, in MigrateCOGOToPro2

  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 511, in <lambda>

    return lambda *args: val(*gp_fixargs(args, True))

arcgisscripting.ExecuteError: ERROR 999998: The system cannot find the path specified.

Failed to execute (MigrateCOGOToPro2).

JasonCamerano
Esri Contributor

Hello Wiley,

I've update the tool.  I think I found the reason that was happening.  Could you re-download and try it again please?

Here's the link again:  https://www.arcgis.com/home/item.html?id=72066dab7b774ca59b649bf807cc9945 

Thanks!

Jason Camerano

WileyBogren
New Contributor III

Hi Jason,

Thanks for the quick response and update!

I downloaded and reran the tool, but got the same error.

I won't be able to test again until next week, but hopefully at that point I can try a few testing variations.

-Wiley

JasonCamerano
Esri Contributor

So one thing I seemed to have found that stops the issue is to right click on the Script Tool and go to Properties.  On the General tab uncheck the box that says Import Script.  It will then bring up windows browser.  If you can browse to the area where the tool is downloaded you will browse to a .py file.  Just click that and click OK to the windows explorer. Then click OK to the overwrite message.  Now run the tool again and it should run fine.

I'm looking into what importing the script does that's causing issues. 

WileyBogren
New Contributor III

Yes, looks like this property change works!

Do you know how I can build this workaround into a larger python/arcpy script run from an independent terminal? 

###

import arcpy 

arcpy.ImportToolbox(r"...\pro_toolbox\MigrateCOGO_toArcGIS_Pro.tbx")

...

arcpy.MigrateArcMapCOGOToPro.MigrateCOGOToPro2(cadastralLines, proCogoLines, proCogoErrors, "Quadrant Bearing", "ANGLE", "DISTANCE", "RADIUS", "RADIUS2", "ARCLENGTH", "Arc Length", "Field with L and R", "SIDE")

###

JasonCamerano
Esri Contributor

If you save the toolbox with Import Script turned off and Store tool with relative path checked on then just store the script in the same folder as the toolbox and that should work.  Then everyone can just point to the location where the toobox is located and run the tool.  

WileyBogren
New Contributor III

Works!

Thank you, Jason!

BinhLe2
New Contributor III

Jason,

I just tried the tool recently. It seems that the tool is not population the new direction field. I am converting ArcMap COGO to ArcGIS Pro COGO and the direction field is all null.

 

edit: I have an ANGLE field from the old ARCINFO schema, which is where the bearing attributes are. The DIRECTION field in null in ArcMAP. My work-around is to calculate the ANGLE over to DIRECTION.

DrewDowling
Occasional Contributor III

This tool is producing errors when the seconds have decimals. e.g.

S 11-11-11 W works

but

S11-11-11.2549 W records as an error.

Is this expected and is it saft to round?

JasonCamerano
Esri Contributor

Hey @DrewDowling 

Good find.  I've updated the script.  It should now just port over the decimal value like the image below

JasonCamerano_0-1642726360904.png

Thanks for the tip!

DrewDowling
Occasional Contributor III

@JasonCameranoThank you so much. The script is working great now.

Mike_Fazio_SRCPA
New Contributor II

Hello, Jason - I am attempting to convert our ArcMap COGO lines to ArcPro COGO lines using your tool, but everytime I try to do so I get the error "Cannot find field 'shape.len'. Any suggestions? 


Mike_Fazio_SRCPA_0-1650485777241.png

 

JasonCamerano
Esri Contributor

Hey @Mike_Fazio_SRCPA 

Would you be able to email me the data (or a portion of the data)? 

Is the data on a FGDB or SDE database? 

My email is jcamerano@esri.com

I'll take a look at it.

Thanks!

Jason Camerano

Mike_Fazio_SRCPA
New Contributor II

Thank you @JasonCamerano . I sent you an email with a sample dataset. Please let me know if you have any issues with the format. 

Regards,

Mike F. 

JasonCamerano
Esri Contributor

@Mike_Fazio_SRCPA

I uploaded the newest version of the script to ArcGIS Online site above.  Everything seems to be working on the test cases above that were failing. 

The original issue was it was failing when running on data stored on an SDE database.  That has now been fixed and is working as expected. 

Good find Mike! Thanks!

Mike_Fazio_SRCPA
New Contributor II

Thank you for all of your help @JasonCamerano ! 

KimberlyEmme
New Contributor

Hello @JasonCamerano 

I am currently having an error when trying to use the script saying that polyline is unsupported. Is there a way to change the script to support polylines?

KimberlyEmme_0-1661393980448.png

Regards,

Kimberly

JasonCamerano
Esri Contributor

Hey @KimberlyEmme 

A couple questions:

1. This feature class that you're trying to migrate to Pro COGO, is it COGO enabled in ArcMap?

2. If it is not, then you can just go directly into Pro and enable COGO on those lines.  If you had used the ArcMap traverse tool to create the lines and the feature class was not COGO enabled in ArcMap, none of the COGO values were stored on the lines.  However, if you didn't manipulate the lines, after you just bring them into Pro and enable COGO you can run Update COGO and the COGO values will be updated. 

3. If the feature class you are trying to migrate to Pro is COGO enabled, can you send me a small sample?  I am curious how polylines exist in the data. 

RickHollatz
New Contributor II

Just an FYI. I tried the script on a COGO enabled line Feature Class that resides within a FGDB Feature Dataset, said Feature Class also being involved in a topology, and it resulted in error. The same Feature Class was exported to stand alone in a FGDB and the script worked great. (ArcGIS Pro version 3.1.3). I didn't test further to see if it was due to being inside a Feature Dataset or if the topology is the culprit.

AmirBar-Maor
Esri Regular Contributor

@RickHollatz thanks for reporting. We plan to address that.

KatClifton
New Contributor III

@AmirBar-Maor @JasonCamerano 

Is this tool still needed as an extra step if you run the Upgrade ArcMap Fabric to ArcGIS Pro Parcel Fabric Geoprocessing Tool?

If so, at what point in the migration process should this tool be run?

Thanks.

AmirBar-Maor
Esri Regular Contributor

@KatClifton 

If you are upgrading from the ArcMap Parcel Fabric to the new one you do not need this step. This tool is only intended for customers who used the old ArcMap COGO schema (string-based).

JasonCamerano
Esri Contributor

Hey@RickHollatz 

I ran the script multiple times with a COGO line feature class that is participating in a topology and I was not able to reproduce the error.  Would you be able to send me a sample of your data so I could test it out?

RickHollatz
New Contributor II

My apologies @JasonCamerano 

I've just tried a bunch of times and different things to reproduce it myself before packaging the data to send, and I can't reproduce it now. It is working correctly with the same input dataset. Sorry for the effort but on the positive I'm happy to confirm it's working fine regardless of the topology. 

JasonCamerano
Esri Contributor

Keep my power a secret!  I can edit code psychically through space and time and I can fix bugs through the cosmos 🙂 

DeniseWesley1
New Contributor

I am sorry, but while I can keep a secret I feel I must ask you to share your superpowers 😎

Downloading......

Do you have an invisibility cloak?