Reputation: 1
I have tried to convert a Geotiff into a NetCDF and I need to define variables as:
dimensions:
time = None;
rgb = 3;
lon = 4886;
lat = 5462;
variables:
image(time,lon, lat, rgb);
I am having difficult to define a rgb value to a correspondent lon/lat values in Netcdf format. I am using netcdf4/python, any ideia how to do this?
Upvotes: 0
Views: 1352
Reputation: 2078
I suggest using Python and module netCDF4. I am sure you can find several examples of how to write netCDF file with Python.
For example, I started with the examples described here: http://pordlabs.ucsd.edu/cjiang/python.html
Nevertheless, UNIDATA has its own scripts shown here: https://www.unidata.ucar.edu/software/netcdf/examples/programs/simple_xy_wr.py or some examples here: http://pyhogs.github.io/intro_netcdf4.html
Regarding the question, I imagine one of the possible variable types could be an integer as the RGB values are from 0 to 255.
Upvotes: 0