osmlint icon indicating copy to clipboard operation
osmlint copied to clipboard

Invalid polygons

Open maning opened this issue 9 years ago • 7 comments

With turf.area, negative values means that the polygon has invalid geometry like crossing ways. Let's use this to detect invalid polygons.

maning avatar Apr 05 '16 12:04 maning

@geohacker @Rub21

maning avatar Apr 05 '16 12:04 maning

@maning .- what are the invalid polygons?

Rub21 avatar Apr 05 '16 21:04 Rub21

@Rub21, for example, in this building shape analysis repo we calculate polygon area in one of the metrics. Any polygon we detect that has negative numbers is an invalid polygon. For example, this building.

As a start, we can run this linter for all buildings and mark as invalid poly if it has negative area value.

maning avatar Apr 06 '16 10:04 maning

@maning this is nice figured out, let's add on osmlit.

Rub21 avatar Apr 06 '16 22:04 Rub21

I saw here the Tilereduce procesor(https://github.com/mapbox/osm-building-shapes) made by @geohacker , Maybe he is the right person to add this on osmlint.

Rub21 avatar Apr 26 '16 13:04 Rub21

@Rub21 was thinking about this the other day! I can add this, will get you to look over once I push the code.

geohacker avatar Apr 26 '16 14:04 geohacker

@geohacker @Rub21 @arunasank Can we do this? Context here: https://github.com/osmlab/labuildings/issues/92#issuecomment-222731623

maning avatar May 31 '16 15:05 maning