Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k 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.


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

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...