Git Product home page Git Product logo

rdf-geopackage's People

Contributors

redmer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

rdf-geopackage's Issues

Provide more tests

There are few tests provided. Write more tests that check model output, etc.

Explore how to reduce `@ngageoint/geopackage` dependency

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:

  • how to read the SQLite db
  • how to read the geometry columns
  • how to read the geometry SRS and definition

WGS84 is the only CRS supported at output

This is due to GeoJSON, that defaults to WGS84. The GeoJSON iterator used for feature tables is GeoPackage#iterateGeoJSONFeatures() in

const it = geopackage.iterateGeoJSONFeatures(tableName, boundingBox);

Changes there would also require refactoring of

/** Generate GeoSPARQL quads from a feature's geometry */
export function* quadsForGeometry(
geometry: Geometry,
subject: RDF.Quad_Subject,
graph: RDF.Quad_Graph,
) {
const geo = DF.blankNode();
yield DF.quad(subject, RDFNS("type"), GEO("Feature"), graph);
yield DF.quad(subject, GEO("hasDefaultGeometry"), geo, graph);
yield DF.quad(geo, RDFNS("type"), GEO("Geometry"), graph);
yield DF.quad(
geo,
GEO("asGeoJSON"),
DF.literal(stringify(geometry), GEO("geoJSONLiteral")),
graph,
);
yield DF.quad(
geo,
GEO("asWKT"),
DF.literal(sfWKTFromGeoJSONGeometry(geometry), GEO("wktLiteral")),
graph,
);
}

TypeError: Failed to parse URL from sql-wasm.wasm

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

Triple formats are not well formed

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.

Not all geometry types can be serialized as WKT

 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

// The underlying libraries (as of writing) do not support all
// types of geometries. {geoJSONData} and {origData.geometry}
// can therefore be empty.
if (data.geometry === undefined || data.geometryError)
return CountWarn(
`Table "${options.tableName}": "${data.geometryError}"; skipped`,
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.