Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinearRing #43

Open
cezhang opened this issue Oct 14, 2019 · 1 comment
Open

LinearRing #43

cezhang opened this issue Oct 14, 2019 · 1 comment

Comments

@cezhang
Copy link
Contributor

cezhang commented Oct 14, 2019

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?

@winrid
Copy link

winrid commented Aug 9, 2020

@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
                    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants