Package: pydggrid
PyDGGRIDA wrapper for DGGRID in python. Currently based on last DGGRID from Kevin Sahr.Changes0.0.16DGGRID is updated to version 7.3Some bugs fixedRichard Barnes's dglib class is decomposed in order to upgrade DGGRID0.0.15Not releasedDGGRID is updated to version 7.1 (https://github.com/sahrk/DGGRID)RemovedBoostGeometry suppert to useGDALsupport since mainDGGRIDlibrary started to useGDALlibraryAddedVCPKGsupport for windows versionCleaned up setup process0.0.14Added different system build environmentsInstallationNote: The mainDGGRIDlibrary needs 'GDAL' library to compile. so make sure you have installed GDAL C++ library before installing. To installing GDAL on linux is pretty straightforward. For windows you can usevcpkgto compile and install it. The process of installing and usingvcpkgon windows can be found on its github (https://github.com/microsoft/vcpkg/)Install GDAL on linuxsudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update
sudo apt-get update
sudo apt-get install gdal-bin
sudo apt-get install libgdal-devInstall GDAL on windowsPrerequisites:Windows 10, 8.1, 7, Linux, or MacOS
Visual Studio 2015 Update 3 or newer (on Windows)
GitTo get started:> git clone https://github.com/Microsoft/vcpkg.git
> cd vcpkg

PS> .\bootstrap-vcpkg.batthenPS> .\vcpkg integrate installInstall GDAL packages withPS> .\vcpkg install gdal:x64-windows shapelib::x64-windowsNOTE: The GDAL versionmustmatch with your python compiled version. So if you have a x86 python usevcpkg install gdal:x86-windows, othewise usevcpkg install gdal:x64-windowsThen simply use pip to install this librarypip install pydggridBuild From sourceOn Unix (Linux, OS X)install GDAL, shapelibclone this repositorypip install ./pydggridor you can easily callpython setup.py installOn WindowsYou need Build Tools for Visual Studio to be able to compile it from source. so Install it from this linkhttps://visualstudio.microsoft.com/downloads/install GDAL, shapelibclone this repositorypip install ./pydggridor you can easily callpython setup.py installHow To UseIn order to use this library use following example. (more updates are comming on documentations section)#import librarryimportpydggridasm#Construct a dggs objectm.dgconstruct()#getting Q2di index for a (lat,long) pointm.geo_to_q2di(50,50)#[4, 71, 211]#getting Q2dd index for a (lat,long) pointm.geo_to_q2dd(50,50)#[4.0, -0.1427860170187444, 0.7514696738643607]#getting ProjTri index for a (lat,long) pointm.geo_to_projtri(50,50)#[3.0, 0.5793988192307712, 0.4993911549756102]`TODO[ ]Supporting All DGGRID functions[ ]Adding GDAL export Geometry Support[ ]Support GridGeneration using DGGRIDBuilding the documentationDocumentation for the project is generated using Sphinx. Sphinx has the
ability to automatically inspect the signatures and documentation strings in
the extension module to generate beautiful documentation in a variety formats.
The following command generates HTML-based reference documentation; for other
formats please refer to the Sphinx manual:cd pydggrid/docsmake htmlRun testsTo run all tests for the package call folowing command in package directorypython3 -m unittest discoverLicenseBy using, distributing, or contributing to this project, you agree to the
terms and conditions of this license.Based on Kevin Sahr's DGGRID library (https://discreteglobalgrids.org).Developed on top of the R package which was developed by Richard Barnes (https://github.com/r-barnes/dggridR/).