Opened 8 years ago

Closed 3 years ago

#5389 closed defect (wontfix)

NetCDF: gdal_translate unable to translate EASE-GRID file properly

Reported by: MateoK Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: 1.10.1
Severity: normal Keywords: EASE-grid NetCDF
Cc:

Description

Input file: NetCDF, multiple subsets, EASE-GRID (EPSG:3410 http://nsidc.org/data/ease/ease_grid.html )

Commands which I execute: gdal_translate -ot Int16 -scale 0.0 700.0 0 32767 -a_ullr -17321655.5434 7332251.36559 17321655.5434 -7332251.36559 NETCDF:"input_file.nc":interesting_subset result_file.tif

gdalwarp -s_srs "EPSG:3410" -t_srs "EPSG:4326" result_file.tif result_file_WGS84.tif

Results I receive two warnings from gdal_translate:

0Warning 1: Lost metadata writing to GeoTIFF ... too large to fit in tag. Warning 1: Lost metadata writing to GeoTIFF ... too large to fit in tag

Then it seems that gdalwarp comes into infinitive loop - it create file which have enormous size (more than 400MB, while result file from gdal_translate have only 5MB). I need to manually interrupt execution as file stop growing, but gdalwarp do not.


Giving additional parameter for gdal_translate: -b <number>, create result file without warning, but it's suspiciously small (it's only 20 kB),

Change History (5)

comment:1 Changed 8 years ago by MateoK

It looks like mentioned NETCDF have 586 bands. Each band represent different latitude and store three values - median,min,max.

Begining of metadata:

Band 586 Block=3x1 Type=Int16, ColorInterp?=Undefined

NoData? Value=-32768 Offset: 0, Scale:3.05185094759971e-05 Metadata:

_FillValue=-32768 add_offset=0

comment:2 Changed 7 years ago by Jukka Rahkonen

Where could we download such a file for testing?

comment:3 in reply to:  2 Changed 7 years ago by MateoK

Replying to jratike80:

Where could we download such a file for testing?

I use data from ESA - you will need to register to download them. My input data was NetCDF files which contains for each variable following information:

lat, lon, med_min_max

It seems that this array is not accepted by gdalwarp. To overcome this, I read my NetCDF in Python first (I use packages from osgeo import gdal, gdalconst, osr, numpy, scipy.io import netcdf) and save array [:,:,2] (saving only Max value) as GeoTIFF file.

I am able to use such file (GeoTIFF) in gdalwarp without problems.

comment:4 Changed 7 years ago by Jukka Rahkonen

Keywords: NetCDF added
Summary: gdal_translate unable to translate EASE-GRID file properlyNetCDF: gdal_translate unable to translate EASE-GRID file properly

comment:5 Changed 3 years ago by Even Rouault

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.