Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCRAN plan #4
CRAN plan #4
Comments
|
I really like this minimal structure and think it should be largely maintained as is, so these are just a couple of thoughts as minor modifications:
|
|
rhub checks
|
|
@mpadge btw totally with you on these points, now much more capable of applying them too - when I can get to it! Appreciate them as always |
|
Winbuild checks
|
|
See here for |
|
Oh sweet, thanks! It's actually typo as well in "RGDALSQL", though - fixed now |
|
roaming TODO
|
|
@mpadge no code but I just re-read your "only returns names" note above, and it's quite like the FID thing, OGRSQL uses 1 or 0 for the special FID virtual column, depending on the driver - but the OSM driver gives a literally arbitrary FID, the actual entity ID. So, good idea - we just have a The danger is mapping that set to the data source which might have changed the FIDS (surely not the named-FIDS), but I think that's a clear "not vapour's problem" situation - maybe there's a way to specify "this really is a name" that GDAL can guarantee, but I doubt it works outside of named sources (like OSM). (Is there really no name, generally? Is that what's ultimately broken in GIS, yes ...) |
|
Regarding the "return by name" function, this works: file <- "list_locality_postcode_meander_valley.tab"
mvfile <- system.file(file.path("extdata/tab", file), package="vapour")
vapour_read_attributes(mvfile, sql = "SELECT POSTCODE FROM list_locality_postcode_meander_valley WHERE FID IN (1, 23, 45)")Where those FID names can be gotten with vapour_read_names(mvfile)I'm a bit reluctant to wrap this here because it means another level over the source, layer, sql, format, attributes, extent - and that might mean a redesign is needed, but it can be achieved now with just R and strings so seems to be enough. It does work with OSM, but I haven't explored real sources extensively Obviously this might be a problem for a very long list of names! osmfile <- system.file("extdata/osm/myosmfile.osm", package = "vapour")
vapour_read_attributes(osmfile,
sql = sprintf("SELECT * FROM %s WHERE FID IN (%s)",
vapour_layer_names(osmfile)[1L],
paste(vapour_read_names(osmfile), collapse = ",")))
@mpadge I'm pretty sure this will suit, but in case you have concerns. |
|
I'm happy that all the above is covered now, but it's still worth re-reading the comments for details of what else to do. We def want before CRAN
We maybe want
|
|
I'm cool with this now, will play around for a while and push to CRAN some time soon. |
I think we've learnt enough to put out a bare bones release. The key C++ functionality to wrap is these, either as slightly overlapping implementations or as building blocks:
Focus on just these features as a minimal core since we can build higher-level collections and descriptions of multiple data sources from these components
These functions
vapour_read_attributes- a list of column vectorsvapour_read_geometry- a list of native blobsvapour_read_geometry_text- a vector of JSON, WKT, KML, or GMLvapour_read_extent- a list of extent vectorsEach function is standalone, opening and closing the data source, defaulting to the 0-th layer and only accepting a layer index, optionally executing a SQL string, and ignoring the layer index if sql is given.