Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
cd23611
feat(vector): warn when GDAL FID column is virtual
jimbrig Jun 30, 2026
d28e75b
feat(vector): add schema specification and transformation pipeline
jimbrig Jun 30, 2026
0c2da70
feat(cli): Add utilities for rendering structured data
jimbrig Jun 30, 2026
946f316
feat: add utility to read .Renviron files
jimbrig Jun 30, 2026
ae8c00f
feat(cli): integrate custom inline styles into global theme
jimbrig Jun 30, 2026
b17c0d4
feat(gpq): add comprehensive metadata introspection
jimbrig Jun 30, 2026
507163b
tests(gpq): add comprehensive tests for metadata introspection
jimbrig Jun 30, 2026
de91c73
feat: add GDAL vector schema transformation and GeoParquet introspect…
jimbrig Jun 30, 2026
eac241c
feat(data): add Atlanta sample geospatial data
jimbrig Jun 30, 2026
4b20a29
config(config): add 'context/' to gitignore
jimbrig Jun 30, 2026
361ba1a
feat(gpq): improve GeoParquet CRS resolution
jimbrig Jun 30, 2026
7e5d7ea
feat(cli): improve output legibility and theme application
jimbrig Jun 30, 2026
fec847b
Update R/gdal_vector.R
jimbrig Jun 30, 2026
99b1455
refactor(gdal-vector-schema)!: remove vector schema transformation ut…
jimbrig Jun 30, 2026
c5b79b7
refactor(utils)!: improve 64-bit integer decoding and remove blank pr…
jimbrig Jun 30, 2026
8c4ef37
refactor(cli): Refactor output formatting and theme application
jimbrig Jun 30, 2026
ad153b9
refactor(gpq_meta)!: refactor GeoParquet schema inspection and remove…
jimbrig Jun 30, 2026
84a0c57
tests(gpq_meta): Improve print() method invisibility and output tests
jimbrig Jun 30, 2026
27b2a8d
refactor(gdal-vector): improve FID column reporting and messaging
jimbrig Jun 30, 2026
66a5988
docs(gdal-vector): correct grammar in FID column informational message
jimbrig Jun 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cursor/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
mcp.env
context/
context/**
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Imports:
gpkg,
httr2,
jsonvalidate,
nanoparquet,
openssl,
processx,
ps,
Expand Down
33 changes: 33 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ S3method(as_gdalg,list)
S3method(c,gdal_opts)
S3method(format,gdal_opts)
S3method(format,gdalg)
S3method(format,gpq_file_info)
S3method(format,gpq_geo_metadata)
S3method(format,gpq_inspect)
S3method(format,gpq_row_groups)
S3method(format,gpq_schema_info)
S3method(print,gdal_opts)
S3method(print,gdalg)
S3method(print,gpq_file_info)
S3method(print,gpq_geo_metadata)
S3method(print,gpq_inspect)
S3method(print,gpq_row_groups)
S3method(print,gpq_schema_info)
export(as_config_option)
export(as_gdal_args)
export(as_gdal_config_opts)
Expand Down Expand Up @@ -89,11 +99,18 @@ export(gpkg_creation_opts)
export(gpkg_open_opts)
export(gpkg_prelude_pragmas)
export(gpq_creation_opts)
export(gpq_file_info)
export(gpq_geo_metadata)
export(gpq_inspect)
export(gpq_open_opts)
export(gpq_row_groups)
export(gpq_schema)
export(gpq_schema_info)
export(is_vsi_path)
export(local_hash)
export(local_last_modified)
export(ping)
export(read_renviron)
export(remote_download)
export(remote_exists)
export(remote_hash)
Expand Down Expand Up @@ -135,7 +152,13 @@ importFrom(cli,cli_alert_danger)
importFrom(cli,cli_alert_info)
importFrom(cli,cli_alert_success)
importFrom(cli,cli_alert_warning)
importFrom(cli,cli_bullets)
importFrom(cli,cli_div)
importFrom(cli,cli_end)
importFrom(cli,cli_fmt)
importFrom(cli,cli_inform)
importFrom(cli,cli_text)
importFrom(cli,cli_verbatim)
importFrom(cli,cli_warn)
importFrom(crayon,bold)
importFrom(crayon,cyan)
Expand All @@ -145,8 +168,11 @@ importFrom(crayon,yellow)
importFrom(dplyr,bind_rows)
importFrom(dplyr,filter)
importFrom(dplyr,filter_out)
importFrom(dplyr,first)
importFrom(dplyr,group_by)
importFrom(dplyr,mutate)
importFrom(dplyr,replace_values)
importFrom(dplyr,summarise)
importFrom(gdalraster,get_num_cpus)
importFrom(gdalraster,get_usable_physical_ram)
importFrom(gdalraster,vsi_stat_size)
Expand All @@ -159,12 +185,17 @@ importFrom(httr2,resp_check_status)
importFrom(httr2,resp_headers)
importFrom(httr2,resp_is_error)
importFrom(httr2,resp_status)
importFrom(nanoparquet,read_parquet_info)
importFrom(nanoparquet,read_parquet_metadata)
importFrom(nanoparquet,read_parquet_schema)
importFrom(openssl,md5)
importFrom(openssl,sha1)
importFrom(openssl,sha256)
importFrom(openssl,sha512)
importFrom(ps,errno)
importFrom(purrr,discard)
importFrom(purrr,map2)
importFrom(purrr,map_chr)
importFrom(purrr,map_dfr)
importFrom(purrr,pluck)
importFrom(rlang,.data)
Expand Down Expand Up @@ -226,6 +257,7 @@ importFrom(stringr,str_trim)
importFrom(tibble,add_column)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(utils,capture.output)
importFrom(utils,globalVariables)
importFrom(utils,modifyList)
importFrom(utils,packageVersion)
Expand All @@ -240,3 +272,4 @@ importFrom(yyjsonr,opts_read_json)
importFrom(yyjsonr,opts_write_json)
importFrom(yyjsonr,read_json_file)
importFrom(yyjsonr,read_json_str)
importFrom(yyjsonr,write_json_str)
17 changes: 16 additions & 1 deletion R/gdal_vector.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,22 @@ gdal_vector_layer_geom_col_type <- function(dsn, layer = gdal_vector_layer(dsn),
gdal_vector_layer_fid_col <- function(dsn, layer = gdal_vector_layer(dsn), ...) {
vec <- gdal_vector_open(dsn = dsn, layer = layer, ...)
withr::defer(vec$close())
vec$getFIDColumn()
fields <- vec$getFieldNames()
gdal_fid_col <- vec$getFIDColumn()
if (!nzchar(gdal_fid_col)) {
gdal_fid_col <- '""'
}
if (!(gdal_fid_col %in% fields)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The FID column reported by GDAL can be an empty string "" for layers/drivers that do not have a FID column. Without checking nzchar(gdal_fid_col), this warning will be printed incorrectly for almost all non-FID layers. Adding a check for nzchar(gdal_fid_col) avoids this noisy and confusing warning.

  if (nzchar(gdal_fid_col) && !(gdal_fid_col %in% fields)) {

gdal_inform(
c(
"!" = "FID column reported by GDAL ({.field {gdal_fid_col}}) is not an actual field in the layer {.field {layer}}.",
"i" = "This is common for some drivers (e.g., GeoPackage) where the FID is a virtual column and not stored as a field.",
"i" = "Consider using {.field 'CAST(rowid AS INTEGER) AS source_fid'} in SQL performed against the layer to get the FID used by GDAL as an attribute field"
),
cls = "gdal_fid_col_inform"
)
}
return(gdal_fid_col)
}

# feature count ---------------------------------------------------------------------------------------------------
Expand Down
Loading
Loading