# Work with opologies

**URL:** https://discourse.gplates.org/t/work-with-opologies/194
**Category:** Q&A
**Created:** [30 September 2020 15:03 UTC](https://discourse.gplates.org/t/work-with-opologies/194 "2020-09-30T15:03:38Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [2 October 2020 04:40 UTC](https://discourse.gplates.org/t/work-with-opologies/194/3 "2020-10-02T04:40:15Z")

</div>

Hi Fabrice,

Thanks for sending your test files.

The problem may be that your `Feature_Line.shp`, which you are using to build your topological polygon, has a Shapefile mapping that does not map _feature IDs_. As a result, when you load your Shapefile back in again, the original feature IDs are not retained and so the topological polygon cannot find any of its boundary references (and hence the topology is not visible).

In other words, if I open the `Feature_Lines.shp.gplates.xml` file I see:

```
<GPlatesShapefileMap version="1">
    <Begin>APPEARANCE</Begin>
    <End>DISAPPEARA</End>
    <Name>NAME</Name>
    <ReconstructionPlateId>PLATE_CODE</ReconstructionPlateId>
</GPlatesShapefileMap>

```

…which is missing a `<FeatureId>FEATURE_ID</FeatureId>` line. For example, the standard default mapping looks like:

```
<GPlatesShapefileMap version="1">
    <Begin>FROMAGE</Begin>
    <ConjugatePlateId>PLATEID2</ConjugatePlateId>
    <Description>DESCR</Description>
    <End>TOAGE</End>
    <FeatureId>FEATURE_ID</FeatureId>
    <FeatureType>GPGIM_TYPE</FeatureType>
    <GeometryImportTime>IMPORT_AGE</GeometryImportTime>
    <LeftPlate>L_PLATE</LeftPlate>
    <Name>NAME</Name>
    <ReconstructionMethod>RECON_METH</ReconstructionMethod>
    <ReconstructionPlateId>PLATEID1</ReconstructionPlateId>
    <RightPlate>R_PLATE</RightPlate>
    <SpreadingAsymmetry>SPREAD_ASY</SpreadingAsymmetry>
</GPlatesShapefileMap>

```

What you can do is simply save your Shapefile from _within GPlates_ (see image below) **before** building any topologies that reference features in that Shapfile. In other words, load your Shapefile into GPlates (which has presumably never been loaded into GPlates before) and immediately save it. This will add the missing mapping fields above, ensuring that feature IDs will get saved as extra attributes into the Shapefile. Alternatively click the `configure` button to the left of the `save` button (in image below) and click `OK`, then save Shapefile.

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

Unfortunately it does mean you’ll need to re-build your topologies. This is because, unless you save your Shapefile using GPlates as mentioned above, every time you load the Shapefile (into GPlates) its features will get assigned new feature IDs (and your existing topologies will be referencing old feature IDs that are now lost).

In general I’d recommend working with GPML(Z) files exclusively when dealing with topologies and their referenced features (although I realize this can be difficult) to avoid issues like this - which includes things like potentially losing the feature ID attribute when manipulating the Shapefile outside GPlates. This is another area we hope to improve on a little bit when we re-structure the GPlates information model to Shapefile mapping (well, not just mapping to Shapefiles, but also other non-native formats).

Regards,  
John

---

_[View the full topic](https://discourse.gplates.org/t/work-with-opologies/194)._
