Converting from CSV to Spatial Geometry (Vector)

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

Converting from CSV to vector features, points, lines, or polygons is easy in FME when the dataset includes spatial information like coordinates or addresses. This tutorial explores three methods to generate point features from CSV data:

  • Using the CSV Reader parameters
  • The VertexCreator transformer
  • Geocoding addresses

It also demonstrates how to construct line and polygon features using LineBuilder.

These techniques apply to any table-based dataset that includes spatial attributes.
  

Step-by-step Instructions

This tutorial is divided into three parts: point, line, and polygon features.

 

Part 1: Point Features

Method 1: Using the Reader Parameters

1. Add a CSV Reader

As of FME 2025.2, the Coordinate System parameter is now configured within the Parameters dialog of each reader/writer format. For more information, including details about the change and affected transformers, please see Coordinate System Parameter Location Change.

  • In a blank workspace, click the Add Reader icon and add a reader with the following parameters:

      • Format: CSV (Comma Separated Value)

      • Dataset: /rapid_transit_stations.csv


    Click the Parameters button to set the coordinate system:

      • Attribute Definition: Manual


      • Name: x

      • Type: x_coordinate


      • Name: y

      • Type: y_coordinate


      • Create Point Geometry from Attributes: Enabled

      • X Coordinate Attribute: x

      • Y Coordinate Attribute: y

      • Coordinate System: UTM83-10

    ReaderCSV

    Click OK to add the reader to the workspace.

  • In a blank workspace, click the Add Reader icon and add a reader with the following parameters:

      • Format: CSV (Comma Separated Value)

      • Dataset: /rapid_transit_stations.csv

      • Coordinate System: UTM83-10

    ReaderCSV

    If you open the reader parameters before clicking OK, under Attribute Definition, note that the x and y attributes have their types set to x_coordinate and y_coordinate automatically by FME. If these are not set correctly, switch the Attribute Definition to Manual, then manually change the Type.

    AttributeType

    Click OK to add the reader to the workspace.


Method 2: Using the VertexCreator Transformer

1. Add a CSV Reader

In a blank workspace, add a reader to the canvas. In the Add Reader parameters:

  • Format: CSV (Comma Separated Value)
  • Dataset: rapid_transit_stations.csv

Then click OK. 

 

2. Add a VertexCreator

If the CSV was added without setting coordinate parameters, or if geometry was removed, use VertexCreator. Add a VertexCreator transformer and connect it to the CSV reader. In the parameters:

  • X Value: x
  • Y Value: y
  • Coordinate System: UTM83-10

Then click OK. Each row becomes a point feature with preserved attributes.

 

Method 3: Geocoding Addresses

1. Add a CSV Reader

For datasets without coordinates, use a geocoding service. Add a reader to the canvas and set the following:

  • Format: CSV (Comma Separated Value)
  • Dataset: CulturalSpaces2016.csv

Then click OK. 

 

2. Add a Geocoder

Next, add a Geocoder transformer. In the parameters:

  • Geocoding Service: Google
  • Connection:
    • Authorization Type: API Key
    • API Key: <your key>
  • Geocoding Parameters:
    • Mode: Forward
    • Street Address: ADDRESS 

 

For more instructions on working with the Geocoder, see Geocoding Addresses.

Before running the workspace, right-click on the Geocoder and set Workspace: Rejected Feature Handling to Continue. This ensures the workspace runs even if some rows lack valid addresses. After running, point features will appear for all geocoded addresses.

 

Results

 

Part 2: Line Features

1. Add a CSV Reader

To convert CSV data into line features, add a reader to the workspace. In the Add Reader dialog, set:

  • Format: CSV (Comma Separated Value)
  • Dataset: data_transit_lines.csv
  • Coordinate System: UTM83-10

Then click OK. 

 

2. Add a LineBuilder

Connect a LineBuilder transformer to the reader feature type. In the parameters, set:

  • Group Processing: Enabled
    • Group By: LINE

Then click OK. 

 

This groups points by their line name. If lines don’t appear as expected, sort the data first using a Sorter transformer.
 

Results



 

Part 3: Polygon Features

1. Add a CSV Reader

  • Converting CSV to polygons is similar to creating lines. Add a reader to the workspace. In the Add Reader dialog, set:

      • Format: CSV (Comma Separated Value)

      • Dataset: /Neighborhoods.csv


    Click the Parameters button to set the coordinate system:

      • Attribute Definition: Manual


      • Name: x

      • Type: x_coordinate


      • Name: y

      • Type: y_coordinate


      • Create Point Geometry from Attributes: Enabled

      • X Coordinate Attribute: x

      • Y Coordinate Attribute: x

      • Coordinate System: LL84

    ReaderCSV

    Click OK to add the reader to the workspace.

  • Converting CSV to polygons is similar to creating lines. Add a reader to the workspace. In the Add Reader dialog, set:

      • Format: CSV (Comma Separated Value)

      • Dataset: /Neighborhoods.csv

      • Coordinate System: LL84

    ReaderCSV

    If you open the reader parameters before clicking OK, under Attribute Definition, note that the x and y attributes have their types set to x_coordinate and y_coordinate automatically by FME. If these are not set correctly, switch the Attribute Definition to Manual, then manually change the Type.

    Click OK to add the reader to the workspace.

2. Add a LineBuilder

Connect a LineBuilder transformer to the reader feature type. In the parameters, set:

  • Group Processing: Enabled
    • Group By: NeighborhoodName

Then click OK. 


 

If the last point in each group matches the first, FME automatically forms a polygon.
 

Results



 

Data Attribution

The data used here 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.