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

Example in tms.rst not runnable #634

Open
markwestcott34 opened this issue Feb 15, 2018 · 3 comments
Open

Example in tms.rst not runnable #634

markwestcott34 opened this issue Feb 15, 2018 · 3 comments

Comments

@markwestcott34
Copy link

Got another documentation bug for you! This time on tms.rst: https://github.com/locationtech-labs/geopyspark/blob/master/docs/guides/tms.rst

# Reads in the first 3 levels of the layer
for zoom in range(0, 4):
   layers.append(gps.query(uri="s3://azavea-datahub/catalog",
                           layer_name="nlcd-tms-epsg3857",
                           layer_zoom=zoom))

fails with an 403 error for access to the S3 resource.

@jbouffard
Copy link
Collaborator

Hey, @markwestcott34! Thanks for letting us know about this one too! What's happening here is that you're getting a permission error when you're trying to read the layer. Unfortunately, I don't know if we'll be able to change the permissions of that layer (I'll have to ask). Everything else in that example is correct, though; so it can still be used as a reference.

If you've been following the other guides, you can still run this example using the cropped.tif:

layer = gps.geotiff.get(gps.LayerType.SPATIAL, "/tmp/cropped.tif")
tiled_layer = layer.tile_to_layout(gps.GlobalLayout(), 3857)
pyramid = tiled_layer.pyramid()

cm = gps.ColorMap.build(pyramid.get_histogram(), 'magma')

tms = gps.TMS.build(pyramid, cm)

While not the exact same, it'll still allow you to run through at least a portion of the guide. Though, you won't be able to run the examples that come later.

@markwestcott34
Copy link
Author

Thanks @jbouffard !

@jbouffard
Copy link
Collaborator

You're welcome, @markwestcott34!

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

2 participants