Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.2 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.2 KB

GDALPolygonize

I need an utility to use GDALPolygonize in R. As far as I know the routine is not implemented in R. At least it does not come with rgdal package.

I made a simple implementation of the C API GDALPolygonize tool. It mimics what python gdal_polygonize.py program does (i.e. it is a wraper for gdal/alg/polygonize.cpp). It has limitations:

  • It does not keep any of the creations options (I omitted the papszOptions argument).
  • The output is always in “ESRI Shapefile” file format.

Windows notes

Migrate to windows was tricky. I used the GDAL version distributed by rwinlib: Static libraries for building R packages on Windows. I borrowed both the Makevars.win file and the tools/winlibs.R from rgdal.

See also

GDAL Github page

GDAL official webpages

rgdal project

rwinlib project

How to install

Install the current development from github via:

remotes::install_github("fcorra/GDALPolygonize")