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

Generate a single tile? #456

Closed
dmfenton opened this issue Aug 21, 2017 · 11 comments
Closed

Generate a single tile? #456

dmfenton opened this issue Aug 21, 2017 · 11 comments

Comments

@dmfenton
Copy link

Is there a way to just generate a single tile? E.g. 13,2343,3132.

@e-n-f
Copy link
Contributor

e-n-f commented Aug 21, 2017

There is not currently a way to do this. Is the use case for clipping, for tileset updating, or something else?

@dmfenton
Copy link
Author

I want to use AWS Lambda to generate a single vector tile on demand from any arbitrary stream of geojson features

so user requests: 0/0/0.pbf
lambda returns the file
cloudfront caches

voila: serverless vector tile server

it's not the most efficient way to do things, but the operations overhead is very low

@jdeboer-geoplan
Copy link

@dmfenton did you find a way to do what you wanted with lambda? That sounds cool.

@dmfenton
Copy link
Author

I got a tile cooker working on lambda that can return a single tile, but it has to cook the whole set first. So yes and no I guess.

@mapsam
Copy link

mapsam commented Jan 26, 2018

@dmfenton if your plan is to generate a single tile, an alternative could be a combination of geojson-vt (for ingesting geojson) & vt-pbf (writing JS objects into pbfs).

Could be set up with a script like:

var geojsonvt = require('geojson-vt');
var vtpbf = require('vt-pbf');

var tileIndex = geojsonvt(YOUR_GEOJSON_OBJECT);
var tile = tileIndex.getTile(Z, X, Y);
var buffer = vtpbf.fromGeojsonVt({ 'YOUR-LAYER-NAME': tile });

return buffer;

@dmfenton
Copy link
Author

dmfenton commented Jan 26, 2018 via email

@e-n-f
Copy link
Contributor

e-n-f commented Jan 26, 2018

Actually this is less complicated to do directly in Tippecanoe than I thought. Does #521 do what you were looking for?

@dmfenton
Copy link
Author

Yes! I think it does! I'll dust off my cooker and give this a try.

@e-n-f
Copy link
Contributor

e-n-f commented Feb 7, 2018

PR replaced by #529

@e-n-f
Copy link
Contributor

e-n-f commented Feb 12, 2018

Merged

@e-n-f e-n-f closed this as completed Feb 12, 2018
@jalessio
Copy link
Contributor

jalessio commented Jan 6, 2019

@dmfenton Did you ever get this working?

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

5 participants