2

I need to convert several Rasterfiles (TIF) to polygon. To give some context: I saved the TIF-files in a local folder and I want to store the converted polygons in a database (to keep the information of shape length, etc.).

It works if I use the tool from modelbuilder: Raster to Polygon, for a single TIF file. But if I want to use the iterator; it always fails at the second iteration.

I make use of inline variables in the output of Raster to Polygon, but the problem is that this tool automatically adds an extension to the name (.shp) , which lead to a fail at the second iteration (Extension is manually removed at first iteration)

Does anyone has a solution for this?

I have to merge afterwards all this files to 1 polygonfile, I tried to other way around (Mosaic to new Raster and then Raster to Polygon ==> but this takes ages)

MODEL

GeoTiff = workspace (folder on C-drive) : all files start with Grnkrt_* / The output is saved to my default.gdb FYI: I tried all possible inline variables already (%n%, %name,..)

enter image description here

  • 2
    Here as inline variable you should use %Name%. A screenshot of the parameters of the Raster to Polygon tool could help further. – GISGe Aug 25 '16 at 8:25
  • I already tried %Name% as well.. the problem is that in the second iteration the tool automatically adds .shp to the output-name ==> which lead to an error.. – RG1991 Aug 25 '16 at 8:30
  • if is the problem extension .shp, create a geodatabase and store all shapefile inside it – Florjan Aug 25 '16 at 9:03
  • What is the precise error that you receive? Please use the edit button beneath your question to keep revising it in light of any requested clarifications. – PolyGeo Sep 16 '16 at 8:27
  • 1
    Why not include another step of converting the shapefile to a feature class in a GDB? – P.T. Curran May 30 '17 at 15:57