Skip to content
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

How to convert netCDF to JSON #60

Open
geek-hmh opened this issue Oct 17, 2016 · 4 comments
Open

How to convert netCDF to JSON #60

geek-hmh opened this issue Oct 17, 2016 · 4 comments

Comments

@geek-hmh
Copy link

Who can tell me how to convert netCDF to JSON for this program?thank you

@cwardgar
Copy link
Contributor

We don't support direct conversion of a NetCDF dataset to JSON. However, we do support the representation of NetCDF metadata as NcML. Once you have that, there are many tools online that will convert XML to JSON.

@lesserwhirls
Copy link
Collaborator

There was some discussion on the netCDF mailing list about this topic:

http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2016/msg00245.html

As @cwardgar said, we do not currently return JSON from netCDF-Java or the THREDDS Data Server. However, we are considering this - specifically, we are considering support for CoverageJSON.

What is your particular use case for JSON, @geek-hmh?

@WEP11
Copy link

WEP11 commented Feb 6, 2020

I second this one. Adding JSON output to THREDDS could be a powerful combo with it's existing web GIS capabilities.

My Current Use Case:
"On Click" loading of data from a point in browser-based code. As it stands now, the process is:

  1. Get point coordinates
  2. Parse X/Y array output from TDS
  3. Identify grid for coordinate
  4. Parse variable output from TDS for appropriate X/Y location
  5. Do the calculations/display you want to do

I could see the parsing quickly cascading into something a developer would want to avoid in larger datasets. Frankly, my current use case might be to use a server side script to work directly with the netCDF file instead of trying to work with the existing services. The desired process might be:

  1. Get point coordinates
  2. Receive X/Y data in JSON
  3. Identify grid for coordinate
  4. Receive variable output from TDS for grid point
  5. Do the calculations/display you want to do

Even cooler would be the ability to send a coordinate and TDS identify the appropriate grid.

At this time we use in-house server side code to handle this type of work. But I've been experimenting with the TDS WMS capabilities and it'd be pretty awesome if it was a one-stop-shop for bringing netCDF data into the browser. (Sorry for the necro!)

@lesserwhirls lesserwhirls transferred this issue from Unidata/thredds Feb 8, 2020
@jonaraphael
Copy link

Please! A python netCDF to JSON library would do so much to increase data availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants