-
Notifications
You must be signed in to change notification settings - Fork 26
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
higher level StringList option alternative like Dict #194
Comments
Definitely. As a proposal: I'm curious what you think of having NamedTuples or keyword args (c.f. #187)? |
Thanks for the extra thoughtfulness here and yeah, at first glance,I think the main requirements I can think of so far are:
|
This would be great, I've had a similar response to @visr a few times trying to work out how to pass options. Keyword arguments feel the most Julian, but a Also consider allowing So commands could be something like: ...; geom_possible_names=(:point, :linestring), keep_geom_columns=false) |
Yes I think keyword arguments would probably be the nicest looking. One thing I wonder about for keywords, does it ever become problematic, them mixing with the existing keywords? Right now we have:
Do we then do this?
Such that the options still end up together in a single variable, and we don't mix them up with the other keyword arguments? |
Echoing #194 (comment), yeah I think all non-option keywords will have to be explicitly spelt out for those functions that accept options as |
Yeah it's probably possible to allow both. |
At several points in GDAL a StringList is expected for options. I somehow always forget what it should look like. Do you think it would be a good idea to accept Dicts or some other key/value datatype there instead?
These kind of options don't feel very julian:
options = ["GEOM_POSSIBLE_NAMES=point,linestring", "KEEP_GEOM_COLUMNS=NO"]
, from https://yeesian.com/ArchGDAL.jl/latest/tables/.Not sure if we discussed this before, though I see an old comment here about taking in Dicts in higher level functions:
JuliaGeo/GDAL.jl#3 (comment)
This kind of came up in evetion/GeoDataFrames.jl#14.
Looking at how rasterio does creation options for instance, there are a lot of these for GeoTIFF:
https://gdal.org/drivers/raster/gtiff.html#creation-options
And can be passed as keyword arguments like this:
https://rasterio.readthedocs.io/en/latest/topics/image_options.html#creation-options
This goes a bit further than
Dict{String, String}
since it lowercases the keys and maps"YES"
to true etc, so we'd have to think if this can be done automatically to prevent the extra maintenance of these option mappings.The text was updated successfully, but these errors were encountered: