Hi @mlev,
First off, let me say welcome to the FME Community!
All data transformations in FME start in FME Desktop, not the API. You'll need to use this to create a workspace that converts your DWG to KML. Since the steps to take in the workspace will depend on your data, there is no one source of instructions to follow. To help familarise yourself with FME Desktop and start working with these to formats I'd suggest reviewing these resources as a starting point.
Once you've started building your workspace, if you encounter any issues along the way we will be better able to provide more specific guidance based on your data/result.
You've mentioned the API, however the API is not used for format conversion, so I'm not sure if it is actually what you require for this request. The FME Server API requires either FME Server or FME Cloud, it is not a standalone feature but simply exposes endpoints that allow you to communicate and perform actions on FME Server, through means other than the Web UI.
FME Server/Cloud build on the FME Desktop application to add in automation functionality, allowing you to trigger your workspace to run at regular intervals, based on incoming events, or using the API to trigger workspaces to run from another application.
If you're completely new to FME, you can request a 30 day trial of FME Desktop
here to get you started.
23-July-2020 - Thanks for replying.
1. However, I MUST do the transformations from my javascript code, using fme server REST API, and I understand that the API CAN do conversions -
see the link
https://playground.fmeserver.com/demos/
where among the demos, there's Easy Translator FME Server App,
the live demo is in
https://demos-safe-software.fmecloud.com/fmeserver/apps/EasyTranslator
and there you can download the zip of the program code.
and the detailed "Learn" page is
https://knowledge.safe.com/content/kbentry/114267/easy-translator-fme-server-app.html
Indeed, this example does very simple things at the fme side,
while I need to specify the coordinates of the DWG input file, before doing the transformation to KML.
I'd like to know how to "upgrade" this example code, in order to use my fme cloud server REST API to convert files from my javascript code.
2. See also the link
https://knowledge.safe.com/articles/1115/easy-translator-using-fme-server.html
where it is proved that the API could be used for transformations.
As I said, I don't know why there is a need that I create fme workspace before using the API...
I tried to add input coordinate system div in the html, but it seems I have to do something with the workspace in order to "get" and use it, but, as I said, I'm not familiar yet at all with workspace - how to create or modify it...
3. and I don't understand whether I need the example's FMEServer.js file, if I use my fme cloud server, and I need to learn carefully this example.
4. I saw that in easyTranslator.js lines 212 to 221 the format and coordinate system of both the input and the output are defined.
5. I also totally don't yet know what is the function of the fme "workspace" file...
To sum up - there IS an option to do transformations using the API!
I'm astonished that I have not suceeded to find more on it.
So I have to learn from start how to use right the fme server APi from my javascript.
I need help in order to know better and to not "get lost" since all this area is new to me.
I'll appreciate if you can point me to relevant documentation, links, and maybe also a person who is an expert in this area.
Your help will be greatly appreciated,
Michael
23-July-2020 - Thanks for replying.
1. However, I MUST do the transformations from my javascript code, using fme server REST API, and I understand that the API CAN do conversions -
see the link
https://playground.fmeserver.com/demos/
where among the demos, there's Easy Translator FME Server App,
the live demo is in
https://demos-safe-software.fmecloud.com/fmeserver/apps/EasyTranslator
and there you can download the zip of the program code.
and the detailed "Learn" page is
https://knowledge.safe.com/content/kbentry/114267/easy-translator-fme-server-app.html
Indeed, this example does very simple things at the fme side,
while I need to specify the coordinates of the DWG input file, before doing the transformation to KML.
I'd like to know how to "upgrade" this example code, in order to use my fme cloud server REST API to convert files from my javascript code.
2. See also the link
https://knowledge.safe.com/articles/1115/easy-translator-using-fme-server.html
where it is proved that the API could be used for transformations.
As I said, I don't know why there is a need that I create fme workspace before using the API...
I tried to add input coordinate system div in the html, but it seems I have to do something with the workspace in order to "get" and use it, but, as I said, I'm not familiar yet at all with workspace - how to create or modify it...
3. and I don't understand whether I need the example's FMEServer.js file, if I use my fme cloud server, and I need to learn carefully this example.
4. I saw that in easyTranslator.js lines 212 to 221 the format and coordinate system of both the input and the output are defined.
5. I also totally don't yet know what is the function of the fme "workspace" file...
To sum up - there IS an option to do transformations using the API!
I'm astonished that I have not suceeded to find more on it.
So I have to learn from start how to use right the fme server APi from my javascript.
I need help in order to know better and to not "get lost" since all this area is new to me.
I'll appreciate if you can point me to relevant documentation, links, and maybe also a person who is an expert in this area.
Your help will be greatly appreciated,
Michael
Actually, that example does call an FME workspace, the first paragraph literally says "This FME Server app uses the easyTranslator.fmw workspace that is included with FME Server."
All transformations on FME Server are handled by workspaces
23-July-2020 - Thanks for replying.
1. However, I MUST do the transformations from my javascript code, using fme server REST API, and I understand that the API CAN do conversions -
see the link
https://playground.fmeserver.com/demos/
where among the demos, there's Easy Translator FME Server App,
the live demo is in
https://demos-safe-software.fmecloud.com/fmeserver/apps/EasyTranslator
and there you can download the zip of the program code.
and the detailed "Learn" page is
https://knowledge.safe.com/content/kbentry/114267/easy-translator-fme-server-app.html
Indeed, this example does very simple things at the fme side,
while I need to specify the coordinates of the DWG input file, before doing the transformation to KML.
I'd like to know how to "upgrade" this example code, in order to use my fme cloud server REST API to convert files from my javascript code.
2. See also the link
https://knowledge.safe.com/articles/1115/easy-translator-using-fme-server.html
where it is proved that the API could be used for transformations.
As I said, I don't know why there is a need that I create fme workspace before using the API...
I tried to add input coordinate system div in the html, but it seems I have to do something with the workspace in order to "get" and use it, but, as I said, I'm not familiar yet at all with workspace - how to create or modify it...
3. and I don't understand whether I need the example's FMEServer.js file, if I use my fme cloud server, and I need to learn carefully this example.
4. I saw that in easyTranslator.js lines 212 to 221 the format and coordinate system of both the input and the output are defined.
5. I also totally don't yet know what is the function of the fme "workspace" file...
To sum up - there IS an option to do transformations using the API!
I'm astonished that I have not suceeded to find more on it.
So I have to learn from start how to use right the fme server APi from my javascript.
I need help in order to know better and to not "get lost" since all this area is new to me.
I'll appreciate if you can point me to relevant documentation, links, and maybe also a person who is an expert in this area.
Your help will be greatly appreciated,
Michael
Hi @mlev,
FME Workspaces are the building blocks for all data conversions created with FME Desktop.
If you have never used FME before what you are trying to achieve is an advanced process that covers many different components across the FME Platform. You will first need to I think it would be helpful to first familiarise yourself with what a workspace is and the basics of FME Desktop and FME Server before moving on to start any work with the FME Server Rest API. We have free online training available here, I'd recommend working through
As redgeographics has mentioned the Easy Translator FME Server App, and all of the other demos found on https://playground.fmeserver.com/demos/ are submitting FME workspaces (created with FME Desktop), to FME Server so it is key to have a good understanding of what a workspace is.
For what you are trying to achieve these are the basics steps you would need to follow:
Build a workspace in FME Desktop to perform the data translation from DWG to KML, including any reprojections. You’ll need to create Published Parameters which will be the fields the user can populate on the front end.
Publish this workspace to FME Server and register it to the Data Download Service, this will enable a result in the form of a zip file to be returned to the end user.
Build an FME Server App from within the FME Server Web UI or build your javascript code using our javascript library. For the latter option there are some examples for Job (workspace) Submission and Data Delivery here.
To summarise, if you need to submit your transformation request within your own javascript this is certainly possible, however the FME Server Rest API component is simply submitting a request to run a workspace in FME Server, the API itself is not doing the conversion.
If you want to learn more about how FME could meet your needs please contact info@safe.com.
Hi @mlev,
FME Workspaces are the building blocks for all data conversions created with FME Desktop.
If you have never used FME before what you are trying to achieve is an advanced process that covers many different components across the FME Platform. You will first need to I think it would be helpful to first familiarise yourself with what a workspace is and the basics of FME Desktop and FME Server before moving on to start any work with the FME Server Rest API. We have free online training available here, I'd recommend working through
As redgeographics has mentioned the Easy Translator FME Server App, and all of the other demos found on https://playground.fmeserver.com/demos/ are submitting FME workspaces (created with FME Desktop), to FME Server so it is key to have a good understanding of what a workspace is.
For what you are trying to achieve these are the basics steps you would need to follow:
Build a workspace in FME Desktop to perform the data translation from DWG to KML, including any reprojections. You’ll need to create Published Parameters which will be the fields the user can populate on the front end.
Publish this workspace to FME Server and register it to the Data Download Service, this will enable a result in the form of a zip file to be returned to the end user.
Build an FME Server App from within the FME Server Web UI or build your javascript code using our javascript library. For the latter option there are some examples for Job (workspace) Submission and Data Delivery here.
To summarise, if you need to submit your transformation request within your own javascript this is certainly possible, however the FME Server Rest API component is simply submitting a request to run a workspace in FME Server, the API itself is not doing the conversion.
If you want to learn more about how FME could meet your needs please contact info@safe.com.
Dear Holly,
I appreciate very much your fast response, your enlighting my eyes, and yours elaborated explanations and useful links. As my task needs much knowledge, I have no words to thank you enough. I'll follow your instructions.
Only 2 questions, please:
1. The javascript code I'll write in the web app will enable web app users to convert files of different formats and coordinate systems (e.g. from DWG on ITM to KML on wgs84). The company I work at has fme desktop, and for my app I assume it's preferable to continue purchase and use fme cloud for this, than fme server. Am I right?
In https://playground.fmeserver.com/javascript/javascript-library/get-the-library/ The text introducing these two options is not strictly identical. Does fme cloud indeed have all needed capabilities for my task? I assume it has, but I'd like to be sure.
2. As yet I'm still a "green" newbie, if you explain what you meant in "1." by "including any reprojections" (as I don't really understand what reprojection is) I think it'll help me to understand better during my learning phase.
Michael
Actually, that example does call an FME workspace, the first paragraph literally says "This FME Server app uses the easyTranslator.fmw workspace that is included with FME Server."
All transformations on FME Server are handled by workspaces
Thank you for enlighting my eyes.
Michael
Hi @mlev,
FME Cloud is simply a different way to deploy FME Server. FME Server needs to be installed directly onto your own hardware whereas FME Cloud is FME Server but hosted for you by Safe Software. Therefore you’d be able to use either to set up a custom web app. With regard to the javascript library, whether you opt to purchase FME Server or FME Cloud, you’ll still need to be using the fmeserver.js. The fmecloud.js is used to interact with FME Cloud at the administrator level, where in different FME Cloud instances belonging to your organisation are handled. It is not used to submit workspaces.
Since your company already has FME Desktop you’d likely need to make some enquiries as to what other employees are working with before you commit to FME Server or Cloud, as they both have their advantages depending on your companies overall needs. This may be a good time to reach out to your Account Manager so you can make a more informed decision about this.- A reprojection is simply the term used to convert data from using one coordinate system to using another. This document produced by Esri gives a nice short introduction to Projected Coordinate Systems. Since you are looking to present the data in different coordinate systems, there is likely some type of reprojection required in your FME workspace.
Dear Holly, Thank you for referring my questions and explaining!
I'll appreciate if you please look at my today's comment in
https://knowledge.safe.com/articles/1117/data-distribution-with-web-maps.html
and see if you can help? I just want to be capable to run the examples "as is" in my PC, in order to learn and understand their code.
Michael