Releases: yeesian/ArchGDAL.jl
v0.5.0
ArchGDAL v0.5.0
Merged pull requests:
- RFC: Implementation of DiskArray interface (#105) (@meggart)
- Delete Require file in test folder (#133) (@felixcremer)
v0.4.1
ArchGDAL v0.4.1
Closed issues:
- Argument type specifications in rasterio.jl too narrow (#126)
Merged pull requests:
- Remove type specification from indices argument in rasterio.jl (#128) (@AlfTetzlaff)
v0.4.0
ArchGDAL v0.4.0
Merged pull requests:
v0.3.3
ArchGDAL v0.3.3
Closed issues:
- getindex methods for Dataset (#91)
- Use generalised
convert
,transform
,import
and similar methods instead of customfromWKT
etc methods (#95) - Opening of ENVI stack with long line in header fails (#111)
- ArchGDAL.getproj(dataset) return empty string, while dataset.GetProjection() retrun string "PROJCS[...]" using gdal in python (#116)
- importEPSG and importEPSGA both swap axis order to lat/lon (#119)
- Travis CI not running on PRs? (#122)
- Raster writing via ArchGDAL.copy suddenly broken? (#123)
Merged pull requests:
- Add a kwarg to set OSRAxisMappingStrategy (#120) (@rafaqz)
- Decreasing test size (#121) (@pritamd47)
v0.3.2
v0.3.1
interactive REPL usage
this is a breaking release
Features
- removes the need to register drivers before usage.
- introduces "interactive datasets" (IDataset) that does not need to be contained within a do-block. This makes it much easier to play with datasets interactively, rather than having to enclose everything within a do-block.
- gives featurelayers "first-class treatment": they can now be created and copied as "floating" objects (via
createlayer()
andcopy(featurelayer)
), independently of the choice of a dataset. For floating featurelayers, a corresponding dataset will be created in memory.
Includes the latest GDAL 3.0.2 via JuliaGeo/GDAL.jl#81 with cURL and GEOS drivers
Changelog (see also #76)
new
- src/types.jl: introduce
IDataset
(short for "interactive datasets") which has a finalizer that closes the corresponding file when it goes out of scope. This is in contrast toDataset
which exists only within the scope of a do-block. They both fall under the type hierarchyDataset <: AbstractDataset
andIDataset <: AbstractDataset
.
- src/types.jl: introduce
FeatureDefn, IFeatureDefnView <: AbstractFeatureDefn
- src/types.jl: introduce
GeomFieldDefn, IGeomFieldDefnView <: AbstractGeomFieldDefn
- src/types.jl: introduce
FieldDefn, IFieldDefnView <: AbstractGeomFieldDefn
- src/types.jl:
IFeatureDefnView
,IFieldDefnView
andIGeomFieldDefnView
are introduced to model internal references to existing objects. They support only a restricted set of operations. - src/types.jl: enable more flags
unsafe_
methods will return objects that needs to be cleaned up, and are not meant to be used by users.- tests: use
/vsimem/
instead of creating tmp folders and files, and update for new dataset APIs - src/featurelayer.jl: introduce
nfield(featurelayer)
andngeom(featurelayer)
different
Now getspatialref(...)
, getgeom(...)
, and getspatialfilter(...)
always makes a copy of the object.
breaking
fromWKT(data)
andfromWKB(data)
no longer takes in aspatialref
argument.
call signatures
createlayer(dataset, name)
->createlayer(name = name, dataset = dataset)
create(filename, driver)
->create(filename, driver = driver)
orcreate(driver, filename = filename)
colortable = getcolortable(band)
->getcolortable(band) do colortable
copywholeraster(source, dest, options)
->copywholeraster(source, dest, options = options)
transform!(coordtransform, xs, ys, zs)
->transform!(xs, ys, zs, coordtransform)
(for consistency withtransform!(geom, coordtransform)
)
renamed
registerdrivers(...)
->environment(...)
. It is no longer required for file io, since we provide a driver manager that registers all the drivers during module initialization.setattr!(spatialref, path)
->setattrvalue!(spatialref, path)
(consistent withsetattrvalue!(spatialref, path, value)
)copylayer(dataset, layer, name)
->copy(layer, name = name, dataset = dataset)
(layer
is implied)createcopy(dataset, filename, driver)
->copy(dataset, filename = filename, driver = driver)
(create
is implied)
The name geomfield
sounded too long and confusing (is it a geom? or a field?), so I've decided to rename it to just geom
:
deletegeomfielddefn!(featuredefn, i)
->deletegeomdefn!(featuredefn, i)
gfd = creategeomfielddefn(...)
->creategeomdefn(...) do gfd
getgeomfielddefn(...)
->getgeomdefn(...)
getgeomfield(...)
->getgeom(...)
setgeomfield!(...)
->setgeom!(...)
ngeomfield(...)
->ngeom(...)
Standardize on get/add|fielddefn/geomdefn/feature
:
addgeomfielddefn!(featuredefn, geomdefn)
->addgeomdefn!(featuredefn, geomdefn)
creategeomfield!(layer, geomdefn)
->addgeomdefn!(layer, geomdefn)
createfield!(layer, fielddefn)
->addfielddefn!(layer, fielddefn)
createfeature!(layer, feature)
->addfeature!(layer, feature)
Some method names are too generic-sounding, so I've lengthened them to be clearer.
find(...)
->findstylestring(...)
Too many methods were being called get<methodname>
without any unifying reason. I've decided to try and rename methods such that all remaining methods that start with get
suggests a method corresponding to a modifier (such as add
, set
, etc).
getblocksize(rasterband)
->blocksize(rasterband)
getdatatype(rasterband)
->pixeltype(rasterband)
getaccess(rasterband)
->accessflag(rasterband)
getnumber(rasterband)
->indexof(rasterband)
getmaskflags(rasterband)
->maskflags(rasterband)
getmaximum(rasterband)
->maximum(rasterband)
getminimum(rasterband)
->minimum(rasterband)
getfidcolname(layer)
->fidcolumnname(layer)
getgeomcolname(layer)
->geomcolumnname(layer)
getlayerdefn(layer)
->layerdefn(layer)
getcurvegeom(geom)
->curvegeom(geom)
getlineargeom(geom)
->lineargeom(geom)
getdim(geom)
->geomdim(geom)
getgeomname(geom)
->geomname(geom)
getpaletteinterp(colortable)
->paletteinterp(colortable)
getsampleoverview(...)
->sampleoverview(...)
getrgba(...)
->toRGBA(...)
getextent(...)
->envelope(...)
getenvelope(geom)
->envelope(geom)
getenvelope3d(geom)
->envelope3d(geom)
getcolumnname(...)
->columnname(...)
getcolumnusage(...)
->columnusage(...)
getcolumntype(...)
->columntype(...)
Some of the index methods are now prefixed with find
to be suggestive of what is actually happening.
getrowindex(rat, pxvalue)
->findrowindex(rat, pxvalue)
getcolumnindex(...)
->findcolumnindex(...)
getfieldindex(...)
->findfieldindex(...)
getgeomfieldindex(...)
->findgeomindex(...)
At the end of it all, we have
julia> AG.get
getattrvalue getdefaultRAT getgeotransform! getoverview getsubtype
getband getdriver getjustify getpart getthreadconfigoption
getcategorynames getfeature getlayer getpoint gettype
getcolorentry getfeaturedefn getlinearbinning getpoint! getunit
getcolorentryasrgb getfid getmaskband getprecision getunittype
getcolorinterp getfield getmediatype getproj getwidth
getcolortable getfielddefn getname getscale getx
getconfigoption getgeom getnativedata getspatialfilter gety
getcoorddim getgeomdefn getnodatavalue getspatialref getz
getdataset getgeomtype getnonlineargeomflag getstylestring
getdefault getgeotransform getoffset getstyletable
julia> AG.set
setattributefilter! setfeature! setjustify! setparam! setstyleignored!
setattrvalue! setfid! setlinearbinning! setparams! setstylestring!
setcategorynames! setfield! setmediatype! setpoint! setstyletable!
setcolorentry! setfrom! setname! setpointcount! setsubtype!
setcolorinterp! setgeom! setnativedata! setprecision! setthreadconfigoption
setcolortable! setgeomignored! setnextbyindex! setproj! settype!
setconfigoption setgeomtype! setnodatavalue! setrowcount! setunit!
setcoorddim! setgeotransform! setnonlineargeomflag! setscale! setunittype!
setdefault! setignored! setnullable! setspatialfilter! setvalue!
setdefaultRAT! setignoredfields! setoffset! setspatialref! setwidth!
julia> AG.add
addfeature addfielddefn addgeom! addpart! addstyle!
addfeature! addfielddefn! addgeomdefn! addpoint!
which feels a lot more reasonable.
dropped
getfeaturesread(layer)
: not all drivers seem to update this count properly, and advanced users can callGDAL.getfeaturesread(layer.ptr)
starttransaction(layer)
: advanced users can callGDAL.starttransaction(layer.ptr)
rollbacktransaction(layer)
: advanced users can callGDAL.rollbacktransaction(layer.ptr)
committransaction(layer)
: advanced users can callGDAL.committransaction(layer.ptr)
synctodisk!(layer)
: advanced users can callGDAL.synctodisk(layer.ptr)
flushcache!(rasterband)
: advanced users can callGDAL.flushrastercache(rasterband.ptr)
setstyletabledirectly!(feature, styletable)
: usesetstyletable!(feature, styletable)
instead. advanced users can callGDAL.setstyletabledirectly(feature.ptr, styletable.ptr)
.setgeomdirectly!(feature[, i], geom)
: usesetgeom!(feature[, i], geom)
instead. advanced users can callGDAL.setgeometrydirectly(feature.ptr[, i], geom.ptr)
.addgeomdirectly!(geom1, geom1)
: usepush!(geom1, geom2)
instead. advanced users can callGDAL.addgeometrydirectly(geom1.ptr, geom2.ptr)
.setspatialref!(geom, spatialref)
andtransform!(geom, spatialref)
: rather than doingsetspatialref!(geom, spatialref1); transform!(geom, spatialref2)
, docreatecoordtrans(spatialref1, spatialref2) do coordtransform; transform!(geom, coordtransform) end
instead. advanced users can callGDAL.assignspatialreference(geom.ptr, spatialref.ptr)
andGDAL.transformto(geom.ptr, spatialref.ptr)
instead.
v0.2.2
v0.2.1
ArchGDAL v0.2.0
add feature count test