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

Geopackage-provided tiles are malformed in v20 #999

Open
Monstrofil opened this issue Jul 3, 2024 · 12 comments
Open

Geopackage-provided tiles are malformed in v20 #999

Monstrofil opened this issue Jul 3, 2024 · 12 comments

Comments

@Monstrofil
Copy link

I have this minimal config:

tile_buffer = 64

[webserver]
port = ":9090"

[[providers]]
name = "sample_gpkg"
type = "gpkg"
filepath = "bp.gpgk"
srid = 4326

[[providers.layers]]
name = "landuse1"
tablename = "bp"
geometry_fieldname = "geometry"
id_fieldname = "fid"

[[maps]]
name = "landuse_new"

[[maps.layers]]
provider_layer = "sample_gpkg.landuse1"
dont_simplify = true
min_zoom = 3
max_zoom = 15

When running with gospatial/tegola:v0.20.0, I get this:
image

When i switch to gospatial/tegola:v0.19.0, geometry becomes normal:
image

I believe there is a bug in v20.

@iwpnd
Copy link
Member

iwpnd commented Jul 3, 2024

Can you share the file please?

@Monstrofil
Copy link
Author

Monstrofil commented Jul 3, 2024

Sure.
demo.zip

ps. change the table name to functional_zones_table.

@iwpnd
Copy link
Member

iwpnd commented Jul 3, 2024

I can confirm the issue in v0.20.0 and everything working in v0.19.0. Also took a look at the data and couldn't find anything wrong with it either. I was able to verify that the gpkg provider correctly gets the feature from the gpkg and creates a valid polygon. I'm not sure why, but the issues appears to occur during encoding to mvt.

@ARolek
Copy link
Member

ARolek commented Jul 3, 2024

I have a feeling this has to do with this PR #952.

@gdey can you give us some guidance on what our best path forward here is? It seems to me that upgrading the geom package has caused a regression in rendering. I think the geom package version was bumped to bring in a fix for the slippy package to get tests to pass on Apple Silicon. This was discussed in #951

@gdey
Copy link
Member

gdey commented Jul 3, 2024

I need to look into this, and the other one listed here. I'll take a look tomorrow. See what I can find, but it does look like an issue with geom.

@iwpnd
Copy link
Member

iwpnd commented Jul 3, 2024

Just for a sanity check. The mvt_postgis provider is not affected.

@ARolek
Copy link
Member

ARolek commented Jul 3, 2024

Just for a sanity check. The mvt_postgis provider is not affected.

Correct. The mvt_postgis provider does all geoprocessing in PostGIS. The Geopackage provider does the geoprocessing in tegola, which is why this is showing up only in the geopackage provider.

@iwpnd
Copy link
Member

iwpnd commented Jul 3, 2024

which is why this is showing up only in the geopackage provider.

just tested the legacy postgis provider. Same issue there for geometry_type=polygon but fine for geometry_type=linestring. 👀

@ARolek
Copy link
Member

ARolek commented Jul 3, 2024

@iwpnd indeed, the same issue would show up for the legacy postgis provider. The geom package's line handling is fine, but the polygon handling is where the issues stem from.

@gdey
Copy link
Member

gdey commented Jul 4, 2024

Yeah, this looks like an old regression I had with makevalid. Where it would drop certain points due to floating point precision errors.

@ARolek
Copy link
Member

ARolek commented Jul 20, 2024

Note, @gdey has been working on a fix in the geom package and hopes to have a PR ready soon that should address this issue.

@gdey
Copy link
Member

gdey commented Aug 8, 2024

I'm still looking at this. Needed to take a small break, but am look at it.

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

No branches or pull requests

4 participants