[R-sig-Geo] rpostgis announcement
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Fri Sep 2 11:38:32 CEST 2016
On 30/08/16 17:25, Mathieu Basille wrote:
> Thank you Edzer for the feedback!
>
> We have been watching sfr, and I really look forward to its completion!
>
> Now to answer your question, the choice of using WKT (and WKB from package
> 'wkb' when possible on write, for better performance) was initially driven
> by the fact that Windows binaries for rgdal are not compiled with
> PostgreSQL/PostGIS support, which is a huge problem. Having to deal with a
> class of students (mostly using Windows) trying to make it work was just a
> big mess! :)
Good point - I easily forget this.
>
> In addition, on read, it also allows to subquery the data with any clause
> (WHERE, ORDER BY, LIMIT, etc.), which was still not possible with rgdal
> last time I checked (admittedly a few months ago).
Yes, and in particular the ability to make spatial predicates in select
queries might make it possible to go through really large datasets.
>
> All in all, rgeos::read/writeWKT (and additionally wkb::read/writeWKB)
> gives us the flexibility that we were looking for. Note that we didn't
> check how efficient it was in comparison with rgdal (in terms of performance).
I wrote a little note about performance when reading WKB into R here:
http://r-spatial.org/r/2016/09/01/bm.html
Spoiler: avoiding sp and using C++ might gain you a factor 250 over
wkb::readWKB(). There is a path WKB <-> sf <-> sp that should work, now.
>
> As a side note, having EWKB/EWKT standardized and usable in R (for instance
> through sfr) would be a real plus! In our case, dealing with projection
> information (SRID) was really not straightforward...
It took me some time to figure out the differences between EWKB and
ISO-WKB, but I believe I got it, now, and both are supported (but not
auto-detected).
>
> Best,
> Mathieu.
>
>
> Le 29/08/2016 16:19, Edzer Pebesma a écrit :
>> Nice development!
>>
>> In the simple features for R project, https://github.com/edzer/sfr , I
>> have been writing direct (E)WKB <--> R conversions, and support reading
>> tables with geometry from PostGIS, using sf::st_read_pg(db, table). I
>> was thinking about how to do the writing when your package came!
>>
>> The advantage of the sf package, over sp, is that it supports (will
>> support) all 17 geometry types for 4 dimensions (XY, XYZ, XYM, XYZM).
>>
>> In order to try to gain momentum for this, could you provide a few
>> arguments and/or use cases for which this approach is more useful than
>> readOGR/writeOGR in rgdal?
>>
>> Best regards,
>>
>> On 29/08/16 16:48, David Bucklin wrote:
>>> Dear r-sig-geo list members,
>>>
>>> We'd like to announce the initial CRAN release of 'rpostgis' (v1.0.0),
>>> which facilitates transfer between PostGIS "Geometry" objects (stored in
>>> PostgreSQL databases) and R spatial objects. The package also contains a
>>> variety of convenience functions which are supplemental to the excellent
>>> 'RPostgreSQL' package for interfacing with a PostgreSQL/PostGIS database.
>>>
>>> To install the package:
>>>
>>> install.packages("rpostgis")
>>>
>>> The package main development area can be found on GitHub; any bugs, issues,
>>> or feature requests can be submitted through the "issues" page there:
>>>
>>> https://github.com/mablab/rpostgis
>>
>> I did!
>>
>>>
>>> David
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>
>>
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
Journal of Statistical Software: http://www.jstatsoft.org/
Computers & Geosciences: http://elsevier.com/locate/cageo/
Spatial Statistics Society http://www.spatialstatistics.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20160902/8957a671/attachment.bin>
More information about the R-sig-Geo
mailing list