Exercise 2 Data Streaming System
Data Orthophoto images (GeoTIFF)
Overall Goal Create an FME Server Data Streaming system for orthophotos
Demonstrates Data streaming
Start Workspace C:\FMEData2017\Workspaces\ServerAuthoring\SelfServe2-Ex2-Begin.fmw
End Workspace C:\FMEData2017\Workspaces\ServerAuthoring\SelfServe2-Ex2-Complete.fmw

As a technical analyst in the GIS department of a city you have just created a system to allow other departments to download orthophoto data, rather than having to ask you to create it for them.

Sometimes the end-users download data as JPEG just to open it in a browser or image viewer to inspect it. You realize that, in cases like this, they may be able to use a data streaming service, instead of a data download.


1) Open Workspace
Open the workspace from exercise 1, or the begin workspace listed above. You can see that it consists of various readers, writers, transformers, and other functionality. Most importantly there is an unconnected JPEG Writer that could be used to stream data.

Currently the JPEG Writer is disconnected, so connect it back into the workspace, this time to the Clipper:Inside output port:


2) Publish to FME Server
Now publish the workspace to FME Server.

In the final dialog of the publishing wizard, check the boxes to register the workspace with both Data Download and Data Streaming (but don't click Finish yet):

Now click the Edit button for the Data Download service. Ensure that service is using the output of the Generic Writer.

Next click the Edit button for the Data Streaming service. Ensure that service is using the output of the JPEG Writer (for now we're limiting the streaming of data to JPEG format).


3) Run Workspace
In the FME Server web interface locate the newly published workspace and run it. In the parameters for the workspace be sure to set the web service to Data Streaming instead of Data Download:

The result of this translation is not a streamed JPEG file. Instead, the translation returns a zip file:

If you open the zip file you'll see that it includes both a JPEG file and a wld (World) file. That's why FME returned a zip file. It will zip the results of a Data Streaming service whenever the result is multiple files.


4) Turn off World File Creation
To really stream the data we should turn off the world file creation in the workspace. Check the properties for the JPEG Writer's feature type and set the Generate World File parameter to No:


5) Publish and Run Workspace
Re-publish the workspace and run it on FME Server. You should find that the results of the translation are returned as a streamed JPEG file. Most likely it will open directly in your web browser:


CONGRATULATIONS
By completing this exercise you have learned how to:
  • Set up a workspace for use in a Data Streaming service
  • Publish a workspace to the Data Streaming service

results matching ""

    No results matching ""