Open dansku opened 1 year ago
@dansku looks like you closed this out, but was the issue related to the missing flag on the seed command? I believe it's --zxy
Hey @ARolek i did close because i didn't know anyone would answer it.
When I ran
./tegola cache seed --min-zoom 2 --max-zoom 3
there were some bigger tiles (1.4mb) on zoom 2 that didn't get cached, and tegola didn't return any error or anything.
the only way I got it to cache is by making the request via wget and waiting it to cache, as wget has a default timeout of 900s it, in the end worked out.
have you seen something like this?
Can you post your config? If you're using the postgis provider, you should move to the mvt_postgis provider for better results.
here is the config, i will check the provider
hostname = "domain.com"
port = ":8080"
[webserver.headers]
Access-Control-Allow-Methods = "GET, OPTIONS"
Access-Control-Allow-Origin = "*"
[cache] # configure a tile cache
type = "redis"
# register data providers
[[providers]]
database = "maps"
host = "xxx"
name = "xxx"
password = "xxx"
port = 5432
srid = 4326
type = "postgis"
user = "tegola"
#------------------------------------
[[providers.layers]]
geometry_fieldname = "geom"
id_fieldname = "h3_index_int"
name = "hiot_hotspots"
sql = "SELECT ST_AsBinary(geom) AS geom, h3_index_int, count, id FROM hiot_hotspots WHERE geom && !BBOX!"
[[providers.layers]]
geometry_fieldname = "geom"
id_fieldname = "h3_index_int"
name = "hiot_hotspots_denylist"
sql = "SELECT ST_AsBinary(geom) AS geom, h3_index_int, count, id, denylist FROM hiot_hotspots WHERE geom && !BBOX! AND denylist"
[[providers.layers]]
geometry_fieldname = "point"
id_fieldname = "h3_index_int"
name = "hiot_hotspots_points"
sql = "SELECT ST_AsBinary(point) AS point, h3_index_int, id FROM hiot_hotspots WHERE point && !BBOX!"
#------------------------------------
[[maps]]
# center = [22.4, -5.22, 3.0] # set the center of the map so the user is auto navigated to Bonn
name = "mappers"
#------------------------------------
[[maps.layers]]
max_zoom = 14
min_zoom = 7
provider_layer = "mappers.hiot_hotspots"
[[maps.layers]]
max_zoom = 14
min_zoom = 7
provider_layer = "mappers.hiot_hotspots_denylist"
[[maps.layers]]
max_zoom = 6
min_zoom = 2
provider_layer = "mappers.hiot_hotspots_points"
Yeah you're using the postgis type for the provider. Look at the mvt_postgis provider for better results. Also make sure you have indexes on you're geometry columns.
Change provider type, give me a new error:
./tegola cache seed --min-zoom 2 --max-zoom 3
2022-09-06 05:25:24 [INFO] config.go:317: loading local config (config.toml)
2022-09-06 05:25:24 [WARN] postgis.go:332: Connecting to PostGIS with connection parameters is deprecated. Use 'uri' instead.
2022-09-06 05:25:24 [INFO] providers.go:82: registering provider(type): mappers (mvt_postgis)
2022-09-06 05:25:24 [INFO] seed_purge.go:191: zoom list: [2 3]
2022-09-06 05:25:24 [INFO] cache.go:204: waiting for workers to finish up
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (2/3/3) took: 105ms
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (3/0/0) took: 105ms
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (3/0/5) took: 140ms
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (3/1/0) took: 154ms
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (3/0/7) took: 165ms
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (3/1/7) took: 165ms
2022-09-06 05:25:24 [INFO] worker.go:92: seeding map (mappers) tile (3/1/6) took: 168ms
2022-09-06 05:25:24 [INFO] cache.go:214: all workers are done
2022-09-06 05:25:24 [INFO] provider.go:256: cleaning up providers
2022-09-06 05:25:24 [INFO] postgis.go:1021: cleaning up postgis providers
Error: error seeding tile ({Z:2 X:2 Y:1}): ERROR: Unknown geometry type: -739748096 - Unknown (SQLSTATE XX000)
This could be an issue?! Is there a way to know which is the row of this error, for example?
Yea, you need to change you're query up a bit. Please refer to the link I posted earlier.
Yeah you're using the postgis type for the provider. Look at the mvt_postgis provider for better results. Also make sure you have indexes on you're geometry columns.
yeah just realized i don't, adding them now
Here's the best documentation on the mvt_postgis provider: https://github.com/go-spatial/tegola/blob/master/mvtprovider/postgis/README.md
Yea, you need to change you're query up a bit. Please refer to the link I posted earlier.
ahh i see, working on it!
What a massive difference in performance!
Valid Geometries: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection.
And this is the cell:
SRID=4326;POLYGON((-149.4079546040616 61.5682647740014,-149.416689067466 61.56599382773844,-149.4174479028639 61.56157822934728,-149.4094751212302 61.55943382297276,-149.4007425395111 61.56170418788818,-149.3999808578964 61.56611954041555,-149.4079546040616 61.5682647740014))
getting error:
could not register providers: error fetching geometry type for layer (hotspots): layer (hotspots) returned unsupported geometry type (<nil>)
Glad that worked for you!
Glad that worked for you!
thank you for the help, so close from nailing this side of things ;) any idea why it could be returning NIL?
I would need to look at the data. You can turn on SQL debugging to see the query tegola is forming up and then inspect the results against the database directly.
Will do, 5AM here, will go to sleep and check this in the morning. Thank you very much 🚀
I am trying to generate cache for tiles, but some are not being generated, without an error message.
It's not generating the files, and to not return issues, anything I should be looking at?
Thanks