Hi @tsurveyor, thanks for the question,
Is the goal simply to have the proper ESRI .prj output with the Shapefiles every time the job is run? Do you need to do any reprojections or transformations within the process? Will you always have access to the project .prj or do you want to rely on end users to upload it each time at runtime?
If you will always know ahead of time the definitions of the custom coordinate systems, you can upload them as resources to the FME Server engines, much like adding a custom coordinate system to FME Desktop. You can then use the custom definitions to define the coordinate system of your features in FME. If you would rather have the end user upload the specific .prj at each runtime, you can probably configure your workspace to process the .prj file (it is simply text, after all - try the Textline Reader/Writer) and either output it along with the resulting Shapefile, or use it to set the coordinate system within the workspace.
Hope this provides you with at least a couple high-level ideas. Let us know if you are stuck on the technical side of this.
Nathan
Hi @tsurveyor, thanks for the question,
Is the goal simply to have the proper ESRI .prj output with the Shapefiles every time the job is run? Do you need to do any reprojections or transformations within the process? Will you always have access to the project .prj or do you want to rely on end users to upload it each time at runtime?
If you will always know ahead of time the definitions of the custom coordinate systems, you can upload them as resources to the FME Server engines, much like adding a custom coordinate system to FME Desktop. You can then use the custom definitions to define the coordinate system of your features in FME. If you would rather have the end user upload the specific .prj at each runtime, you can probably configure your workspace to process the .prj file (it is simply text, after all - try the Textline Reader/Writer) and either output it along with the resulting Shapefile, or use it to set the coordinate system within the workspace.
Hope this provides you with at least a couple high-level ideas. Let us know if you are stuck on the technical side of this.
Nathan
Nathan, thanks for the response. I want the end user to be able to upload the prj each job; almost every project we work in has its own custom projection. I am piqued by your comment about being able to use it to set the coordinate system within the workspace. Everything else I've done the custom projection had to be added to the CS library. How do I set the coordinate system on the fly within the workspace using an ESRI prj file?
The other question is process it using Textline - are you saying that sending it the Shapefile writer with the rest of vector data will create the shapefiles' CS based on the text file instead of the stuff coming out of the geometry filter? I really appreciate your help on this.
I asked a subsequent question here after trying different things:
https://knowledge.safe.com/questions/80819/replace-one-text-file-with-another-or-overwrite-te.html
Nathan, thanks for the response. I want the end user to be able to upload the prj each job; almost every project we work in has its own custom projection. I am piqued by your comment about being able to use it to set the coordinate system within the workspace. Everything else I've done the custom projection had to be added to the CS library. How do I set the coordinate system on the fly within the workspace using an ESRI prj file?
The other question is process it using Textline - are you saying that sending it the Shapefile writer with the rest of vector data will create the shapefiles' CS based on the text file instead of the stuff coming out of the geometry filter? I really appreciate your help on this.
I asked a subsequent question here after trying different things:
https://knowledge.safe.com/questions/80819/replace-one-text-file-with-another-or-overwrite-te.html
Hi @tsurveyor,
You are right that in order to really apply the coordinate system to features within the workspace, it will need to be defined and added as a customer projection. I was thinking even this would be possible if the workspace itself parsed the .prj, defined a new projection, and wrote it to the coordinate systems folder on FME Server. But since the FME Server engines need to be restarted before the added custom projection can be used, this is making less sense.
I think Takashi's latest idea on your other thread is going to prove the best solution. Make use of the FileCopy writer and the summary port of the FeatureWriter to effectively copy the input .prj to the shapefile folder, overwriting any existing .prj.
Hope this helps,
Nathan
thanks Nathan, appreciate your response and writing down your thought process.