Partitioned features with no geometry

In pyGPlates I am doing a partition_into_plates, with partition_return=pygplates.PartitionReturn.separate_partitioned_and_unpartitioned.

When I iterate through the returned feature collections, most features come out as expected. However there are a few features which have been partitioned, but have no geometry. This is not what I expected to happen. Can someone explain how this can come about?

Hi Thomas,

Maybe you are using pygplates.Feature.get_geometry() to retrieve the geometry from each partitioned feature. The problem there is that assumes a feature has only one geometry (it will return None if there’s not exactly one geometry).

However it’s possible that a single plate can partition a feature’s geometry into multiple geometries. For example, a line intersecting a thick U-shaped plate polygon in two places (the U then cuts the line into two small pieces where the line overlaps the U). In this case the partitioned feature ends up with two small lines and has the plate ID of the partitioning plate.

Try using pygplates.Feature.get_geometries() instead (note the plural get_geometries instead of get_geometry). Then you need to iterate over all geometries in each feature as in:

for feature in partitioned_features:
    for geometry in feature.get_geometries():


Hi John,

multiple geometries was the problem and iterating them the solution :smiley: