Skip to main content
Question

Build shapefile indexes with generic writer


tris_w
Contributor
Forum|alt.badge.img+6

I'm using a dynamic workspace with generic writer to create output files in the format that the user selects. When the user chooses to export as ESRI shapefile I would like it to also build the spatial indexes for the output shapefile. I can get it to write the shapefiles just fine but they don't have spatial indexes. Is this possible with the generic writer by setting it in the schema feature somehow? Or would I have to specifically use the shapefile writer which has it as an option?

3 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 23, 2019

If you add a shapefile writer, don't connect it to anything, and set the spatial index to Yes on that writer, then the Generic Writer will also use that setting when writing shapefiles.


tris_w
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • May 23, 2019
jdh wrote:

If you add a shapefile writer, don't connect it to anything, and set the spatial index to Yes on that writer, then the Generic Writer will also use that setting when writing shapefiles.

Thanks, that would have been neat if it had worked... but it doesn't create the indexes for me. I have a dummy shapefile writer in the workbench with the Create spatial index set to "Yes".


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 24, 2019
tris_w wrote:

Thanks, that would have been neat if it had worked... but it doesn't create the indexes for me. I have a dummy shapefile writer in the workbench with the Create spatial index set to "Yes".

That works for me with a featureWriter set to the generic format, a regular shapefile writer, in FME 2018 and 2019.

 

 

What version of FME are you using?

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings