You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
file_path: A string representing the path to the file.
134
+
z: An integer representing the zoom level.
135
+
x: An integer representing the x-coordinate of the tile.
136
+
y: An integer representing the y-coordinate of the tile.
137
+
138
+
Returns:
139
+
A Response object containing the rendered tile image in PNG format, or raises an HTTPException with a status code of 404 and a corresponding detail message.
140
+
141
+
"""
142
+
y= (1<<z) -1-y
143
+
try:
144
+
uri=f'file:{file_path}?mode=ro'
145
+
withsqlite3.connect(uri, uri=True) asconn:
146
+
cursor=conn.cursor()
147
+
cursor.execute("SELECT tile_data FROM tiles WHERE zoom_level=? AND tile_column=? AND tile_row=?", (z, x, y))
style: str=Query(..., description=f"Style should be '<b>shader_rgba</b>', '<b>custom</b>' or one of {list(cmap.data.keys())} values. <br><br>"
25
+
style: str=Query(default=None, description=f"Style should be '<b>shader_rgba</b>', '<b>custom</b>' or one of {list(cmap.data.keys())} values. <br><br>"
26
26
f"If '<b>custom</b>', extra parameters values and colors are needed like:<br> values=1.23,80.35,190.587&colors=255,0,0,255_0,255,0,255_0,0,255,255 <br>"
27
27
f"so values are comma seperated, and colors are r,g,b,a and _ seperated."),
0 commit comments