Skip to content

Julia part 4

  • blog

Way back in Feb 2019 I wrote a series of posts on Geospatial Julia and here they all are:

Julia for Geospatial Programming part 1 – setting up

Julia for Geospatial part 2 – speed test

Julia for Geospatial part 3 – reading, displaying and writing raster data

The good news is that for the main the vast majority of what I wrote still remains true. What has changed is Julia has moved on to version 1.7.0. So this month I’ve been through and updated all the associated code.

I removed my old version of Julia, downloaded the new one and followed my guide in part 1 to get setup again. I think it is probably easier than getting going with Python.

After running all my old code again I noticed I was getting some errors, I systematically stepped through these and just got it working. I then looked over the docs for ArchGDAL. A couple of ‘new’ things stood out, but


removed several lines of code for me, there was also a nice trick with creating false colour images.

I updated this notebook on reading and writting Shapefiles as well. I was able to finish it. Previously I couldn’t work out how to get the projection written out, but with the new updates to ArcGDAL I found this was much simplier.

I have added a new notebook as well. This time on displaying Sentinel 2 and creating an NDVI image. It also gave me the opportunity to look at GeoArrays. Great name! I basically used this excellent tutorial – though I couldn’t get the plotting to work so ended up back with Images.jl again.

Two neat things

1. There is a Julia plugin for PyCharm. I found it useful, though still wrote all the code in Jupyter. Btw JupyterLab supports Julia kernel.

2. I found this rather excellent plotting post on Julia it covered images so that was super neat. Perhaps better than the official tutorial?

I hope this has been of help. I’ll try and update the repo when I can, I don’t plan to add anymore code currently though.