JuliaGeo / Sep 04 2019
Remix of Julia by Nextjournal

JuliaGeo @ FOSS4G 2019

EDIT: Video is here

Simple package management

Adding Proj4 will automatically download and install a pre-compiled Proj library. The same works for GDAL, GEOS etc.

]add Proj4
using Proj4

Cartographic projection type

Construct a projection from a string in proj.4 "plus format"

The projection string proj_string is defined in the proj.4 format, with each part of the projection specification prefixed with '+' character. For example:

`wgs84 = Projection("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")`
wgs84 = Projection("+proj=longlat +datum=WGS84 +no_defs")
utm56 = Projection("+proj=utm +zone=56 +south +datum=WGS84 +units=m +no_defs")
Projection("+proj=utm +zone=56 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0")
transform(src_projection, dest_projection, position [, radians=false])

Transform between geographic or projected coordinate systems, returning the transformed points in a Float64 array the same shape as position.

transform(wgs84, utm56, [150 -27 0])
1×3 Array{Float64,2}: 2.02274e5 7.01002e6 0.0


We've been wrapping the latest and greatest Proj libraries as well. The same goes for GDAL. This is a work in progress.

]add Proj4#wrap6
using Proj4
wgs84 = Proj4.proj_create("EPSG:4326")
Ptr{Nothing} @0x00000000029e4130
# these arguments will become optional
Proj4.proj_as_wkt(wgs84, Proj4.PJ_WKT2_2018, C_NULL)
"GEOGCRS[\"WGS 84\",\n DATUM[\"World Geodetic System 1984\",\n ELLIPSOID[\"WGS 84\",6378137,298.257223563,\n LENGTHUNIT[\"metre\",1]]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n CS[ellipsoidal,2],\n AXIS[\"geodetic latitude (Lat)\",north,\n ORDER[1],\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n AXIS[\"geodetic longitude (Lon)\",east,\n ORDER[2],\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n USAGE[\n SCOPE[\"unknown\"],\n AREA[\"World\"],\n BBOX[-90,-180,90,180]],\n ID[\"EPSG\",4326]]"

Common interfaces

Julia has a very active community, which actively works to connect and re-use packages. The language makes this easy.

]add CSV DataFrames TypedTables
csvdata = 
io = IOBuffer(csvdata)
IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=192, maxsize=Inf, ptr=1, mark=-1)
using CSV
csv = CSV.File(io)
CSV.File("<Base.GenericIOBuffer{Array{UInt8,1}}>"): Size: 3 x 8 Tables.Schema: :col1 Missing :col2 Int64 :col3 Float64 :col4 Float64 :col5 String :col6 Date :col7 DateTime :col8 Bool
using DataFrames
df = DataFrame(csv)
3 items

using TypedTables
tt = TypedTables.Table(df)
Table with 8 columns and 3 rows: col1 col2 col3 col4 col5 col6 col7 col8 ┌───────────────────────────────────────────────────────────────────────── 1 │ missing 1 1.0 1.0 one 2019-01-01 2019-01-01T00:00:00 true 2 │ missing 2 2.0 2.0 two 2019-01-02 2019-01-02T00:00:00 false 3 │ missing 3 3.0 3.14 three 2019-01-03 2019-01-03T00:00:00 true