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

Features dropping across tiles #284

Closed
fullbit-tech opened this issue Jun 7, 2018 · 10 comments
Closed

Features dropping across tiles #284

fullbit-tech opened this issue Jun 7, 2018 · 10 comments

Comments

@fullbit-tech
Copy link

Hello,

I'm running into some odd behavior across tile boundaries. It seems like some features are not continuing into some tiles, but does in others.

Here is an example where you can see some tiles dropping features but not others:

tile-clip

Here is a an example of how it would look if working correctly:

sliced

I was hoping someone could give me an idea of what might be happening during the tile creation process that would cause this. No errors are occurring and the tiles are all loading fine. We've processed a significant amount of layers with no problem, but a handful seem to be having similar issues.

Apologies if the details are light. I'm not sure what would be pertinent but can answer any questions needed.

Versions:

"mapnik@3.5.14",
"mapnik-vector-tile@1.2.2",

@flippmoke
Copy link
Member

Can you provide an example script to create these tiles?

@fullbit-tech
Copy link
Author

fullbit-tech commented Jun 8, 2018

We're using a mapbox tilelive implementation, https://github.com/mapbox/mapbox-tile-copy to sync the tiles to s3.

So running a script like the following has successfully reproduced it for me:

var mbTileCopy = require('mapbox-tile-copy');
var file = './6528b73b07ea6ddd2709e279c0f72ca8';
var uri = 's3://test/test_tiles_4/{z}/{x}/{y}.pbf?timeout=10000';

mbTileCopy(file, uri, {
  minzoom: 8,
  maxzoom: 18,
  retry: 3
}, function(err) {
  console.log(err);
});

I think, for the most part, we aren't doing anything novel. It looks like the interface is happening with https://github.com/mapbox/tilelive-bridge which you appear to be contributing to, so you might be able to tell me if I'm barking up the wrong tree.

You can get a copy of the geojson we're using here:

https://s3.amazonaws.com/think-gis-static/6528b73b07ea6ddd2709e279c0f72ca8

Public test endpoint for the generated tiles is:

https://{s}.thinkgis.com/test_tiles_2/{z}/{x}/{y}.pbf

Let me know if there's any other info I can get you. I greatly appreciate your time.

@springmeyer
Copy link
Contributor

@fullbit-tech I just read this and noticed that you said you are using "mapnik-vector-tile@1.2.2",. That is quite old. I would recommend upgrading to the latest version of node-mapnik and them try replicating again.

@fullbit-tech
Copy link
Author

fullbit-tech commented Jun 26, 2018

@springmeyer I thought this might be an issue, so I updated mapbox-tile-copy to the latest (7.1.0) which uses mapnik@3.7.0 mapnik-vector-tile@1.6.1 but no luck. Still seeing the clipping occurring.

@springmeyer
Copy link
Contributor

@fullbit-tech okay. What zoom level are you seeing the dropped features at?

@springmeyer
Copy link
Contributor

hmm, @fullbit-tech I just noticed that the data you uploaded above uses a GeometryCollection. I would recommend not using that type and its likely that is the problem. Try flattening the data into specific geometry types like Polygon, Point, lineString, etc. Make sure the data looks correct in an application like https://qgis.org/en/site/ when loaded as a GeojSON without a GeometryCollection. Then try again.

@fullbit-tech
Copy link
Author

@springmeyer Does this implementation not support GeometryCollections? It looks like support was added? #98 (comment)

@fullbit-tech
Copy link
Author

@springmeyer I flattened and reprocessed and the clipping is no longer happening. Thank you so much for your help. I'll close this issue, but can you let me know if there are any plans to support GeometryCollections in the future?

Cheers!

@springmeyer
Copy link
Contributor

@springmeyer I flattened and reprocessed and the clipping is no longer happening.

That is great news. Thanks for confirming I guessed right.

@springmeyer Does this implementation not support GeometryCollections? It looks like support was added? #98 (comment)
I'll close this issue, but can you let me know if there are any plans to support GeometryCollections in the future?

Nice find. Yes, based on that ticket (which was not still in my memory) it appears we supported GeometryCollection, at least in core mapnik-vector-tile code. So either that regressed or there is a a bug or missing support elsewhere (say in Mapnik core's geojson parser).

To fix this problem we'd need a working testcase. The one you posted above I would not consider "working" because there is no way to know what you expect it to do, or what it should look like. An ideal working testcase would be simplified such that the geometry collection is hand crafted such that is demonstrates a problem but without any extra data that is not needed to replicate. See https://github.com/mapnik/mapnik/wiki/A-perfect-testcase for more details. If you give the time here please create a new issue.

@fullbit-tech
Copy link
Author

@springmeyer I'll take a look and see if I can get a cleaner test case for you this week and will create an issue for it. Thanks again!

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

3 participants