0

I'm working in ArcGIS 10.4.1 in the ModelBuilder with the iterate feature selection iterator. Everything works out just fine. But in the end I would like to convert my raster-output via "Raster to Polyline" to a shapefile.

This leads to the following error:

Executing (Raster to Polyline): RasterToPolyline "P:\path\Scratch.gdb\CostPat_Ziel_1" "P:\path\Scratch.gdb\RasterT_CostPat_1.shp" NODATA 0 SIMPLIFY Value

Start Time: Thu Apr 05 07:59:41 2018 ERROR 999999: Error executing function. The table was not found. [RasterT_CostPat_1.shp] ERROR 010157: Unable to open feature class P:\path\Scratch.gdb\RasterT_CostPat_1.shp. Failed to execute (Raster to Polyline). Failed at Thu Apr 05 07:59:41 2018 (Elapsed Time: 0,38 seconds)

Does anyone have an idea what could cause the error and how to solve it? I checked the other questions about this issue but couldn't really understand what lead to it's success in the end, since I'm not working in arcpy but in the ModelBuilder and my understanding of python isn't that good.

2

You are trying to write a feature class into a file geodatabase with an invalid name P:\path\Scratch.gdb\RasterT_CostPat_1.shp. Feature classes cannot contain dots (.) and some other non-alphanumeric characters.

You either need to create a shapefile (plain file data structure) as P:\path\ScratchFolder\RasterT_CostPat_1.shp or a file geodatabase feature class with legal name as P:\path\Scratch.gdb\RasterT_CostPat_1.

  • Thank you very much! Right when I fixed "my mistake" I found out, that it's based on a bug. New problem (which I found a solution for, but I think it's nice to know). Obviously the tool Raster to polyline automatically adds the .shp to every output, even during an iteration. This leads to: 1. iteration: Works (bc I deleted the .shp manually), 2: Error, because of .shp-extent in .gdb (that was automatically added). I just chose a regular folder as an output to solve it - but isn't that weird? – Patrick Matu Apr 5 '18 at 7:17
  • Hard to help without taking a look at your model and the settings you have. I'd look further into the output data types and the output workspace (maybe you are setting it to be a folder rather than a geodatabase). If it works to run this GP tool once using ArcToolbox (without any models) and it outputs a feature class into a geodatabase, it should also be able to do this during an iteration. – Alex Tereshenkov Apr 5 '18 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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