How do you define a hole for a polygon?

@ChrisWard and @Peter
With thanks for your attention.
I finally found the error. The error was not from the large number of screens, nor from the extensions, the error was created by a polygon with a HolePointsFromString inserted in it.
The current question is how to define a hole for a polygon?

If you send me a PM with the AIA attached I can take a look. I implemented the Map and its related components.

It is very simple.

  • Add a polygon to map component.
  • Set PointsFromString to
  • Set HolePointsFromString to

The error is ready, you will encounter the error after re-entering the project.
I tested it on the project and on other screens, and the error was repeated.

1 Like

It's very good that you found the root cause of the error :grin:

That does not mean everything is good - you are still only millimetres away from the jaws of a hungry lion. Simplifying the App and the Code will pay dividends.

1 Like

As a temporary workaround, try wrapping the HolePointsFromString in another pair of [].

Can you give a simple example of a polygon with a hole?

Try this project.

PolygonHoleTest.aia (1.5 KB)

1 Like

Thanks, you are the best. :clap:
I got this. Where did I go wrong about FeatureFromDescription?
Please explain with an example. :pray:

FeatureFromDescription expects a single feature, but you're handing it a tuple of "features" and a feature description. Just try giving the second item in that outermost list.

What if I use HolePoints?

It's been a while since I've looked at it, but my recollection is that the first list of coordinates is the exterior ring and if you want any holes you need to provide additional lists of coordinates to represent the interior (hole) rings. See the GeoJSON specification for more details (ref).

1 Like

Same result. :pensive:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.