Skip to content

Commit

Permalink
handle dyanmic geom names, several geom columns, shapefile reading
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Oct 8, 2024
1 parent bf53055 commit 51d9246
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@ This Rust library uses DuckDB and serves as a data transformation layer in the G

The plan is to have this take in both a file path and a UUID to be used as a table name. Changes will be made to ensure that the library improves its overall functionality:

- Account for when geometry columns have different names - such as "geom", "geometry", or something else!
- Handle cases where data may have several geometry columns, not just 1!
- Handle many different file formats - xlsx, csv, raster data, etc
- Discard rows where there may be errors in the geometry column / ensure the programme doesn't crash when a geometry error is encountered - skip over it and log it instead
2 changes: 1 addition & 1 deletion src/duckdb_load/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl DuckDBFileProcessor {
let query = match self.file_type {
FileType::Geopackage | FileType::Shapefile | FileType::Geojson => {
format!(
"CREATE TABLE data AS SELECT * FROM ST_Read('{}') LIMIT 50;",
"CREATE TABLE data AS SELECT * FROM ST_Read('{}');",
self.file_path
)
}
Expand Down

0 comments on commit 51d9246

Please sign in to comment.