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

Caching not creating files #880

Closed
dansku opened this issue Aug 29, 2022 · 50 comments
Closed

Caching not creating files #880

dansku opened this issue Aug 29, 2022 · 50 comments

Comments

@dansku
Copy link

dansku commented Aug 29, 2022

I am trying to generate cache for tiles, but some are not being generated, without an error message.

root@map-server ~/brain/tegola # ./tegola cache seed tiles 3/2/3
2022-08-29 10:48:58 [INFO] config.go:317: loading local config (config.toml)
2022-08-29 10:48:58 [WARN] postgis.go:332: Connecting to PostGIS with connection parameters is deprecated. Use 'uri' instead.
2022-08-29 10:48:58 [INFO] providers.go:82: registering provider(type): mappers (postgis)
2022-08-29 10:48:58 [INFO] seed_purge.go:191: zoom list: [0]
2022-08-29 10:48:58 [INFO] cache.go:204: waiting for workers to finish up
2022-08-29 10:48:58 [INFO] worker.go:72: cache seed set to not overwrite existing tiles. skipping map (mappers) tile (0/0/0)
2022-08-29 10:48:58 [INFO] cache.go:214: all workers are done
2022-08-29 10:48:58 [INFO] provider.go:256: cleaning up providers
2022-08-29 10:48:58 [INFO] postgis.go:1021: cleaning up postgis providers
root@map-server ~/brain/tegola/cache/mappers/tiles/3/2 # ll
total 44
drwxr-xr-x  2 root root  4096 Aug 29 00:53 ./
drwxr-xr-x 10 root root  4096 Aug 29 00:54 ../
-rw-r--r--  1 root root    59 Aug 29 00:52 1
-rw-r--r--  1 root root 28051 Aug 29 00:53 4
-rw-r--r--  1 root root   362 Aug 29 00:53 5

It's not generating the files, and to not return issues, anything I should be looking at?

Thanks

@dansku dansku closed this as completed Sep 6, 2022
@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

@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

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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?

@dansku dansku reopened this Sep 6, 2022
@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

Can you post your config? If you're using the postgis provider, you should move to the mvt_postgis provider for better results.

https://tegola.io/documentation/configuration/#providers

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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"

@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

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.

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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?

@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

Yea, you need to change you're query up a bit. Please refer to the link I posted earlier.

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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

@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

Here's the best documentation on the mvt_postgis provider: https://github.com/go-spatial/tegola/blob/master/mvtprovider/postgis/README.md

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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!

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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>)

@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

Glad that worked for you!

@dansku
Copy link
Author

dansku commented Sep 6, 2022

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?

@dansku dansku closed this as completed Sep 6, 2022
@dansku dansku reopened this Sep 6, 2022
@ARolek
Copy link
Member

ARolek commented Sep 6, 2022

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.

https://tegola.io/documentation/debugging/

@dansku
Copy link
Author

dansku commented Sep 6, 2022

Will do, 5AM here, will go to sleep and check this in the morning.
Thank you very much 🚀

@Rub21
Copy link

Rub21 commented Nov 27, 2024

I am facing a similar issue: I ran the command expecting to get tiles from zoom levels 0 to 7, but the result only includes a few of them, not all the tiles in the area zoom 0-7. Additionally, in my configuration, I am using mvt_postgis.

app# tegola cache seed \
    --config=/opt/tegola_config/config.toml \
    --map=osm \
    --min-zoom=0 \
    --max-zoom=7\
    --bounds=-180,-85.05112878,180,85.05112878 \
    --concurrency=128 \
    --overwrite=true

2024-11-27 18:42:22 [INFO] config.go:406: loading local config (/opt/tegola_config/config.toml)
2024-11-27 18:42:22 [INFO] providers.go:82: registering provider(type): osm (mvt_postgis)
2024-11-27 18:42:22 [INFO] providers.go:82: registering provider(type): ne (mvt_postgis)
2024-11-27 18:42:23 [INFO] seed_purge.go:194: zoom list: [0 1 2 3 4 5 6 7]
2024-11-27 18:42:23 [INFO] cache.go:213: waiting for workers to finish up
2024-11-27 18:42:35 [INFO] worker.go:94: seeding map (osm) tile (1/1/1) took: 12196ms
2024-11-27 18:42:36 [INFO] worker.go:94: seeding map (osm) tile (1/0/1) took: 13271ms
2024-11-27 18:42:45 [INFO] worker.go:94: seeding map (osm) tile (1/0/0) took: 22493ms
2024-11-27 18:42:58 [INFO] worker.go:94: seeding map (osm) tile (2/1/2) took: 35524ms
2024-11-27 18:42:59 [INFO] worker.go:94: seeding map (osm) tile (2/2/1) took: 36435ms
2024-11-27 18:43:09 [INFO] worker.go:94: seeding map (osm) tile (3/3/4) took: 46769ms
2024-11-27 18:43:11 [INFO] worker.go:94: seeding map (osm) tile (0/0/0) took: 48013ms
2024-11-27 18:43:11 [INFO] worker.go:94: seeding map (osm) tile (1/1/0) took: 48548ms
2024-11-27 18:43:18 [INFO] worker.go:94: seeding map (osm) tile (2/1/1) took: 55526ms
2024-11-27 18:43:20 [INFO] worker.go:94: seeding map (osm) tile (2/2/2) took: 57884ms
2024-11-27 18:43:23 [INFO] worker.go:94: seeding map (osm) tile (3/4/4) took: 60612ms
2024-11-27 18:43:24 [INFO] worker.go:94: seeding map (osm) tile (3/3/3) took: 61831ms
2024-11-27 18:43:32 [INFO] worker.go:94: seeding map (osm) tile (4/7/8) took: 69100ms
2024-11-27 18:43:33 [INFO] worker.go:94: seeding map (osm) tile (3/4/3) took: 70648ms
2024-11-27 18:43:36 [INFO] worker.go:94: seeding map (osm) tile (4/8/8) took: 73310ms
2024-11-27 18:43:36 [INFO] worker.go:94: seeding map (osm) tile (4/7/7) took: 73910ms
2024-11-27 18:43:45 [INFO] worker.go:94: seeding map (osm) tile (5/15/16) took: 82271ms
2024-11-27 18:43:45 [INFO] worker.go:94: seeding map (osm) tile (4/8/7) took: 82454ms
2024-11-27 18:43:47 [INFO] worker.go:94: seeding map (osm) tile (5/16/16) took: 84086ms
2024-11-27 18:43:48 [INFO] worker.go:94: seeding map (osm) tile (5/15/15) took: 85456ms
2024-11-27 18:43:53 [INFO] worker.go:94: seeding map (osm) tile (6/31/32) took: 90739ms
2024-11-27 18:43:56 [INFO] worker.go:94: seeding map (osm) tile (5/16/15) took: 92950ms
2024-11-27 18:43:56 [INFO] worker.go:94: seeding map (osm) tile (6/32/32) took: 93547ms
2024-11-27 18:43:57 [INFO] worker.go:94: seeding map (osm) tile (6/32/31) took: 94162ms
2024-11-27 18:44:05 [INFO] worker.go:94: seeding map (osm) tile (6/31/31) took: 102106ms
2024-11-27 18:44:07 [INFO] worker.go:94: seeding map (osm) tile (7/63/64) took: 104398ms
2024-11-27 18:44:07 [INFO] worker.go:94: seeding map (osm) tile (7/64/64) took: 104773ms
2024-11-27 18:44:08 [INFO] worker.go:94: seeding map (osm) tile (7/64/63) took: 105238ms
2024-11-27 18:44:15 [INFO] worker.go:94: seeding map (osm) tile (7/63/63) took: 112725ms
2024-11-27 18:44:15 [INFO] cache.go:223: all workers are done
2024-11-27 18:44:15 [INFO] provider.go:289: cleaning up providers
2024-11-27 18:44:15 [INFO] postgis.go:1039: cleaning up postgis providers

@Rub21
Copy link

Rub21 commented Nov 27, 2024

Using the tiles-list option work well,
echo "0/0/0" > tile-list.tiles
tegola cache seed tile-list tile-list.tiles ...

@ARolek
Copy link
Member

ARolek commented Nov 29, 2024

@Rub21 can you post the cache part of your config?

@Rub21
Copy link

Rub21 commented Nov 29, 2024

Sure, here is my 👉 config . Maybe I missed something, but setting bounds=-180,-85.05112878,180,85.05112878 did not work. maybe that was removed. But using the tile-list to 0/0/0 an setting the zoom from 0-7 works fine.

$ echo "0/0/0" > tile-list.tiles
$ tegola cache seed tile-list tile-list.tiles \
    --config=/opt/tegola_config/config.toml \
    --map=osm \
    --min-zoom=0 \
    --max-zoom=7\
    --concurrency=128 \
    --overwrite=true

@callsumzg
Copy link

@ARolek It seems that i'm facing exactly the same issue as @Rub21. I'm using Dockerimage "tegola:latest" with mvt_postgis.

The following does not work correctly (only one tile per zoom level). It seems to seed empty tiles for the wrong bbox.

docker exec -it tegola-2 /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --min-zoom 0 \
  --max-zoom 15 \
  --overwrite

Whereas this works like a charm:

docker exec -it tegola /opt/tegola cache seed tile-name "6/33/22" \
  --min-zoom 0 \
  --min-zoom 15 \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --format "/zxy"

@ARolek
Copy link
Member

ARolek commented Dec 13, 2024

@Rub21 and @callsumzg I appreciate the reports, but I'm still not sure exactly what the root cause of this issue is. In v0.20.0 there were some changes with how the geom package was used in the codebase and we're still working through some regressions. I wonder if this issue is related.

Can you please try the v0.19.0 version of tegola and report back?

cc @gdey

@callsumzg
Copy link

@Rub21 Thank you for the quick reply.
I tried version v0.19.0 as you suggested and the seeding with "--bounds" parameter works now as expected. :-)

Can i help you any further to debug this?

@ARolek
Copy link
Member

ARolek commented Dec 13, 2024

I tried version v0.19.0 as you suggested and the seeding with "--bounds" parameter works now as expected. :-)

Ok nice!

Can i help you any further to debug this?

Are you familiar with Go? The next step is hunting down the cause of the issue and developing a test case. Is this something you can help with?

@ARolek
Copy link
Member

ARolek commented Dec 17, 2024

It looks like e5a7366 touched the tile seeding / purging code last. The commit is associated with some changes @gdey made to generating slippy tiles in the geom package. Looking at the v0.1.0 tag the last commit is go-spatial/geom@55e666d. Traversing the code we reach the following function which has the core math:

https://github.com/go-spatial/geom/blob/55e666d67bc5969a5f2e09b17185f72727e5f0f9/slippy/tile_grid.go#L153-L161.

Here's the core math that needs to be looked at: https://github.com/go-spatial/geom/blob/master/slippy/maths.go#L55

@iwpnd
Copy link
Member

iwpnd commented Dec 17, 2024

@ARolek can you release v0.21.0? I believe those issues have since been addressed. The newest image with tag edge should be including it for you to test @callsumzg.

@callsumzg
Copy link

Are you familiar with Go? The next step is hunting down the cause of the issue and developing a test case. Is this something you can help with?

@ARolek Unfortunately, I have zero experience with Go. With Python, yes, but that probably won't help much with this project.

@callsumzg
Copy link

@ARolek can you release v0.21.0? I believe those issues have since been addressed. The newest image with tag edge should be including it for you to test @callsumzg.

That would be great. If I can’t contribute a code fix, at least I can help with testing. Just let me know when it is ready.

@ARolek
Copy link
Member

ARolek commented Dec 17, 2024

@ARolek can you release v0.21.0? I believe those issues have since been addressed. The newest image with tag edge should be including it for you to test @callsumzg.

I just looked at the draft release and you're right! this was fixed by @gdey in the upcoming release. I believe there's still an issue with the geoprocessing operations for providers other than mvt_postgis. I will note that in the release.

I will cut a release this week.

@ARolek
Copy link
Member

ARolek commented Dec 19, 2024

@callsumzg & @Rub21 I just cut v0.21.0 which should address this issue. Can you please watch the release page and when your respective build architecture is ready give it a test? Please report back your results.

@callsumzg
Copy link

@ARolek Thank you for the release. I tried v0.21.0, but the issue persists. The following works perfectly with v0.19.0, but not in later versions:

docker exec -it tegola /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --min-zoom 10 \
  --max-zoom 16 \
  --overwrite

The newer releases >v0.19.0 work only with the following cache seed command:

docker exec -it tegola /opt/tegola cache seed tile-name "6/33/22" \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --min-zoom 0 \
  --max-zoom 15 \ 
  --format "/zxy"

@iwpnd
Copy link
Member

iwpnd commented Dec 20, 2024

The command is borked as of this commit. We are attempting to resolve tiles on a webmercator grid with wgs84 bound coordinates still, are we not?
that’s the reason the cache command with zxy works, but the bounds one does not.

@ARolek
Copy link
Member

ARolek commented Dec 20, 2024

Thanks for the help testing. I have pinged @gdey to investigate to see if we can get tile seeding with bounds working near term as we work towards getting some of the other geom processing fixed.

@iwpnd
Copy link
Member

iwpnd commented Dec 20, 2024

It’s not the geom processing, just how it is being utilized in the seed_purge in my opinion. Either we allow bounds to be either webmercator or wgs coordinates and determine the correct grid for either, or we fix resolving tiles to one grid but communicate the correct bounds to use.
Shall we create a ticket for this one specifically?

@gdey
Copy link
Member

gdey commented Dec 23, 2024

@ARolek Thank you for the release. I tried v0.21.0, but the issue persists. The following works perfectly with v0.19.0, but not in later versions:

docker exec -it tegola /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --min-zoom 10 \
  --max-zoom 16 \
  --overwrite

The newer releases >v0.19.0 work only with the following cache seed command:

docker exec -it tegola /opt/tegola cache seed tile-name "6/33/22" \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --min-zoom 0 \
  --max-zoom 15 \ 
  --format "/zxy"

What is the SRID of that map? I'm trying to figure out the new code is not working. I believe @iwpnd is correct. We are currently defaulting to SRID 3857, which I believe is what it was before.

@gdey
Copy link
Member

gdey commented Dec 24, 2024

@iwpnd @ARolek @callsumzg
Just pushed up a PR with a new option to specify the grid.

#1024

@iwpnd @callsumzg Does this work?

It would mean that bounds wound be called:

docker exec -it tegola /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --wgs84 \
  --min-zoom 10 \
  --max-zoom 16 \
  --overwrite

Help is now:

 tegola cache seed --help
command to seed or purge tiles from the cache

Usage:
  tegola cache seed [flags]
  tegola cache seed [command]

Aliases:
  seed, purge

Examples:
  tegola cache seed --bounds lng,lat,lng,lat

Available Commands:
  tile-list   operate on a list of tile names separated by new lines
  tile-name   operate on a single tile formatted according to --format

Flags:
      --bounds string       lng/lat bounds to seed the cache with in the format: minx, miny, maxx, maxy (default "-180,-85.0511,180,85.0511")
      --concurrency int     the amount of concurrency to use. defaults to the number of CPUs on the machine (default 12)
  -h, --help                help for seed
      --log-threshold int   during seeding, only log tiles that take this number of milliseconds or longer to render (default all tiles)
      --map string          map name as defined in the config
      --max-zoom uint       max zoom to seed cache to (default 22)
      --min-zoom uint       min zoom to seed cache from
      --overwrite           overwrite the cache if a tile already exists (default false)
      --wgs84               the grid system for bounds. This flag indicates that the grid is WGS 84; otherwise it's assumed to be in Pseudo-Mercator
Global Flags:
      --config string      path or http url to a config file, or "-" for stdin (default "config.toml")
      --log-level string   set log level to: TRACE, DEBUG, INFO, WARN or ERROR (default "INFO")
      --logger string      set logger to: standard, zap - default: standard (default "standard")
Use "tegola cache seed [command] --help" for more information about a command.

@gdey gdey closed this as completed Dec 24, 2024
@gdey gdey reopened this Dec 24, 2024
@ARolek
Copy link
Member

ARolek commented Jan 2, 2025

This code has landed in the master branch. Please test when you have a chance using one of the following methods:

I'm going to close this issue, but please re-open if you're still having issues.

@ARolek ARolek closed this as completed Jan 2, 2025
@callsumzg
Copy link

This code has landed in the master branch. Please test when you have a chance using one of the following methods:

I tried to docker pull the "edge" image, but somehow it does not work (or i am just not getting it...):
When i execute the command @gdey provided i get a "unknown flag: --wgs84" error. The help does not include the new parameter, either:

i execute:

docker exec -it tegola /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --wgs84 \
  --min-zoom 10 \
  --max-zoom 16 \
  --overwrite

... i get this:

Error: unknown flag: --wgs84
Usage:
  tegola cache seed [flags]
  tegola cache seed [command]

Aliases:
  seed, purge

Examples:
  tegola cache seed --bounds lng,lat,lng,lat

Available Commands:
  tile-list   operate on a list of tile names separated by new lines
  tile-name   operate on a single tile formatted according to --format

Flags:
      --bounds string       lng/lat bounds to seed the cache with in the format: minx, miny, maxx, maxy (default "-180,-85.0511,180,85.0511")
      --bounds-srid int     the srid of the grid system for bounds. (default 4326)
      --concurrency int     the amount of concurrency to use. defaults to the number of CPUs on the machine (default 2)
  -h, --help                help for seed
      --log-threshold int   during seeding, only log tiles that take this number of milliseconds or longer to render (default all tiles)
      --map string          map name as defined in the config
      --max-zoom uint       max zoom to seed cache to (default 22)
      --min-zoom uint       min zoom to seed cache from
      --overwrite           overwrite the cache if a tile already exists (default false)
Global Flags:
      --config string      path or http url to a config file, or "-" for stdin (default "config.toml")
      --log-level string   set log level to: TRACE, DEBUG, INFO, WARN or ERROR (default "INFO")
      --logger string      set logger to: standard, zap - default: standard (default "standard")
Use "tegola cache seed [command] --help" for more information about a command.

unknown flag: --wgs84

I tried to check if i pulled the correct image from dockerhub, so i did the following:

docker rmi -f tegola:edge
docker pull gospatial/tegola:edge
docker images | grep tegola
gospatial/tegola edge ba21e0569705 6 days ago 46.9MB

docker inspect --format='{{.Id}}' gospatial/tegola:edge
sha256:ba21e05697055b401d533ce56e260b227764fc68cd9299a7b19ecc0e397b9b40

This SHA is not the same then the one from @ARolek URL:

Docker: pull down the edge tag: https://hub.docker.com/layers/gospatial/tegola/edge/images/sha256-8f679a088a2f4732a9326f01932b7ae3593789e531fad8f799156585beb0af6c

What am I missing?

@gdey
Copy link
Member

gdey commented Jan 7, 2025

I' sorry, after code review it was decided that the default was wrong and that it should be bounds-srid

So you should be able to run it without specifying a flag.

You should be able to run it via:

docker exec -it tegola /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --min-zoom 10 \
  --max-zoom 16 \
  --overwrite

@callsumzg
Copy link

callsumzg commented Jan 7, 2025

Without the specific flag, i get this and it still does not work yet.

docker exec -it tegola /opt/tegola cache seed \
  --config /opt/tegola_config/config.toml \
  --map hoehenkurven_1700 \
  --bounds "5.9,45.8,10.5,47.8" \
  --min-zoom 10 \
  --max-zoom 16 \
  --overwrite
2025-01-07 16:52:55 [INFO] config.go:406: loading local config (/opt/tegola_config/config.toml)
2025-01-07 16:52:55 [INFO] providers.go:82: registering provider(type): hoehenkurven_1700 (mvt_postgis)
Error: SRID=4326 is not a know conversion  ePSG code
 known codes are: 3395
 3857
 4087

Usage:
  tegola cache seed [flags]
  tegola cache seed [command]

Aliases:
  seed, purge

Examples:
  tegola cache seed --bounds lng,lat,lng,lat

Available Commands:
  tile-list   operate on a list of tile names separated by new lines
  tile-name   operate on a single tile formatted according to --format

Flags:
      --bounds string       lng/lat bounds to seed the cache with in the format: minx, miny, maxx, maxy (default "-180,-85.0511,180,85.0511")
      --bounds-srid int     the srid of the grid system for bounds. (default 4326)
      --concurrency int     the amount of concurrency to use. defaults to the number of CPUs on the machine (default 2)
  -h, --help                help for seed
      --log-threshold int   during seeding, only log tiles that take this number of milliseconds or longer to render (default all tiles)
      --map string          map name as defined in the config
      --max-zoom uint       max zoom to seed cache to (default 22)
      --min-zoom uint       min zoom to seed cache from
      --overwrite           overwrite the cache if a tile already exists (default false)
Global Flags:
      --config string      path or http url to a config file, or "-" for stdin (default "config.toml")
      --log-level string   set log level to: TRACE, DEBUG, INFO, WARN or ERROR (default "INFO")
      --logger string      set logger to: standard, zap - default: standard (default "standard")
Use "tegola cache seed [command] --help" for more information about a command.

SRID=4326 is not a know conversion  ePSG code
 known codes are: 3395
 3857
 4087

Is it possible that the "edge" docker image does not include your code changes?

@gdey
Copy link
Member

gdey commented Jan 7, 2025

Let me look that's weird. I tested this; i thought. I know the test case works i wonder if i messed up the command arg processing.

@gdey
Copy link
Member

gdey commented Jan 7, 2025

Yes, I screwed up; I used the Supported Proj strings function from Proj, instead of the checking for the supported SRID's. I'm sorry, let me fix that.

@gdey
Copy link
Member

gdey commented Jan 7, 2025

@callsumzg Here is a PR with the fix. #1027 I don't have caching setup on my test instance. So, I was not able to do a quick end to end test. If that's not hard for you do on this PR that would be great.

@callsumzg
Copy link

@gdey Thanks! I just pulled your PR and built/started the docker container. The tiling command seems to work now, but when i try to access the tegola-GUI on my localhost, i just see the listing of a [.keep] file. That is very weird. But it is also late here, i give it another shot tomorrow.

@ARolek
Copy link
Member

ARolek commented Jan 7, 2025

@callsumzg It sounds like when you built locally the UI didn't get embedded. Try using one of the artifacts on this Action: https://github.com/go-spatial/tegola/actions/runs/12659195670.

@callsumzg
Copy link

@ARolek Thank you for the hint. I tried building it locally with the UI using the artifacts, but I've never done this before and unfortunately couldn't get it to work. I'll be happy to test it again once it's deployed on Docker Hub. However, I was able to briefly test the tiling process, and that seemed to work with @gdey's latest PR 1027, at least according to the stdout of my console: no errors anymore and the tiling process started.

@ARolek
Copy link
Member

ARolek commented Jan 8, 2025

@callsumzg you can try the edge docker hub container tag. This container represents what's currently in the master branch. https://hub.docker.com/layers/gospatial/tegola/edge/images/sha256-5db5516220ce9a9c5c9c442f8c76d1e22161b1ea4ea7b5e5dd8adb094215d536

@callsumzg
Copy link

@gdey @ARolek Thank you both. On edge, it's now running 💯 smoothly

@ARolek
Copy link
Member

ARolek commented Jan 9, 2025

@callsumzg great news! I released version v0.21.2 yesterday which you can use if you want to pin your version for now. Keep us in the loop as you continue researching vector tile servers. Hopefully tegola will meet you needs.

@callsumzg
Copy link

@ARolek Great, thank you for the fix and quick response! Tegola would certainly meet our requirements if it could create tile services with a custom CRS, as discussed in Issue 668 :-)

@ARolek
Copy link
Member

ARolek commented Jan 15, 2025

@callsumzg were you able to try the proof of concept solution in #668? The convo starts here: #668 (comment)

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

6 participants