logo separator

[mkgmap-dev] Way.isClosed()

From WanMil wmgcnfg at web.de on Tue Dec 17 15:40:55 GMT 2013

> Chris66 wrote
>> Am 04.12.2013 10:53, schrieb Gerd Petermann:
>>
>>> because
>>> the way starts with a short segment that is not part of the loop.
>>
>> And so the way is NOT closed in OSM-sense.
>
> I agree. Question is why the unit test for the is_closed() style function
> doesn't agree. It seems to expect that the value depends
> on the data that is available (and might be incomplete).
> @WanMil:
> I think we need three different methods in class Way:
> isClosedInOSM(),  hasIdenticalEndPoints(), and  hasEqualEndPoints()
> My understanding is that the style function is_closed() should just
> return the result of isClosedInOSM() which in turn returns the boolean
> field isClosed.
>
> Do you agree?
>

Yes. I wonder if hasEqualEndPoints() is required?

But you need to take care about any way copy made within mkgmap. I think 
the closed flag is copied very seldom (which is wrong).

WanMil



More information about the mkgmap-dev mailing list