Skip to main content

Hello all,

I am processing a dataset in the state of Queensland, Australia which lies across three UTM zones.

Because my processing involves calculating area and perimeter in metres, and my source data is in LL I want to divide the data according to the three zones, reproject, calculate, and then reproject back.

How can I filter each spatial object so that it goes only once into each appropriate zone?

SpatialFilter tests the whole candidate, but if an object lies on the boundary I only want it to go into one zone, so really I want to filter by the centroid of the spatial object, not the entire object.

Is there a filter for centroids?

Hi @nicholas The GeographicAreaCalculator can reproject the polygons to get the areas in metres. You could embed and edit it to add a LengthCalculator which would calculate each polygon's perimeter.


Hi @nicholas The GeographicAreaCalculator can reproject the polygons to get the areas in metres. You could embed and edit it to add a LengthCalculator which would calculate each polygon's perimeter.

That Transformer needs some looking a, its alright for small datasets but gets bogged down on big datsets and is memory intensive for some reason


You could make a dataset that is the 3 zones and clip it. and the do what you have said. As per my note below the GeographicAreaCalculator is slow.


I think I have solved it myself.

First I use a CenterPointExtractor set to Center Of Bounding Box and place the x-coordinate in the Attribute _inside_x (I ignore y and z)

Then I use a TestFilter;

If _inside_x<144 Output Port Zone54

Else If _inside_x<150 Output Port Zone55

Else Output Port Zone56

This effectively filters all my features into either Zone 54, Zone 55 or Zone 56 with no duplicates. Each feature goes to only one output port.

Then from each output port I can do the appropriate Reprojector (into UTM), calculate Area and Length and finally bring all three streams of data back together with a Reprojector back to Lat/Long


@danatsafe I did spot the GeographicAreaCalculator. Is there also a GeographicLengthCalculator? (which would calculate perimeter in metres)


@danatsafe I did spot the GeographicAreaCalculator. Is there also a GeographicLengthCalculator? (which would calculate perimeter in metres)

@nicholas Yes, there is also a GeographicLengthCalculator, but if you used that with the GeographicAreaCalculator then every feature would be reprojected twice.


Hi @nicholas, for what it's worth, you can also implement yourself the same logic as the GeographicArea/LengthCalculator.

  1. CoordinateSystemExtractor: Extract the original coordinate system name as an attribute e.g. _coordsys.
  2. GeometryExtractor (Geometry Encoding: FME Binary): Extract the original geometry as an attribute e.g. _geometry.
  3. Reprojector: Change the coordinate system to "_AZMEA_" (Dynamic Reprojection Equal Area).
  4. AreaCalcuator: Calculate the area in square meters.
  5. LengthCalculator: Calculate the length (perimeter) in meters.
  6. GeometryReplacer: Restore the original geometry from "_geometry".
  7. CoordinateSystemSetter: Set the original coordinage system "_coordsys".

Reply