Open jorisvandenbossche opened 2 years ago
Yes, that is possible to check for a specific version: https://proj.org/development/reference/datatypes.html#c.PJ_GUESSED_WKT_DIALECT
Another alternative could be to add a new function that returns the WKT version.
Thoughts on adding a new method called something like guess_wkt_version
that returns the WktVersion or None if it is not a WKT?
There is a
is_wkt
function that allows you to check if a given string is a WKT string:https://github.com/pyproj4/pyproj/blob/2d3cc7e0b83f59df2c0f5d3c2a8446ce0f224700/pyproj/_crs.pyx#L32-L48
The
proj
method it is using for that (proj_context_guess_wkt_dialect
) should also allow to check for an exact flavor. So there could be an optionalversion
keyword, to allow something likeis_wkt(..., version="WKT2_2019")
?