cont-limno / lagosusgis Goto Github PK
View Code? Open in Web Editor NEWExtra functions to interact with the GIS module of LAGOSUS
Home Page: https://jsta.github.io/LAGOSUSgis
Extra functions to interact with the GIS module of LAGOSUS
Home Page: https://jsta.github.io/LAGOSUSgis
file <- "list_locality_postcode_meander_valley.tab"
mvfile <- system.file(file.path("extdata/tab", file), package="vapour")
## doesn't need names, they aren't used
## order is assumed
e <- c(xmin = 469750, xmax = 500840,
ymin = 5381892, ymax = 5393322)
library(vapour)
## no change
length(vapour_read_geometry(mvfile, extent = e))
#> [1] 58
## needs sql to be run as well
g <- vapour_read_geometry(mvfile, extent = e, sql = "SELECT * FROM list_locality_postcode_meander_valley")
length(g) ## 9, they intersect the bounding box / extent
#> [1] 9
## compare with sf plot
library(sf)
#> Linking to GEOS 3.6.2, GDAL 2.3.2, PROJ 4.9.3
x <- sf::read_sf(mvfile)
plot(x[1], reset = F)
plot(sf::st_cast(sf::st_as_sfc(g)), add = TRUE, lwd =5)
rect(e[1], e[3], e[2], e[4])
Recent commit doesn't catch path expansion errors on ~
.
incorrect number of dimensions
Per the vapour
docs, the extent
argument applies:
an arbitrary extent, only when 'sql' used
ll_poly <- LAGOSUSgis::query_gis("LAGOS_US_All_Lakes_1ha", "lagoslakeid", 7922)
Warning message:
In vapour_read_attributes_cpp(dsource = dsource, layer = layer, :
GDAL Message 1: organizePolygons() received a polygon with more than 100 parts. The processing may be really slow. You can skip the processing by setting METHOD=SKIP, or only make it analyze counter-clock wise parts by setting METHOD=ONLY_CCW if you can assume that the outline of holes is counter-clock wise defined
It is recommended that functions in a package are not memoised at build-time,
but when the package is loaded. The simplest way to do this is within
\code{.onLoad()} with, for example
fun <- function() {
some_expensive_process()
zzz.R
.onLoad <- function(libname, pkgname) {
fun <<- memoise::memoise(fun)
}
start_time <- Sys.time()
test <- LAGOSUSgis::query_gis("LAGOS_US_All_Lakes_1ha", "lagoslakeid", 10)
start_time - Sys.time()
Should finish in under a second not > 30 seconds!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.