Unidata / thredds

THREDDS Data Server v4.6
https://www.unidata.ucar.edu/software/tds/v4.6/index.html
265 stars 179 forks source link

Add JSON response for WMS GetFeatureInfo request #143

Closed rsignell-usgs closed 9 years ago

rsignell-usgs commented 9 years ago

For WMS GetFeatureInfo, in addition to text/xml it would be great to add application/json so that requests like this would work: http://thredds.ucar.edu/thredds/wms/grib/NCEP/WW3/Global/Best?time=2015-06-29T12%3A00%3A00.000Z&colorscalerange=0.28%2C5.53&transparent=true&format=image%2Fpng&exceptions=application%2Fvnd.ogc.se_xml&styles=&tiled=true&service=WMS&version=1.1.1&request=GetFeatureInfo&layers=Significant_height_of_combined_wind_waves_and_swell_surface&query_layers=Significant_height_of_combined_wind_waves_and_swell_surface&srs=EPSG%3A3857&bbox=-6887893.4928338025%2C5009377.085697312%2C-6261721.357121639%2C5635549.221409475&x=35&y=102&width=256&height=256&info_format=application%2Fjson This would allow applications built with TerriaJS, like Australia's National Map (and hopefully in the future the US Data.gov viewer) to work out of the box.

rsignell-usgs commented 9 years ago

Maybe an approach like this could make it easy? http://stackoverflow.com/questions/1823264/quickest-way-to-convert-xml-to-json-in-java/1823328#1823328

cwardgar commented 9 years ago

Hi Rich,

It'd be great if it were that easy! However, it's hard to predict whether the particular format (e.g. attribute names, etc) chosen by an XML-to-JSON library will be what TerriaJS is expecting. It's worth a shot though. I wonder if someone would be willing to contribute the code.

However, this is an ncWMS issue, not a THREDDs issue. I'm going to close this and maybe you can reopen there?