-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add "GDAL" to list of CF-aware software #545
Comments
GDAL supports netcdf -- but I don't know that it has any support for CF itself? As a rule, GDAL doesn't have any opinion about what the data mean. Also, it attempts to interpret all files as a standard data model I.e GIS raster format. Many CF constructs don't fit into that. Please correct me if GDAL has grown CF support since I last looked, which was quite some time ago :-). |
@ChrisBarker-NOAA GDAL has support for Section 7.5 Geometries. I use GDAL and the features in section 7.5 via ogr2ogr to create geojson geometries of where my data are located for searching/visualization on in the browser. I think GDAL is a worthy inclusion in the list of CF aware software. |
Sounds good then. Let's do it. I'm a bit confused about GDAL vs OGR, but they are maintained together, so sure. |
ogr2ogr is just one of the command line tools that comes with gdal: https://gdal.org/en/latest/programs/ogr2ogr.html sorry this confusion. |
Yes, it looks like it's all under the GDAL umbrella. Now someone just needs to write a PR. :-) |
I was also thinking about the "gdal_translate" utility which can copy only subwindows of the input file. So it must somehow understand the geo-referencing of the input file. However I don't know whether this is done via the single CF-attributes or the WKT string. |
I would be willing to create a draft for a PR. However, I've never done that. Thanks! |
Dear @Armin-RS Thanks for your offer! A while ago I wrote a recipe for doing a PR in CF GitHub for someone who wasn't at all familiar with If you or anyone else notice mistakes in the below, please say so. Best wishes Jonathan Create a GitHub account for yourself on the web You have to authenticate yourself from Linux to GitHub for all operations. This can be done with username and password and two-factor authentication, but I think it's easier to create a GitHub personal access token. The Linux command "Fork your own copy" of the GitHub repo. There's a button for this on the web page for each repo e.g. Create a local clone on Linux of your GitHub repo, with the command e.g. You don't have to clone your repo more than once, because you can reuse it next time. However, once you've committed your change to the GitHub repo you can When you make the clone, it will be up-to-date. However, on future occasions, you have to bring it up to date before starting to work on it. To do this, change directory to the local repo e.g.
You can ignore 'Your branch is ahead of origin/main'. This means that your main branch on GitHub is not up-to-date, but it doesn't matter because you aren't going to use it. We just need an up-to-date local version of main:
Now it's up-to-date and ready for you to prepare changes. The An important feature of git is that the local directory changes its contents when you change branches in the repo. The repo knows all the contents of all branches (stored in hidden files in the directory), but it only shows you one at a time. The branch which is eventually published on the web is the "main" branch. Modifications are prepared by copying the main branch within the repo to a new branch, and modifying the new branch. To make a new branch, first Now you can modify the local files. You change and add files using any methods. In order to tell it which changes should be committed to the repo While you're working and when you've prepared what you want, you can do
Then Go back to your GitHub repo on the web. Click "Pull requests" at the top left of the window, then "New pull request". Set base repo on the left to the CF one e.g. If it's all OK, click "Create pull request". The pull request is created in the CF repo, not your own copy. It will be automatically numbered and appear in the list of pull requests. The pull request is an instruction to import the modifications from your new branch of your repo into the main branch of the CF repo. It is not enacted until someone clicks "Merge" on its web page. You should keep the branch in your repo until the merge is done. If you need to make any amendments, you can do them locally as before and push them to GitHub, and they will get included in the pull request automatically. Once it's merged, you can delete the branch in your repo if you like. You can delete the whole repo if you want to, and fork again next time, but then you lose the history, which might perhaps be useful. |
@JonathanGregory Should we get that added to the CONTRIBUTING.md file perhaps under at "git usage" type heading? |
Thanks @JonathanGregory ! That was exactly what I was looking for :-) |
@Armin-RS. I am glad that my recipe looks useful. If you find mistakes or omissions, please say. In order to avoid confusing this issue about GDAL, please could you, or anyone else, make any comments about that in conventions issue 369. @DocOtak. Yes, if the instructions are correct and likely to be useful to others, they should go somewhere for reference. Since the instructions are the same for the conventions and website repos (and any other, but those are the two most people would need to change), it might be better to put the instructions in a web page, and refer to it from |
GDAL is a translator library for raster and vector geospatial data formats (https://gdal.org/en/latest/index.html) under an MIT style Open Source license (https://gdal.org/en/latest/license.html).
It supports a wide list of file formats (https://gdal.org/en/latest/drivers/raster/index.html), including netCDF (https://gdal.org/en/latest/drivers/raster/netcdf.html#raster-netcdf).
GDAL can be used with various programming languages like C/C++, Fortran (via the FortranGIS wrapper), Python and Java (https://gdal.org/en/latest/api/index.html) and in addition offers a number of useful command-line tools for working with geo-referenced data (https://gdal.org/en/latest/programs/index.html#programs).
Considering these points, I think it would be a useful addition to the list of CF-aware software on the CF-Website at https://cfconventions.org/software.html
The text was updated successfully, but these errors were encountered: