-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
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
ogr2ogr: allow/store dst_datasource_name for output #44
Comments
feat: add env param to config to set global gdal configuration feat: add gdalinfo and ogrinfo apps and add the app results to dataset object fix: raster/vector type calculation fix: prevent app from terminating if a warning occurs fix: support node.js >= 18 chore: update emscripten version to 3.1.50 (temporary disable PDS driver) feat: list all created files with all param in the outputs of ogr2ogr, gdal_translate, gdalwarp, gdal_rasterize #45 feat: add outputName param to ogr2ogr, gdal_translate, gdalwarp, gdal_rasterize #44 fix: mocha issue causing tests not to start for Chrome feat: add playground to test feat: add more info about dataset in gdal3.js gui
Hi @disarticulate, I added the "outputName" param to ogr2ogr, gdal_translate, gdalwarp and gdal_rasterize. Will it work? |
This does appear to work. A follow up question: when the dataset is closed, it still exists. How do we flush the fly? It looks like we need acceess to a Do you want me to open a separate issue? |
So ogr2ogr is generally:
ogr2ogr [options] dst_datasource_name src_datasource_name [layers]
and the current api is:
For certain conversions or operations, a
dst_datasource_name
can be updated with option switches like -append/-overwrite/-update.Current behavior appears to directly create the output name as the input name, which prevents a one to many relationship, particularly when using the
-sql
switch which operates and generates a layer.I'd recommend the following api if it can be mapped easily to the current:
Gdal.ogr2ogr(dataset, options, [output_name])
I think the substantial API dillema is whether that output_name include the /output/* directory prefix but since the return file is the defacto working object, I think just allowing arbitrary output names then returning the location to the dataset fullfills the current contract without breaking how workflow occurs.
The text was updated successfully, but these errors were encountered: