Skip to main content
Archived

Adding ability to choose extension for a zipped shapefile Writer

  • October 19, 2016
  • 4 replies
  • 62 views

FME has the ability to write a compressed shapefile.

However, the standard extension is .shz, which is not recognized by QGIS, which can read compressed shapefiles, but not with the shz extension, only zip.

I would like to extend the functionality in FME to write to a zip extension, without having to run some shutdown script.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • October 19, 2016
Hi @webklaas, if you add the extension ".zip" to the destination dataset folder path, output files will be compressed automatically with the standard zip format. This functionality is common to many formats. See also here: Writing to a Zip File

  • Author
  • October 19, 2016
Hi Takashi,

 

Thanks for the answer, it does what I want.... almost.

 

The result of your solution is that my multiple feature types are stored in one dataset/zipfile, while I want them divided in one shapefile (in my case) per zip file. This is what the Create Compressed Shapefile = Yes option does, but with an undesired extension.

 

 

The only way to overcome that is to add a Writer per zipped shapefile, which may become quite cumbersome to create with many outputs.

 

 


ciarab
Contributor
Forum|alt.badge.img+10
  • Contributor
  • October 19, 2016
You can create a fan out on your output writer and it will create a new zip file for each show for example fan out by fme basename

 

 


takashi
Celebrity
  • October 20, 2016
Yes, as @ciarab mentioned, it's possible with applying Dataset Fanout option. e.g.

 

'

 

Just be aware that it has become available in FME 2016+. In 2015 and earlier, this doesn't work. See also here: Allow Dataset Fanout to Create Multiple Zip Files