DOI-USGS / gems-tools-pro

GeMS Tools for ArcGIS Pro
Creative Commons Zero v1.0 Universal
45 stars 15 forks source link

'Project Map Data to Cross Section' tool fails #19

Open sekbennett opened 2 years ago

sekbennett commented 2 years ago

Long time listener, first time caller.

I'm making my first ever attempt at creating 3 geologic cross sections using the GeMS toolbox. I'm running Pro v2.9.2 and GeMS toolbox v2.7.0. I'm trying to run the 'Project Map Data to Cross Section' tool and cannot get it to run without failing. The line for each of my 3 cross sections are in their own, independent line feature class (e.g. 'CrossSection_A', 'CrossSection_B', CrossSection_C') and I'm attempting to use only 1 at a time in the 'Section line' parameter. See below for screen grabs of my input parameters and the resultant error message.

I first tried project 3 Feature Classes (ContactsAndFaults, Geologic Lines, and OrientationPoints) and received the error message several times. I tried again, only projecting ContactsAndFaults, but received the same error message.

One thing worth noting: my GeMS-style gdb does NOT have empty Feature Datasets for each of my 3 cross sections. I assume this is not an issue, since the info pop-out for the 'Output name token' parameter says that if the cross section Feature Dataset does not exist, it will be created.

Any help getting the tool to work to create 3 cross section Feature Datasets would be very much appreciated. I'd hate to have to revert my gdb to ArcMap and use the ArcMap GeMS tools....or even worse, revert to constructing my cross sections in Illustrator.

Cheers, Scott

Bennett x section input parameters

Bennett x section error message

rhaugerud commented 2 years ago

Scott-

Is it easy to send me a copy of the geodatabase you are working on? I think the problem lies in line 273, which reads

arcpy.CalculateField_management (tempXsLine, idField, '01','PYTHON')

and perhaps should be

arcpy.CalculateField_management (tempXsLine, idField, '"01"','PYTHON')  # note added double quotes

But it will be easiest to confirm this if I can use your geodatabase.

cheers,

Ralph


From: sekbennett @.> Sent: Thursday, April 7, 2022 12:11 PM To: usgs/gems-tools-pro @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [usgs/gems-tools-pro] 'Project Map Data to Cross Section' tool fails (Issue #19)

This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.

Long time listener, first time caller.

I'm making my first ever attempt at creating 3 geologic cross sections using the GeMS toolbox. I'm running Pro v2.9.2 and GeMS toolbox v2.7.0. I'm trying to run the 'Project Map Data to Cross Section' tool and cannot get it to run without failing. The line for each of my 3 cross sections are in their own, independent line feature class (e.g. 'CrossSection_A', 'CrossSection_B', CrossSection_C') and I'm attempting to use only 1 at a time in the 'Section line' parameter. See below for screen grabs of my input parameters and the resultant error message.

I first tried project 3 Feature Classes (ContactsAndFaults, Geologic Lines, and OrientationPoints) and received the error message several times. I tried again, only projecting ContactsAndFaults, but received the same error message.

One thing worth noting: my GeMS-style gdb does NOT have empty Feature Datasets for each of my 3 cross sections. I assume this is not an issue, since the info pop-out for the 'Output name token' parameter says that if the cross section Feature Dataset does not exist, it will be created.

Any help getting the tool to work to create 3 cross section Feature Datasets would be very much appreciated. I'd hate to have to revert my gdb to ArcMap and use the ArcMap GeMS tools....or even worse, revert to constructing my cross sections in Illustrator.

Cheers, Scott

[Bennett x section input parameters]https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F19559305%2F162278619-c302d7ca-1223-45f1-a39a-f54c5bc09199.png&data=04%7C01%7Crhaugerud%40usgs.gov%7C34216f1d92f84aafd3f608da18ca6704%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637849555653088211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UeEvepNe%2BTgu%2FZzohgRwfahbWldfRB%2Fxb2SDMSWjUBc%3D&reserved=0

[Bennett x section error message]https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F19559305%2F162278633-9caf5a55-29b3-4fd7-bc9d-f1e8e95ba917.png&data=04%7C01%7Crhaugerud%40usgs.gov%7C34216f1d92f84aafd3f608da18ca6704%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637849555653088211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KpE9vaVijctuuJVFeuL%2FWRva%2F40ulyNCB3TN2%2BKnQ%2BQ%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fusgs%2Fgems-tools-pro%2Fissues%2F19&data=04%7C01%7Crhaugerud%40usgs.gov%7C34216f1d92f84aafd3f608da18ca6704%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637849555653088211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TgWRSgsIJzjopsMWkEnBkuCX8zpAu6feOrzNtPiu6Sc%3D&reserved=0, or unsubscribehttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFS3CJMV4OTFYNNENYVP4MLVD4XNPANCNFSM5S2KZT7Q&data=04%7C01%7Crhaugerud%40usgs.gov%7C34216f1d92f84aafd3f608da18ca6704%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C637849555653088211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Z7%2BFSjrysZ2BlUHsRZXMB4WlyBqlmlnXXVEBUaRrBPo%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ethoms-usgs commented 2 years ago

Hi Ralph, I am working on it. I got that one right off the bat, but there are other Python 3 issues raising their heads. Sorry, we have been chatting through Teams about it, but I should have replied to Scott here. I am getting the same error he described with my own testbed.

sekbennett commented 2 years ago

Thanks, guys. I just shared a link to a copy of the gdb, which I put up on OneDrive. Let me know if you have any issue accessing it.

sekbennett commented 2 years ago

Hi guys....I was hoping to construct 3 cross section in ArcGIS Pro this week using this nifty tool. Do you think it's best to hang tight and wait for a solution in the next day or so from you and your team, or do you suggest I revert to the ArcMap version of the GeMS toolbox and use an older version of the tool? I guess it depends on whether you suspect the problem I'm having is due to an issue with my gdb or if it's an issue with the tool itself (and how long it might take to debug the tool). I appreciate your time with this and value any time estimate you might be able to provide.

Cheers, Scott

ethoms-usgs commented 2 years ago

Hard to say, it is my top priority right now and I can devote most of the next few days to it, but it probably won't be ready this week. Might be best to try the ArcMap version or my standalone cross section toolbox (https://github.com/ethoms-usgs/Cross-Section).

I was able to fix the initial problem you described but the tool then failed further along. It would run to completion with no errors but the output feature classes were empty. I am also re-writing a few sections to hopefully be more efficient.

sekbennett commented 2 years ago

Ok...thanks for the update, Evan. And thanks for your hard work on fixing this!

ethoms-usgs commented 2 years ago

I posted a version of the tool to a branch at the repo recently: https://github.com/usgs/gems-tools-pro/tree/xs-update Download the toolbox from there and try it out. I am gathering documentation suggestions (and bugs) before merging it with the main branch.