mapbox-vector-tile-java icon indicating copy to clipboard operation
mapbox-vector-tile-java copied to clipboard

LinearRing

Open cezhang opened this issue 5 years ago • 1 comments

It is a special case of LineString. I know in mapbox specification, the LinearRing should refer to Polygon. BUT in some case, a LineString(that's a LinearRing) should be draw as a closed ring. I think the implement following:

public static boolean shouldClosePath(VectorTile.Tile.GeomType geomType) {
        final boolean closeReq;

        switch(geomType) {
            case POLYGON:
                closeReq = true;
                break;
            default:
                closeReq = false;
                break;
        }

        return closeReq;
    }

should include the case of LinearRing.

Do you think it's a issue?

cezhang avatar Oct 14 '19 03:10 cezhang

@cezhang were you seeing any specific issues? Right now I'm seeing that water is not properly handled, which is a LinearRing. It seems to be due to this in PolyRingClassifierV2_1:

                    if(Math.abs(outerArea) < Math.abs(area)) {
                        continue; // Holes must have less area, could probably be handled in a isSimple() check
                    }

winrid avatar Aug 09 '20 19:08 winrid