[gdal-dev] Questions on working with HYCOM data in netcdf format
Even Rouault
even.rouault at spatialys.com
Sat Jun 4 06:29:26 PDT 2016
Hi,
>
> I want to convert some HYCOM data into GTiff format and I'm a little
> lost on how to get started, whether I can do what I need just using a
> vrt or if I'm going to have to write code to process the data.
>
> To start with I have placed gdalinfo on one file here:
> http://imaptools.com:8080/dl/hycom-gdalinfo.txt
>
> The data comes from http://hycom.org/dataserver/glb-analysis
> and I will need to be using GLBa0.08 dataset.
>
> I have two use cases:
>
> 1) The simple one is to extract say Band 1 into a georeferenced GTiff
> and apply color to using color ranges without loosing the NODATA. I
> think I can do later using .vrt, correct?
gdaldem color-relief can output to a VRT, but given that this netCDF file is
georeferenced through a geolocation array, you'll likely have first to run
gdalwarp -geoloc to have something useful at the end.
>
> I'm not sure how to deal with the georeferencing, because the download
> site says: "Native hycom .[ab] data converted to NetCDF on native
> Mercator-curvilinear HYCOM horizontal grid" but that does not seem in
> sync with the Metadata in the file.
>
> 2) The more complicated case is that there are two files:
> a) eastward_sea_water_velocity (aka: u, u-velocity)
> b) northward_sea_water_velocity (aka: v, v-velocity)
> that I would like to use to create a grid of vectors with arrowheads
> using u and v to define the vector and where the color of the vector is
> related to the magnitude of its length. Ultimately this data will get
> rendered via mapserver so I'm wondering if I can do this via a GTiff or
> if I will have to resort to creating a massive point shapefile with
> attributes of angle and magnitude and use a symbol. It seems like it
> would be best if I can keep the data as a GTiff and then sample the
> points and render the vectors on the fly for when you zoom in/out.
See
http://mapserver.org/input/vector/vector_field.html
You don't need to create a vector file.
You'll have to preprocess your file to get the u and v bands in the same
raster.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list