[R-sig-Geo] A Qgis Map Graphics Device for R

Manuel Spínola mspinola10 at gmail.com
Thu Aug 18 14:17:11 CEST 2016


Dear Barry,

How I install the package?

Manuel

2016-08-17 1:40 GMT-06:00 Barry Rowlingson <b.rowlingson at lancaster.ac.uk>:

> Time to announce my little summer side project...
>
> `pqgisr` is a *highly* experimental package to provide an easy way for
> R programmers to use the cartographic features of Qgis without the
> hassle of exporting objects, loading them into Qgis, and then having
> to style them.
>
> The package provides functions for adding map data from SP-class
> objects, OGR, and GDAL data sources as well as basemap tile layers to
> a Qgis map canvas window. Note that a full Qgis application is not
> running - just a map canvas launched from R via python code. The
> canvas is embedded in a small application with a little functionality
> for layer styling, ordering, zooming etc.  This gives you an
> interactive map for exploring spatial data.
>
> In this way I also hope to have a solution for reproducible map
> graphics from R using the Qgis graphics engine. An R script, possibly
> running in a knitr document, can add map data to the canvas, style it
> either via simple R calls or using Qgis XML styling files created
> elsewhere, then save as an image and include in a reproducible
> document. Yes you could do all this via R graphics commands but the
> Qgis map canvas has some features that are not available on R graphics
> devices.
>
> I started this project when I noticed the RQGIS project could have
> been implemented using `rPython`, which embeds a python interpreter
> instance in the R process, instead of launching separate python
> processes every time. As I considered reimplementing RQGIS using
> rPython I realised my time would be better spent doing something that
> couldn't be easily done using the process approach, and worked on
> embedding a Qgis application in R via rPython. This also fit well with
> my usual workflow which is to do all my GIS analysis in R (using rgeos
> etc) but then exporting to Qgis for mapping. That export/import step
> really jarred.
>
> I appreciate the work the RQGIS developers are doing and see `pqgisr`
> as complementary to their approach. Running Qgis `processing`
> algorithms is not on my TODO list for now, I'm concentrating on the
> interactive graphics aspects.
>
> The problem with my dependence on rPython is that there seems to be no
> Windows version at the moment. Oh well.
>
> The code is on gitlab:
>
> https://gitlab.com/b-rowlingson/pqgisr
>
> You'll need some dev skills to get it running, and I'd be interested
> to hear success stories (failure stories less so, I *expect* it to
> fail at this stage!). Documentation is almost non-existent, the README
> is a bit out of date (there's more implemented functionality now), and
> it will crash R if you try initialising Qgis twice. I'm also
> considering changing the API, and a lot of the internals which might
> simplify things and clear out some of the cruft from the earliest
> versions which were mostly hacking at it to make something work.
>
> Suggestions welcome via the project gitlab tracker please!
>
>    https://gitlab.com/b-rowlingson/pqgisr/issues
>
>
> Barry
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola at una.cr <mspinola at una.ac.cr>
mspinola10 at gmail.com
Teléfono: (506) 8706 - 4662
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list