[R-sig-Geo] Annoucing the R Shapefile Contest

Michael Sumner mdsumner at gmail.com
Fri Jul 15 11:33:57 CEST 2016


On Fri, Jul 15, 2016, 19:07 Rainer M Krug <Rainer at krugs.de> wrote:

> "Bacou, Melanie" <mel at mbacou.com> writes:
>
> > Just chiming in, but I don't see any reason for wrapping `readOGR()` and
> > `writeOGR()`.
>
> readability and simplicity for the user - for advanced users (which
> understand that dsn can mean many different things and have no problem
> with different drivers), writeOGR is perfect because of it's
> flexibility. For the beginner, writeOGR is difficult to use (own
> experience) because of it's flexibility.
>
> > For the sake of code portability and readability, the fact
> > that these 2 functions work for a myriad of vector-based GIS formats is
> > a great thing.
>
> I agree.
>
> > You can skip naming parameters to save typing if that's
> > an issue:
> >
> > readOGR("my_folder", "cities")
> > writeOGR(cities, "my_folder", "cities", "GPKG")
> > writeOGR(cities, "my_folder", "cities", "ESRI Shapefile")
>
> Skipping naming parameters is, my personal opinion, a bad idea as it
> makes code much less readable. If I am not using a command for some time,
> I have to look up what the parameter mean.
>
> >
> > Also contrary to others I see a benefit to saving an object's geometry
> > and attributes in 2 separate files, can save I/O operations.



It is easy to read the attributes from Geopackage with standard SQLite
(dplyr provides further simplification too).

FWIW, all the tables are transparently available, though the geometry is
packed as WKB.

Cheers, Mike

Anyone who
> > works with GeoJSON files knows these can also become very large and
> > cumbersome. The main problem with shapefiles is the DBF specification
> > that's a little outdated.
> >
> > --Mel.
> >
> >
> > On 7/15/2016 4:32 AM, Rainer M Krug wrote:
> >> stachel2 at msu.edu writes:
> >>
> >>> I wrote a **very** elementary blog post showing how to use the
> >>> GeoPackage format with R:
> >>> http://jsta.github.io/2016/07/14/geopackage-r.html
> >>>
> >> This is nice - thanks.
> >>
> >> One general problem I see in =contrast to the shape file is it's
> >> simplicity for writing and reading in GeoPackage format: you need the
> >> swiss army knife package rgdal. This works perfectly, don't get me
> >> wrong, but from the user perspective it is much easier to use one
> >> command without having to specify dsn and driver, as you can do with
> >> shapefiles (e.g. in the package maptools).
> >>
> >> It would be great if there would be a wrapper package around rgdal to
> >> make the usage of GeoPackage easier. It shouldn't be to difficult just
> >> to put the basic functions into a package (writeGPG(), readGPG(), ...).
> >>
> >> I just created a github (https://github.com/rkrug/rGeoPackage) wherer
> >> ideas can be collected for this package.
> >>
> >> Please join in and post suggestions for functions and functionality
> >> here or on the github page - I won't have much time before end of
> August.
> >>
> >> Cheers,
> >>
> >> Rainer
> >>
> >>
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> R-sig-Geo at r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
> >
> >       [[alternative HTML version deleted]]
>
> --
> Rainer M. Krug
> email: Rainer<at>krugs<dot>de
> PGP: 0x0F52F982
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list