# Selecting a Feature from a Layer (Polygon vs. Multipolygon)

**URL:** <https://community.thinkgeo.com/t/selecting-a-feature-from-a-layer-polygon-vs-multipolygon/12381>\
**Category:** WPF\
**Created:** [March 26, 2026, 8:40pm UTC](https://community.thinkgeo.com/t/selecting-a-feature-from-a-layer-polygon-vs-multipolygon/12381 "2026-03-26T20:40:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [March 27, 2026, 5:23pm UTC](https://community.thinkgeo.com/t/selecting-a-feature-from-a-layer-polygon-vs-multipolygon/12381/2 "2026-03-27T17:23:25Z")

</div>

Hi Chris,

A polygon with multiple outer rings is generally considered an **invalid geometry**. In most cases, it should be represented as a **multipolygon** instead.

I’m curious what data source you’re using. Some formats (like shapefiles or FileGeoDatabase) don’t explicitly mark rings as inner or outer, so the GIS engine has to infer that from the geometry.

If you directly read a WKT polygon that contains multiple outer rings, it would typically be treated as invalid and may have weird result (I think in your case all the rings except for the 1st one were considered as inner rings so not selectable). Tools like QGIS may automatically normalize this and convert it into a multipolygon behind the scenes.

ThinkGeo doesn’t automatically normalize these cases, but we do provide APIs to validate and fix geometries:

```auto
feature.IsGeometryValid(out TopologyValidationError);
feature.MakeGeometryValid();

```

Just note that `MakeGeometryValid()` may modify the geometry in ways you might not expect, so it’s best to review the result.

In general, we recommend ensuring the data is valid at the source. If this is coming from a custom format, try to avoid creating invalid polygons. Otherwise, let us know which format you’re using—there’s a chance it could be a bug on our side.

Also, we just fixed a related issue for FileGeoDatabase here:

> [@TopologyException on GetFeaturesContaining](https://community.thinkgeo.com/t/topologyexception-on-getfeaturescontaining/12380/3):
>
> Hi, Julian Since it works with ShapeFileFeatureLayer and SqlServerFeatureLayer but only fails with FileGeoDatabaseFeatureLayer , this looks like a bug where polygon rings weren’t correctly handled (inner vs outer). We’ve fixed it in ThinkGeo.FileGeoDatabase 14.5.0-beta133 — please grab the latest and give it another try. If it’s still happening, could you send us your test data at [support@thinkgeo.com](mailto:support@thinkgeo.com)? We’ll dig into it. Thanks, Ben

Thanks,  
Ben

---

_[View the full topic](https://community.thinkgeo.com/t/selecting-a-feature-from-a-layer-polygon-vs-multipolygon/12381)._
