We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
having trouble with the ST_funs for SQLITE dialect ...
library(xml2) schema <- read_xml("https://raw.githubusercontent.com/OSGeo/gdal/master/data/ogrvrt.xsd") xml <- xml_new_root("OGRVRTDataSource") xml_add_child(xml, "OGRVRTLayer", name = "CGAZ_query") xml_add_child(tail(xml_children(xml), 1), "SrcDataSource", sds::CGAZ()) #xml_add_child(tail(xml_children(xml), 1), "SrcSQL", "SELECT ST_Simplify(geometry) FROM geoBoundariesCGAZ_ADM0 WHERE shapeGroup IN ('AUS')", dialect = "SQLITE") #xml_add_child(tail(xml_children(xml), 1), "SrcSQL", "SELECT ST_Centroid(ogr_geocode('Paris'))", dialect = "SQLITE") xml_validate(xml, schema) write_xml(xml, con, options = "no_declaration") dsn <- readr::read_file(con) vapour::vapour_read_geometry(dsn)
The text was updated successfully, but these errors were encountered:
bit more of an example with streaming reprojection
'<OGRVRTDataSource> <OGRVRTWarpedLayer> <OGRVRTLayer name="source"> <SrcDataSource>source.shp</SrcDataSource> </OGRVRTLayer> <TargetSRS>EPSG:4326</TargetSRS> </OGRVRTWarpedLayer> </OGRVRTDataSource>' library(xml2) target_crs <- NULL target_crs <- "+proj=laea" schema <- read_xml("https://raw.githubusercontent.com/OSGeo/gdal/master/data/ogrvrt.xsd") xml <- xml_new_root("OGRVRTDataSource") if (!is.null(target_crs)) { xml_add_child(xml, "OGRVRTWarpedLayer") } xml_add_child(tail(xml_children(xml), 1), "OGRVRTLayer", name = "CGAZ_query") xml_add_child(xml_children(xml_children(xml)), "SrcDataSource", sds::CGAZ()) xml_add_child(xml_children(xml_children(xml)), "SrcSQL", "SELECT * FROM geoBoundariesCGAZ_ADM0", dialect = "SQLITE") xml_add_child(tail(xml_children(xml), 1), "TargetSRS", target_crs) xml_validate(xml, schema) write_xml(xml, "/tmp/file.vrt", options = "no_declaration") # # #dsn <- "<OGRVRTDataSource><OGRVRTWarpedLayer><OGRVRTLayer name=\"CGAZ_query\"/><TargetSRS>+proj=laea</TargetSRS><SrcSQL>SELECT * FROM geoBoundariesCGAZ_ADM0 LIMIT 1</SrcSQL></OGRVRTWarpedLayer></OGRVRTDataSource>\n<SrcDataSource>/vsizip//vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/CGAZ/geoBoundariesCGAZ_ADM0.zip</SrcDataSource" dsn <- trimws(readr::read_file("/tmp/file.vrt")) plot(wk::wkb( vapour::vapour_read_geometry("/tmp/file.vrt"))) #
Sorry, something went wrong.
No branches or pull requests
having trouble with the ST_funs for SQLITE dialect ...
The text was updated successfully, but these errors were encountered: