redmer / rdf-geopackage Goto Github PK
View Code? Open in Web Editor NEWGenerate RDF out of a GeoPackage
Home Page: https://rdmr.eu/2023/rdf-geopackage/
License: Mozilla Public License 2.0
Generate RDF out of a GeoPackage
Home Page: https://rdmr.eu/2023/rdf-geopackage/
License: Mozilla Public License 2.0
Output data enumerates from from rdf:_0
, but rdf:_1
should be the first item in an ordered RDF collection.
According to http://www.geopackage.org/spec/#table_column_data_types, GeoPackage columns can be typed with i.a. Booleans and DateTimes. In the RDF output, they are just output as the underlying SQLite data types (integer and text).
valueToTerm()
http://www.opengis.net/def/crs/${organization.toUpperCase()}/0/${id}
is now used. Is in all cases correct? Or could a correct GeoPackage provide incorrect organization
and organization_coordsys_id
?
There are few tests provided. Write more tests that check model output, etc.
Besides the console.log
debugging comments coming from the package, it has a lot of dependencies too: 21 direct, 178 transitive.
Explore how to implement this in a tinier package:
This is due to GeoJSON, that defaults to WGS84. The GeoJSON iterator used for feature tables is GeoPackage#iterateGeoJSONFeatures()
in
Changes there would also require refactoring of
rdf-geopackage/src/models/facade-x/rdf-feature-table.ts
Lines 26 to 50 in 3db8ab0
Features appear off by some 180 m. Investigate whether this is due to an issue in the rdf-geopackage
code or if it's an issue upstream with GeoPackage or Proj4Jjs.
The current v1 parameter is a bit ideosyncratic, with its space separated values, not using abbreviated bbox.
Proposal:
--bbox
, rename --bounding-box-crs
to --bbox-crs
.This is expected to be a breaking change? Or allow both types of values.
When loading a 180 MB GeoPackage file, too many RDF.Quad
s are generated in a non-streaming fashion.
First priority, enable some limits on the Quad generation.
Secondly, work out how RDF.Stream works.
Should the default geometry be specific for (1) and (2) separately or be combined into one, as they aren't materially different.
The "perhaps" in 6.4.2 implies that they should be two different geometries iff the table SRS is not WGS84.
When executing rdf-geopackage on Windows (Node v18.17.1), an error prohibits execution.
$ rdf-geopackage -i .\Selectie_Wallengebied_Small.gpkg
Unable to register SqliteAdapter. The better-sqlite3 module was not found. Falling back to SqljsAdapter.
C:\Users\...\AppData\Roaming\npm\node_modules\@rdmr-eu\rdf-geopackage\node_modules\@ngageoint\geopackage\dist\canvaskit\canvaskit.js:1513
throw a;
^
TypeError: Failed to parse URL from sql-wasm.wasm
at Object.fetch (node:internal/deps/undici/undici:11576:11) {
[cause]: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:405:5)
at new URL (node:internal/url:611:13)
at new Request (node:internal/deps/undici/undici:7132:25)
at fetch2 (node:internal/deps/undici/undici:10715:25)
at Object.fetch (node:internal/deps/undici/undici:11574:18)
at fetch (node:internal/process/pre_execution:229:25)
at C:\Users\...\AppData\Roaming\npm\node_modules\@rdmr-eu\rdf-geopackage\node_modules\rtree-sql.js\dist\sql-wasm.js:158:271
at C:\Users\...\AppData\Roaming\npm\node_modules\@rdmr-eu\rdf-geopackage\node_modules\rtree-sql.js\dist\sql-wasm.js:158:492
at C:\Users\...\AppData\Roaming\npm\node_modules\@rdmr-eu\rdf-geopackage\node_modules\rtree-sql.js\dist\sql-wasm.js:158:505
at new Promise (<anonymous>) {
input: 'sql-wasm.wasm',
code: 'ERR_INVALID_URL'
}
}
Node.js v18.17.1
When writing to e.g. Turtle, the CLI options parsers recognizes that it is text/turtle.
The N3 StreamWriter however still outputs graph information, whereas this should have been filtered.
Warning: Table "non_linear_geometries": "GeometryType 8 not supported"; skipped: 1
Warning: Table "non_linear_geometries": "GeometryType 9 not supported"; skipped: 2
Warning: Table "non_linear_geometries": "GeometryType 10 not supported"; skipped: 2
Warning: Table "non_linear_geometries": "GeometryType 11 not supported"; skipped: 1
rdf-geopackage/src/models/facade-x/facade-x.ts
Lines 125 to 132 in e6089d7
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.