1

I have created a model to create a projected feature class from a KML/KMZ. The reason for this is that once I get the model to work, I will be adding a script at the end to create attributes from the PopupInfo field that is created from the KML to Layer tool. I'm using ArcGIS Pro 2.9.5 (10.9). Before you say I should upgrade, my organization isn't upgrading yet.

For the KML to Layer tool, I've set the Input KML and Output Location as model parameters. For the Output Data Name, I used the calculate value tool to get the KML name from the Input Kml stripping the path and extension. Output is "Value". I set the KML to Layer Output Data Name as %Value%. The tool automatically creates a geodatabase with the name of %Value%.gdb and places the Point/Polyline and Polygon feature classes in that database. I use the Select Data tool to get the Points feature class from the geodatabase to use as input for the Project tool. This is where the model is going awry. For the Output Feature Class, I would like to put it into the same geodatabase that was created from the Kml to layer tool. Everything I try doesn't recognize the geodatabase and adds the .shp extension to create a shapefile. Things I've tried: Output Dataset =

  1. %Value%.gdb\%Value%_Points
  2. %Output_Location%\%Value%.gdb\%Value%_Points
  3. %Geodatabase%\%Value%_Points - Add another Calculate Value tool with expression '%Output_Location%'+'\'+'%Value%'+'.gdb' and using the output (Geodatabase)
  4. %Workspace\%Value%_Points - Scripting the workspace as the path of the geodatabase with the Output_Location and Value as script parameters and using Workspace
  5. %Path%\%Name%.%Extension%\%Name% - Parse Path tool on the geodatabase output of the kml to layer tool
  6. %Path%\%Value% - Parse Path on the Points FC from the Select data tool
  7. %Selected_GDB%\%Value% to use database from Select Data tool
  8. %NewGeodatabase%\%Value%I've set the Kml to layer output as static InputKML and added a create File Geodatabase tool. File Geodatabase Location is %Output_Location% and GDB name is %Value%.gdb. Renamed Output to NewGeodatabase, set as current workspace for tool
  9. I tried doing the Feature to Feature tool instead and adding an output coordinate system, but that didnt' work either. I think the error was invalid parameter

Everything in the model works fine up to the Project Tool. It insists on creating a shapefile from anything I put in the Output.

  1. I've used the %Output_Location%\CurrentGeodatabase.gdb\%Value%_Points and that worked fine since the geodatabase was already set and the path found. So it is the geodatabase path that is the problem.

I don't know what else to try. Some things I've come across: In Calculate Value, I'm not able to add more than one line to the expression, and os is not recognized without import os The Project tool initially puts the path to the default geodatabase for my project and that works fine. the Output Location parameter is set as type: folder so the Set Workspace script has it set as folder as well. The KML to layer tool won't work unless there are default values for the Output Location and Input KML parameters. I've made sure those don't have spaces, leading numbers, etc., if that matters.

Basic Model

1
  • 2
    Did you check to see if a modern release has the desired functionality before deciding to discard the option of benefiting from the four major and 33 minor releases issued since 2.9.0? 2.9 alone had 13 incremental minor releases -- have you at least applied them all?
    – Vince
    Commented Nov 7 at 12:43

1 Answer 1

-1

Works for me. I, as @Vince has hinted in a comment, am using ArcGIS Pro 3.3 so none of the bugs you are experiencing exist. I would have a word with your organisation and explain that they/you are missing out on so much good stuff and all they have to do is press that update button.

Model

5
  • It looks like your final result is t1.shp - OP was is looking for output to NOT be .shp Commented Nov 7 at 14:55
  • This is my spoofed up model, can easily be a geodatabase featureclass. What I was demonstrating it that the source of the OP issue is the very outdated version of an unsupported software they are using and the comment by @Vince is the solution, update your software and it all goes away as well as getting a mountain of bug fixes and new functionality. No brainer to me.
    – Hornbydd
    Commented Nov 7 at 17:39
  • I'm on 2.9.5. Upgrading is the obvious answer which I would love to implement. Since I'm not able to decide when I can upgrade my version, I am looking for a fix, or something I'm missing in my model I can do that I have control of since I don't know when my organization is upgrading as a whole. Also, not to be snarky, but @Hornbydd, were you able to create a feature class with your model? Because I can show this exact output with mine.
    – GISVAI
    Commented Nov 7 at 18:35
  • Yes the model worked as intended, created a projected output, I just decided to create a shapefile but it works for geodatabase featureclass as output too. I would kick up a fuss at your organisation as they are holding you back. ArcPro 3.4 was released today. Its free to update!
    – Hornbydd
    Commented Nov 8 at 12:37
  • Enlightening but ultimately unhelpful. Thank you for checking. We will eventually upgrade and the delay has been frustrating. I was hoping there was a small error on my part that caused this to happen.
    – GISVAI
    Commented Nov 13 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.