Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

server - what is the best solution to store a tile cache ? in a file system or a database table?

I have already implemented a tile server using xyz tile system and geotools for rendering tile image,now i have to cache my tile image which is a png image 256*256(always) of size ,i am not using geowebcache because i think it 's not suitable for a webmapping application where features geometry and layer style can change daily,so i am using xyz systems instead of using bbox or wms requests, i find a good article on serving tiles as mvt (mapbox vector tiles) from postgis at https://medium.com/geolytix/xyz-dynamic-vector-tiles-created-on-the-fly-cached-and-updated-directly-in-postgis-37db33c31450,for my case unstead of caching an mvt i will cache a raster tile ,the same as a bytearray ex:

create table if not exists tile_cache
(
    z integer not null,
    x integer not null,
    y integer not null,
    mvt tile,
    bbox geometry(Polygon,4326),
    constraint tile_cache_x_y_pk
        primary key (z, x, y)
)
;

create index if not exists tile_cache_z_x_y_idx
    on tile_cache (z, x, y)
;

it will create an xyz index to speed up thinks, so i was wondering what is the best and faster solution ? Serving tiles from postgis table using xyz index or serving directly from file system.

question from:https://stackoverflow.com/questions/65601165/what-is-the-best-solution-to-store-a-tile-cache-in-a-file-system-or-a-database

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...