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

Incorrect FirstSubdivInfoNumber for first map level #1

Open
Hiller opened this issue Apr 26, 2018 · 0 comments
Open

Incorrect FirstSubdivInfoNumber for first map level #1

Hiller opened this issue Apr 26, 2018 · 0 comments

Comments

@Hiller
Copy link

Hiller commented Apr 26, 2018

Hi.
First. Thanks for a nice library. Great job
Second. I found a bug in SimpleTileMap processing. During map levels creation FirstSubdivInfoNumber for first map level is set to 1. In GetFileData function there's a retrieval of MapLevel for Subdivision index which is 0 based

for (int i = 0; i < rgn.SubdivList.Count && i < tre.SubdivInfoList.Count; i++) {
            int level = SymbolicScaleDenominatorAndBitsLevel.Level4SubdivIdx1(i);
public int Level4SubdivIdx1(int idx) {
            for (int i = Count - 1; i >= 0; i--)
               if (idx >= FirstSubdivChildIdx(i))
                  return i+1;//first map level is always empty(covered by basemap)
            return Count - 1;
         }

In this case level for first supposed map level subdivision will be returned incoreclty

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

1 participant