Skip to main content
Solved

Python shutdown scripts and FME Server

  • July 31, 2018
  • 3 replies
  • 21 views

ld
Participant
Forum|alt.badge.img+1
  • Participant
  • 19 replies

Is it possible to alter a workspace's output before it is zipped and made available for download through the data download service?

Specifically, I'd like to output a shapefile, then alter the .prj file using a python shutdown script. All of this before being made available to the user as a zipped download.

Best answer by takashi

Hi @ld, I don't think you can do that with shutdown script, but possibly the File Copy writer can be userd here effectively.

Write the Shapefile dataset into a folder with a FeatureWriter, use the File Copy writer to move the resulting files to the destination folder, and copy the prj file to the same folder using the same File Copy writer.

FME Server would archive the moved/copied files into a zip file to allow the user to download, if you specified the File Copy writer as the destination writer for Data Download Service.

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.

3 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • July 31, 2018

Hi @ld, I don't think you can do that with shutdown script, but possibly the File Copy writer can be userd here effectively.

Write the Shapefile dataset into a folder with a FeatureWriter, use the File Copy writer to move the resulting files to the destination folder, and copy the prj file to the same folder using the same File Copy writer.

FME Server would archive the moved/copied files into a zip file to allow the user to download, if you specified the File Copy writer as the destination writer for Data Download Service.


Forum|alt.badge.img+2

Hi @ld, I don't think you can do that with shutdown script, but possibly the File Copy writer can be userd here effectively.

Write the Shapefile dataset into a folder with a FeatureWriter, use the File Copy writer to move the resulting files to the destination folder, and copy the prj file to the same folder using the same File Copy writer.

FME Server would archive the moved/copied files into a zip file to allow the user to download, if you specified the File Copy writer as the destination writer for Data Download Service.

Would you add a PythonCaller transformer here between the FeatureWriter (shp) and filecopywriter?

 

 


ld
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • 19 replies
  • August 1, 2018

Hi @ld, I don't think you can do that with shutdown script, but possibly the File Copy writer can be userd here effectively.

Write the Shapefile dataset into a folder with a FeatureWriter, use the File Copy writer to move the resulting files to the destination folder, and copy the prj file to the same folder using the same File Copy writer.

FME Server would archive the moved/copied files into a zip file to allow the user to download, if you specified the File Copy writer as the destination writer for Data Download Service.

Thanks. I ended up writing a shapefile with no CRS (CoordinateSystemRemover), then writing a .prj file separately to the same destination (Text File Writer).