Exercise 4 Data Download System: Geographic Selection
Data Orthophoto images (GeoTIFF)
Overall Goal Create an FME Server Data Download system for orthophotos
Demonstrates Handling selection by geographic area
Start Workspace C:\FMEData2018\Workspaces\ServerAuthoring\SelfServe2-Ex4-Begin.fmw
End Workspace C:\FMEData2018\Workspaces\ServerAuthoring\SelfServe2-Ex4-Complete.fmw

As a technical analyst in the GIS department of a city, you have just commenced an initiative to allow other departments to download orthophoto data, rather than having to ask you to create it for them. Not only will their requests be processed quicker, but you will also spend less time on that task.

You've implemented a lot of different options for transformation, format, coordinate system, and layers to process. However, end-users also often ask for raster data for a particular neighborhood of the city, and that's easy to do using a Clipper transformer.


1) Open Workspace
Open the begin workspace listed above or continue in your workspace from the previous exercises. You can see that it consists of a reader, two writers, three transformers, and various published parameters.

To clip data to a particular neighborhood first requires a reader for those neighborhood features, so that is the first step...


2) Add Reader
Select Readers > Add Reader and use the following setup:

Reader Format Google KML
Reader Dataset C:\FMEData2018\Data\Boundaries\VancouverNeighborhoods.kml
Workflow Individual Feature Types

Be sure to set the workflow option if you carried out the previous exercise, as it might default to a different value. Click OK and, when prompted, select only the feature type for Neighborhoods:

Once added, remove the published parameter for SourceDataset_OGCKML. We don't need to prompt the user to select this dataset.


3) Add Published Parameter
Currently the KML Reader will read all of the neighborhoods. However, we need the user to select one of these to clip the data with. To select the neighborhood we'll use a published parameter.

So, add a new parameter. Set the parameter values as follows:

TypeChoice
NameNeighborhood
PublishedYes
OptionalYes
PromptSelect the Neighborhood

For the configuration field, click the [...] browse button. In the dialog that opens, enter the names of the neighborhoods of Vancouver. These are:

  • Downtown
  • Fairview
  • Kitsilano
  • Mount Pleasant
  • Strathcona
  • West End

Notice that this parameter is optional. The user should not have to select a value if they don't want to. Also, this is a choice field alone; an alias is not needed because the proper values are clear enough.


TIP
Alternately, instead of typing all of the attribute values in manually, you can import the values from the dataset.

In the Choices List, click on Import... In the Import Wizard, select the VancouverNeighborhoods.kml file again, then select Attribute Values for the Import From drop-down. Next, select Neighborhoods as the Feature Types. Finally, for Choice List, select NeighborhoodName from the drop-down and click Import.


4) Add Tester
Now we need to filter the neighborhood data by the user's choice. So add a Tester transformer to the workspace, connected to the Neighborhood feature type:

Inspect its parameters and set them up to test where NeighborhoodName = the neighborhood published parameter:

Save the parameter changes.


5) Add CsmapReprojector
One interesting part of the neighborhood dataset is that it is in a Latitude/Longitude coordinate system, whereas all other data is in UTM83-10. To be able to clip one with the other requires both datasets to be in the same coordinate space.

So, place a CsmapReprojector transformer after the Tester, connected to the Tester:Passed port. Set it up to reproject to UTM83-10


Professor Spatial F.M.E., E.T.L. says...
Why does the CsmapReprojector come after the Tester? Because it has less work to do. If the data was reprojected first then we would be reprojecting data that is subsequently filtered out. It might only be a small difference here, but this is the type of detail that really helps workspace performance in larger projects.


6) Add Clipper
Now to clip the raster data. Add a Clipper transformer to the workspace. Connect the CsmapReprojector to the Clipper:Clipper port. Connect the output from the VectorOnRasterOverlayer to the Clipper:Clippee port:

Check the parameters. The only parameter to check is one specifically related to raster data: Preserve Clippee Extents. Set this parameter to No if it is not already.


7) Publish to FME Server
Save the workspace and publish it to FME Server. Register it with the Data Download service, being sure to click the Edit button to edit the service properties. In that dialog set the writer to "Output [GENERIC]" (not "Output [JPEG]").

Run the workspace on FME Server. You should now be able to choose all source tiles and clip them to a chosen neighborhood, like so (here, the Downtown neighborhood):


CONGRATULATIONS
By completing this exercise you have learned how to:
  • Set up a workspace for a user to select a specific area feature
  • Clip data to a chosen area for use in a Data Download system

results matching ""

    No results matching ""