Exercise 6
Data Orthophoto images (GeoTIFF)
Overall Goal Create an FME Server Data Streaming system for orthophotos
Demonstrates Data streaming
Start Workspace C:\FMEData2016\Workspaces\ServerAuthoring\SelfServe-Ex6-Begin.fmw
End Workspace C:\FMEData2016\Workspaces\ServerAuthoring\SelfServe-Ex6-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 5, 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 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 wld File Creation
To really stream the data we should turn off the wld file creation in the workspace. Open the properties dialog for the JPEG Writer's feature type and click the Format Parameters tab. Set the Generate World File parameter to No:

Click OK to close the dialog.


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
  • Published a workspace to the Data Streaming service

results matching ""

    No results matching ""