go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.29k stars 196 forks source link

gpkg: invalid filepath #679

Open ocasti opened 4 years ago

ocasti commented 4 years ago

I can't set filepath for tegola_lambda for gpkg file.

ARolek commented 4 years ago

Can you please provide the [[providers]] block of the config so I can see how you're referencing it?

Btw, that's great you're using tegola_lambda and Geopackage. I think it's such a cool implementation.

ocasti commented 4 years ago

Hi!

[webserver] port = ":9090" hostname = "{{hostname}}"

[cache] type="s3" bucket = "s3://{{bucket}}/" # cache specific config aws_access_key_id = "{{key_id}}" aws_secret_access_key = "{{access_key}}"

[[providers]] name = "ne" type = "gpkg" filepath = "s3://{{bucket}}/natural_earth_vector.gpkg"

srid = 3857

[[providers.layers]]
name = "ne_10m_admin_0_label_points"
tablename = "ne_10m_admin_0_label_points"
fields = ["sr_subunit","scalerank"]

...... Other providers looks like first

ARolek commented 4 years ago

I see, the issue there is that the geopackage provider can't pull the file from S3 right now (though that could be added, cool idea). Depending on the size of the geopackage, try zipping it up with tegola_lambda and deploying it as part of the Lambda function. The Lambda limits page shows you can do 50mb zipped and 250mb unzipped.

ocasti commented 4 years ago

Thanks, but for the moment I wouldn't like it, the gpkg weigh about 3Gb each, I think it will play with postgres (with geopackage it's faster)

ARolek commented 4 years ago

Got it. I'm not sure if Lambda would allow for that large of a file to be downloaded, but then again I have never tried.

If you're going to play with Postgres, maybe check out Postgres Aurora too. I put together a blog on a fully serverless architecture that might be helpful: https://medium.com/@alexrolek/the-serverless-vector-map-stack-lives-22835d341d7d

ocasti commented 4 years ago

Got it. I'm not sure if Lambda would allow for that large of a file to be downloaded, but then again I have never tried.

If you're going to play with Postgres, maybe check out Postgres Aurora too. I put together a blog on a fully serverless architecture that might be helpful: https://medium.com/@alexrolek/the-serverless-vector-map-stack-lives-22835d341d7d

Could you explain to me how to download the file with tegola?

ARolek commented 4 years ago

I was referring to if tegola_lambda supported downloading from S3. I'm not sure lambda could download a 3GB file.