-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
netCDF CF-1.8 Driver Updates - Writing Support, Bug Fix, Streaming etc. #1680
Conversation
…Feature creation yet though
Hey @rouault this PR is now ready for review, when you get some time please check through what I have written here. Thanks! |
|
After looking through the logs, many of the new memory leaks (I daresay, most) actually originate from using the projection setting function "SetProjectionFromVar" (given that I on purpose more or less didn't explicitly use the heap this time, this is not surprising). I'll go look through that in my "Raster by-pass" stuff. The Feature Leaks are from a mistake from trying to fix some of earlier feedback (just one of those "Vim" keystroke errors probably, probably placed the delete in some awkward position). Was not my intent to change that. Also: there's for WGS84 Lat/Lon specifically (and maybe some other projections, not sure) there's this issue of reading a layer with said projection and having the X and Y axes flipped automatically (which, by the way through GDB I found is done after the Feature is already created in GetNextRawFeature() but before the feature is given to the per-feature driver translater. Not sure if there's a builtin way to disable this behavior? EDIT: cppcheck stuff- not sure why that wasn't reference already... made necessary changes for that [done] |
Actually I think I found the answer to the lat/lon v. lon/lat issue:
|
By the way @rouault when is the planned release date of GDAL 3.1? Good to know so I could guage a good time to stop with so much feature updates. UPDATE: Also changed GEOMETRY_ENCODING to a DSCO instead of an LCO to prepare for possible future work and allowing more flexibility in treating the two types of datasets differently. |
…not being the same (partially), LEGACY->GEOMETRY_ENCODING and is not a DSCO instead of a LCO
…(to be removed in later update)
Test failures: https://api.travis-ci.com/v3/job/212166352/log.txt |
So looks like this time's failure was another "CI goes awkwardly MIA" moment on the OS X build according to the logs, so @rouault do you have any other feedback you would like to suggest so I can retrigger a build again? Or if not please retrigger it? Thanks! |
we're probably good to go. Anything remaining on your side for this PR ? |
Hmm, since this PR is getting rather large, I think I'll save further improvements for future PRs. Thanks again @rouault! |
What does this PR do?
This PR is a follow up to the netCDF Reading support PR (#1541). It introduces CF-1.8 simple geometry writing support for the netCDF driver. More specifically it does the following:
grid mapping
attributeWhat about Backwards Compatibility?
Backwards compatibility once again is preserved. However, to enable writing of the legacy WKT styled netCDF files, the dataset creation option LEGACY=WKT must be presented. There is no mixing of WKT and CF-1.8 geometries in writing.
Limitations
For now, due to restrictions present in the legacy driver, only one layer can be translated into netCDF at a time (this applies to the non-legacy options). The legacy option has MULTIPLE_LAYERS, but by default it is disabled. The intent is eventually to get multiple layer support eventually working by default for CF-1.8 datasets with update support, as well as writing multiple layers to the same netCDF file. Work remaining to get multiple layer writing support includes:
Because of this multiple layer writing capabilities will be presented in another PR.
Testing
Unit tests are available in GDAL autotest within netcdf.py. The writing tests are in JSON format and are translated from JSON into NetCDF-3 format. The specific data is present in the following directory.
What are related issues/pull requests?
Issue #1287
PR #1541
Tasklist
Environment