Hello,

I'd like to reproject a netCDF file through the command:

*gdalwarp -t_srs '+proj=lcc +units=m +a=6370000.0 +b=6370000.0 +lat_1=30.0
+lat_2=60.0 +lat_0=39.51 +lon_0=-120.0 +x_0=0 +y_0=0 +k_0=1.0
+nadgrids=@null +wktext  +no_defs' -of netCDF
NETCDF:"cut_wrf2d_d01_CTRL_EU10_200010-200012.nc":EU10 reprj_EU10.tif*

and then I tried clip the tiff file using a shapefile:

gdalwarp -q -cutline d01_domain_4km.shp -crop_to_cutline -of Gtiff
reprj_EU10.tif clip_EU10.tif

But I have got the following error:

*ERROR 1: Cannot compute bounding box of cutline.*

This is because the reprojected file (reprj_EU10.tif) is not in the right
position on the map.  Its lower left corner is in the origin (0,0) which
aren't the right coordinates.
I have tried with another command too:

*gdal_translate -a_srs d01_domain_4km.prj -of netCDF
NETCDF:"cut_wrf2d_d01_CTRL_EU10_200010-200012.nc":EU10 reprj_EU10.tif*

But I got the same error of the first attempt. I don't have any idea of how
to solve this problem.

Thanks.

Ottavio
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to