Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Aug 2, 2024
2 parents 4f97f93 + ec0d356 commit 280ee0c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
GeometryOps = "3251bfac-6a57-4b6d-aa61-ac1fef2975ab"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
LRUCache = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Expand All @@ -33,14 +34,15 @@ Extents = "0.1.2"
GeoInterface = "1"
GeometryBasics = "0.4"
HTTP = "1"
ImageMagick = "1.3"
LRUCache = "1"
LinearAlgebra = "1"
Makie = "0.21"
MapTiles = "1"
OrderedCollections = "1"
ThreadSafeDicts = "0.1"
TileProviders = "0.1"
ImageIO = "0.6"
FileIO = "1"
julia = "1"

[extras]
Expand Down
3 changes: 2 additions & 1 deletion src/Tyler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ using Extents: Extents, Extent
using GeoInterface: GeoInterface
using GeometryBasics: GeometryBasics, GLTriangleFace, Point2f, Vec2f, Rect2f, Rect2, Rect, decompose, decompose_uv, Vec3d, Point2d, Point3d, Point4d
using HTTP: HTTP
using ImageMagick: ImageMagick
using LRUCache: LRUCache, LRU
using MapTiles: MapTiles, Tile, TileGrid, web_mercator, wgs84, CoordinateReferenceSystemFormat
using Makie: Makie, Observable, Figure, Axis, LScene, RGBAf, on, isopen, meta, mesh!, translate!, scale!, Plot
Expand All @@ -23,6 +22,8 @@ using ArchGDAL
import GeoFormatTypes as GFT
using Downloads
using Scratch
using ImageIO, FileIO


const CACHE_PATH = Ref("")

Expand Down
4 changes: 3 additions & 1 deletion src/tiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ function fetch_tile(provider::AbstractProvider, downloader::AbstractDownloader,
end

function load_tile_data(::AbstractProvider, downloaded::AbstractVector{UInt8})
return ImageMagick.readblob(downloaded)
io = IOBuffer(downloaded)
format = FileIO.query(io) # this interrogates the magic bits to see what file format it is (JPEG, PNG, etc)
return FileIO.load(format)
end

function Base.wait(tiles::TileCache)
Expand Down

0 comments on commit 280ee0c

Please sign in to comment.