gdal vector reproject: add --like, --like-layer#14935
Conversation
| .AddHiddenAlias("t_srs"); | ||
| .AddHiddenAlias("t_srs") | ||
| .SetMutualExclusionGroup("output-crs"); | ||
| AddArg("like", 0, _("Dataset from which an output CRS should be extracted"), |
There was a problem hiding this comment.
I'm wondering if there isn't a risk of inconsistency, given that in clip the like dataset is used for bounds.
Do we really want only the crs, and not crs+extent ?
If only crs, not to sure about an alternative naming. like-crs could imply that we specify a CRS name as a value. crs-like ? Not too convinced
There was a problem hiding this comment.
I'd say that in "clip", only the extent should be taken from --like, and in "reproject", only the CRS should be taken from --like. If we want to reproject and clip, we should use two pipeline steps.
There was a problem hiding this comment.
maybe @jratike80 has some thoughts about that?
For the sake of brainstorming, another alternative could be to make --dst-crs accept a dataset name, although that could be messy, especially for autocompletion purposes
There was a problem hiding this comment.
another alternative could be to make --dst-crs accept a dataset name
You could use the @filename syntax used elsewhere, though I think it's less clear/discoverable than a separate argument.
Includes motivating example from
gdal raster zonal-stats.