Uploading Assets to Cesium ion

Crystal Fitzpatrick
Crystal Fitzpatrick
  • Updated

Introduction

In this article, you will learn how to install the CesiumIonConnector in FME, authenticate the Cesium ion Web Service, and upload assets to your Cesium ion account. Currently, the CesiumIonConnector only supports uploading CityGML, GeoTIFF, LAS, and OBJ files.

The first exercise will introduce the process of uploading assets from one of the supported formats, CityGML. Similarly, the second exercise will help you understand how to use FME to convert your data into one of the supported formats, then upload the asset to Cesium ion in a single workspace.

 

Prerequisites

Before installing and using the CesiumIonConnector transformer, open up FME Workbench and navigate to Tools > FME Options > Translation. You need to ensure your Preferred Python Interpreter is set to FME Python 3.5+ or above. Once the Cesium ion Connector package has been installed (in Exercise 1 below), you can launch FME Workbench and return the Preferred Python Interpreter to your preferred Python version. 

 

Step-by-step Instructions 

Exercise 1: Uploading CityGML Assets

1. Create a New Workspace

To get started, launch FME Workbench and create a new workspace. The CesiumIonConnector transformer does not require data to be read into the workspace, a single feature needs to be created in order to kick off the translation.

Add a Creator transformer to the workspace. This will create a single feature that will tell the CesiumIonConnector to fetch data from the Source Folder and upload it as a new asset to your Cesium ion account. It is important to note that the CesiumIonConnector will upload 1 asset per feature that is passed into the CesiumIonConnector (i.e. if 10 features pass through the CesiumIonConnector, 10 assets will be uploaded to your Cesium ion account).

 

2. Install/Add a Cesium ion Connector

Add the Cesium ion Connector by typing CesiumIonConnector on your workspace canvas to bring up the Quick Add dialog:

Simply double-click on CesiumIonConnector to install and add it to your workspace. More information and alternative installation options for the Cesium ion connector are available on FME Hub.

Connect the Creator to the CesiumIonConnector. Double-click on the CesiumIonConnector to open the associated Parameters.

 

For the Cesium ion Account parameter, select the Add Web Connection option from the drop-down list - this will open a new dialog.

In the Cesium ion Connection dialog, leave the Web Service as the default value (Cesium ion) and set your Connection Name (for example “Cesium ion - Personal” or your Cesium ion username).

 

Next, click the OK button. Sign in to your Cesium ion Account in the Web Service Authentication dialog and allow access to FME.

 

Once you have successfully added your Cesium ion Account, set the Source Folder parameter to a directory containing one of the following data types:

  • a CityGML file and a textures subdirectory
  • GeoTIFF file
  • LAS file
  • OBJ file

If you downloaded the provided sample data to your Downloads folder, the Source Folder parameter should look something like "~\Downloads\Sample Data\CityGML\Exercise 1". The Election_Boundaries.gml file contained in the Election Boundaries folder will be uploaded by the Cesium ion Connector.

Next, set the Asset Name to “Exercise 1” which will help you identify your assets easier in the My Assets tab on your Cesium ion account. Leave the remaining parameters as default and click OK to return to the workspace.

 

3. Obtain your Asset URL

Now run the workspace.

Once the workspace runs, click the green eye on the output port of the CesiumIonConnector. This will open the output summary in the Visual Preview window in FME Workbench, which contains the URL to your Cesium ion asset. By inspecting the results of the CesiumIonConnector, you will be able to copy the value of the _cesiumion_url attribute into a web browser for direct access to your new asset.

 

4. Open your Cesium Account

Now that your data has been uploaded to your Cesium ion account, it’s time to view it on the web. Copy the _cesiumion_url attribute value into a web browser or log on to your Cesium ion account - this is where you can style your assets or add components such as an infobox using JavaScript.

 

Exercise 2: Creating New Assets

1. Create a New Workspace

To get started, create a New workspace in FME Workbench. In this case, you will read in the source 2D Election Boundaries shapefile, convert features to 3D, write to one of the Cesium ion Connector’s supported formats, then upload your assets to Cesium ion.

 

Add an Esri Geodatabase (File Geodb) reader to the workspace and connect to the provided Election Boundaries Geodatabase. Click OK to add the reader to the canvas. 

 

2. Convert to 3D

The dataset we are working with is a 2D polygon dataset, we will need to extrude our features in order to convert them to 3D.

Add an Extruder to the workspace and connect it to the Shapefile Reader Feature Type. Once you have made the connection, open the Extruder parameters, click the drop-down arrow for the Distance parameter and select Open Arithmetic Editor.

Since the source dataset does not have a height attribute, we set the extrusion distance to an existing attribute value. In this case, we want to extrude the polygons dynamically based on the value of the DIVISION attribute using the expression:

(@pow(@Value(DIVISION),2))/4

 

This will help dynamically set the extrusion distance for each polygon based on the Distance equation. Note: extrusion height is based on the units of the source data.

 

3. Write to a Supported Format with the FeatureWriter

Now that we have 3D features, we can write our data to one of the formats supported by the CesiumIonConnector into a new directory.

Add a FeatureWriter to the canvas, connect it to the Extruded port on the Extruder transformer, then open the FeatureWriter parameters. Set the Format to OGC CityGML and save the CityGML file in a new directory. For example: “~\Documents\CityGML\Exercise 2\Extruded_Election_Boundaries.gml”

 

4. Add a CesiumIonConnector

Add a CesiumIonConnector to the canvas, connect it to the Summary port on the FeatureWriter, and open the CesiumIonConnector parameters. Since we already set up our Cesium ion Web connection in Exercise 1, you can simply select your Cesium ion Account from the drop-down list.

Next, set the Source Folder to the directory we created in the previous step: “~\Documents\CityGML\Exercise 2\”. 

Lastly, set the Asset name to “Exercise 2”.

 

5. Obtain your Asset URL

Finally, run the workspace.

Once the workspace runs, click the green eye on the CesiumIonConnector's output port. The output summary will open in the Visual Preview window, which contains the URL to your Cesium ion asset. By inspecting the results of the CesiumIonConnector, you will be able to copy the value of the _cesiumion_url attribute into a web browser for direct access to your new asset.

 

6. Open your Cesium Account

Now that your data has been uploaded to your Cesium ion account, it’s time to view it on the web. Copy the _cesiumion_url attribute value into a web browser or log on to your Cesium ion account - this is where you can style your assets or add components such as an infobox using JavaScript.

 

Data Attribution

Data used in this tutorial originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.