# How to change "Clicked geometry" from gpml:UnclassifiedGeometry to gpml:centerLineOf

**URL:** https://discourse.gplates.org/t/how-to-change-clicked-geometry-from-gpml-unclassifiedgeometry-to-gpml-centerlineof/826
**Category:** Q&A
**Created:** [14 February 2024 15:55 UTC](https://discourse.gplates.org/t/how-to-change-clicked-geometry-from-gpml-unclassifiedgeometry-to-gpml-centerlineof/826 "2024-02-14T15:55:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![moloudrb](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@moloudrb](https://discourse.gplates.org/u/moloudrb)
#### Post date: [14 February 2024 15:55 UTC](https://discourse.gplates.org/t/how-to-change-clicked-geometry-from-gpml-unclassifiedgeometry-to-gpml-centerlineof/826/1 "2024-02-14T15:55:40Z")

</div>

Hi All,

I am currently working on a reconstruction model and I am looking to plot subduction zones and closed topologies over time. I am using Simon William’s codes to plot subduction teeth using PyGMT and GPlatesReconstructionModel. However, I’ve encountered an issue where some of my subduction zones are not being plotted. The only difference between these unplotted zones and the others is that they are coded as “gpml: UnclassifiedGeometry,” while the others are “gpml: CenterLineOf.” I believe this to be the problem. The code I am using seems unable to detect those unclassified geometries. I’ve tried to modify it, but nothing worked. Would anyone happen to know a solution or workaround for this issue? Thank you very much!

Moloud

---

<div class="post-metadata">

### Author: ![siwill22](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@siwill22](https://discourse.gplates.org/u/siwill22)
#### Post date: [15 February 2024 00:40 UTC](https://discourse.gplates.org/t/how-to-change-clicked-geometry-from-gpml-unclassifiedgeometry-to-gpml-centerlineof/826/2 "2024-02-15T00:40:09Z")

</div>

Hi Moloud,

I did a quick test and was able to reproduce the same behaviour.  
The issue seems to stem from different way that gplates creates ‘resolved\_boundary\_segments’ depending on the geometry type.  
If the subduction zone is defined as gpml:CenterLineOf, then running the pygplates command resolved\_boundary\_segments.get\_geometry() returns the geometry.  
If the subduction zone is defined as gpml:UnclassifiedGeometry, then get\_geometry() returns ‘None’, instead we have to do ‘get\_all\_geometries’ which returns a list of geometries (even when there is only one geometry).  
The existing code assumed that all subduction zones are defined as line geometries, the unclassified geometries were silently skipped. I’ve modified the code in the GPlatesReconstructionModel repo on GitHub to handle these cases, you may try this and see if it fixes your problem.

---

<div class="post-metadata">

### Author: ![john.cannon](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@john.cannon](https://discourse.gplates.org/u/john.cannon)
#### Post date: [28 February 2024 15:14 UTC](https://discourse.gplates.org/t/how-to-change-clicked-geometry-from-gpml-unclassifiedgeometry-to-gpml-centerlineof/826/3 "2024-02-28T15:14:06Z")

</div>

> [@siwill22](#):
>
> If the subduction zone is defined as gpml:UnclassifiedGeometry, then get\_geometry() returns ‘None’, instead we have to do ‘get\_all\_geometries’ which returns a list of geometries (even when there is only one geometry).

This has been a bit of a problematic area around the GPlates Geological Information Model, so I’ve just changed `Feature.get_geometry()` in pyGPlates to always return a geometry when a feature contains a _single_ geometry, regardless of how that geometry is defined.

So, for example, getting a geometry from a [subduction zone](https://www.gplates.org/docs/gpgim/#gpml:SubductionZone) will first look for a geometry under `gpml:CenterLineOf` (the default geometry for a subduction zone), and if not found will look for any geometry instead of returning `None` (in this case returning `gpml:UnclassifiedGeometry`).

I wish I’d thought of this years ago because it’s more useful when you are expecting a single geometry but don’t know which property it has been imported into (in this case it has somehow ended up in a `gpml:UnclassifiedGeometry`) and hence you’re leaving `property_query` unspecified…

 ![image](https://discourse.gplates.org/uploads/default/original/1X/f72cbd18ab3f08ea94846df9adc6d1010b4034a2.png)
