ArchGDAL error after recent update

I had some very basic geocode working for plotting a tif file that has recently stopped working.

It’s very basic, from here: Julia for Geospatial part 3 – reading, displaying and writing raster data – acgeospatial

using ArchGDAL, Plots, Colors, Images, GeoData
const AG = ArchGDAL

url = "E:\\Riverina\\Riverina-Cropping2.tif"

LLS = AG.readraster(url)

gt = ArchGDAL.getgeotransform(LLS)
p = ArchGDAL.getproj(LLS)

n_rasters = (ArchGDAL.nraster(LLS))

width = ArchGDAL.width(LLS)

Each line runs fine until I get to the last line which produces an error:

ERROR: cannot assign a value to variable Graphics.width from module Main

Code worked fine previous to a recent update… Anyone have a clue why???

I think it fundamentally comes down to the Graphics package exporting a function called width, and one of ArchGDAL, Plots, Colors, Images, GeoData is re-exporting this when you do using ArchGDAL, Plots, Colors, Images, GeoData.

Since you are already adding the namespace (AG.x etc.), you can try changing using to import in the first line.

1 Like

Also, you cant actually update ArchGDAL using GeoData.jl. It was renamed to Rasters.jl.