Comments (4)
Yes, this is already implemented though not really exposed in the TileClient
. The server's endpoint to do this is /pixel/{left}/{right}
which you can see on my deployed server here: https://tileserver.banesullivan.com/swagger/
To use this locally with the TileClient
, do:
from localtileserver import TileClient
import requests
client = TileClient('/Users/bane/Desktop/TC_NG_SFBay_US_Geo.tif')
url = client.create_url('/pixel/0/0')
data = requests.get(url).json()
print(data)
output:
{'r': 99,
'g': 75,
'b': 48,
'a': 255,
'bands': {'1': 99.0, '2': 75.0, '3': 48.0},
'left': 0,
'top': 0,
'units': 'pixels'}
I will leave this open to implement a method on the TileClient
class to do this (as well as all the other endpoints)
from localtileserver.
The above is in pixel space. You can use the units parameter to use world coordinates.
I'll document this
from localtileserver.
That's great to know. I look forward to the implementation. Many thanks!
from localtileserver.
This functionality is changing a bit in #44
from localtileserver.
Related Issues (20)
- ipyleafelt's `add_*` methods were deprecated: update examples
- Configure jupyter server extension HOT 7
- add support for custom matplotlib colormap HOT 7
- could BoundTileLayer be declared outside of the function ? HOT 1
- caching is broken HOT 3
- Switch to FastAPI HOT 4
- What if `TileClient` was a wrapping of a `rasterio` dataset? HOT 1
- Very slow on Windows HOT 7
- Extract roi issue HOT 2
- Raster image stretch e.g. min max stretching HOT 10
- Support for Amazon SageMaker Studio Lab HOT 14
- Displaying images on remote JupyterHub HOT 21
- Add support for Google Colab HOT 16
- palette -> cmap
- AttributeError: 'Map' object has no attribute 'add_child' HOT 12
- Add a utility to the Report that will help decipher if a user is in a "remote" environment HOT 2
- werkzeug-2.1.0 incompatible HOT 1
- Bokeh tile server HOT 8
- support streamlit HOT 4
- again a poor soul not managing to serve the tiles on remote server HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localtileserver.