Repetitive task: model builder or python

4314
26
Jump to solution
05-26-2017 12:36 PM
CelesteWalz
Occasional Contributor

I have many gpx files that I need to get into a mapping project.

The workflow looks like this:

1.  Open gpx file in ascii editor to fix the last elevation. Every file from this vendor has the last elevation as -10000000 which is of course incorrect.

2.  Use the 'gpx to points' tool to convert to a feature class

3.  Use the 'points to line' tool to convert to line

I've only played a bit in Model Builder, but this looks like something that could be done. Not sure how model builder works with just gpx files as input - my first tries haven't been successful (but then again, I'm kinda shooting in the dark here).  I don't know python, but I have done snippets of codes for other projects, so maybe that is the way to go?

Any suggestions, or a good place to start?

I'll be going back through the model builder help to see what I may have missed but any other input would be most appreciated.

EDIT: I managed to get this to work; I've attached a zip file of the toolbox. If anybody is interested, these files were from an app that I use to record my travels; the resulting lines went in to building this StoryMap: http://arcg.is/2sbFG27  I used the model/tool to process 50+ 'treks'.

0 Kudos
26 Replies
CelesteWalz
Occasional Contributor

Happy to! What is the best to do that?

curtvprice
MVP Esteemed Contributor

> Best way to attach toolbox?

zip it up, edit your original post, and attach the zipfile. Thanks!

CelesteWalz
Occasional Contributor

I want to use this model for another project - that's why I built, obviously.  I'm clearly having a blonde moment, as I can't figure out how to 'open' it up to change the input and output parameters. I've tried to rt-click -->edit (nothing happens), rt-click-->open (empty frame opens with toolname in the title), double-clicking (same) and debug (same) and I don't see the lovely flowchart/diagram that I built. Hoping there is a simple mistake I'm making. I can't open it in the original project, or in the new project. If I open model builder first, and then add my tool I get a simplified flowchart that is just my tool (that I can't seem to open). I'm thinking the fidget-spinner looking thing in the yellow box is my model but I can't get to it. Sorry if this is a beginner question. I was pretty pleased that I got it to work and I'd really like to use it again.

 

0 Kudos
ChrisDonohue__GISP
MVP Alum

When right-clicking on the Model, instead of chosing "Open" choose "Edit".  Then you can click on the elements and modify them.

If it won't open for Edit, check the permissions on your computer.

Chris Donohue, GISP

ChrisDonohue__GISP
MVP Alum

Also, just poking around in Support, I found this known bug, which may be the issue:

Bug: Cannot edit a custom tool after creating it 

Chris Donohue, GISP

CelesteWalz
Occasional Contributor

Thanks for the link. I followed the instructions in the bug report, and still nothing.

0 Kudos
ChrisDonohue__GISP
MVP Alum

If you have access to ESRI Customer Support, it may be worth contacting them as this issue may involve a whole variety of complexities.

Esri Support Home 

Chris Donohue, GISP

CelesteWalz
Occasional Contributor

Unfortunately, I don't have access to tech support. I'll keep poking around and see if I can figure it out. Thanks for all your help.

0 Kudos
CelesteWalz
Occasional Contributor

Is there a way to open the underlying code rather than try to open it in model builder? I really only need to change the input directory and the output geodatabase. 

0 Kudos
ChrisDonohue__GISP
MVP Alum

That depends on whether the code has been left "exposed" or not.  Usually it is hidden (not exposed).

To check this, I just downloaded the toolbox you posted originally and when I opened it at least on my end don't see any Models in it to check.  It is possible, however, that this is because I only have ArcGIS Desktop 10.2.1 and I believe this tool came into existence in 10.3.  So, unfortunately, no way for me to check.

Just as a double-check, can you confirm that there is a Model within the toolbox?  It's a longshot, but it is possible the model got lost along the way.  If that is the case, maybe there are backups or the model can be re-acquired?

 Chris Donohue, GISP