[gdal-dev] GDAL interpolation of Gtiff / ESRI polygon.shp

Kyle Shannon ksshannon at gmail.com
Wed Dec 21 11:00:48 EST 2011


Roland,
I believe gdal_grid takes an ogr file as input and creates a raster from a
point layer.  If you just want to resample a raster, try gdalwarp, without
the warping:

kyle at local$ gdalwarp -ts 118 188 -r cubicspline coarse.tif fine.tif

where -ts is 'target size' and -r is resampling method.  See gdalwarp
documentation for info:

http://gdal.org/gdalwarp.html

also here is the gdal_grid info:

http://gdal.org/gdal_grid.html

/**
 *
 * Kyle Shannon
 * ksshannon at gmail.com
 *
 */



On Wed, Dec 21, 2011 at 04:13, RolandB <rbaatz at gmail.com> wrote:

> Dear users,
>
> I want use gdal for some file transformation.
> Any help in solving the issue is greatly appreciated by me! It would
> be great if one of you have solved already this problem or knows how to do
> so.
>
> By gdal_rasterize I did create a Gtiff raster from a ESRI Polygon
> shapefile.
> This is successful. I have worked with the Gtiff successful later on with
> $user>: gdal_translate -of netCDF ./tmp/output.tif ./tmp/output2.nc
> Still some commands do not work. I'm looking forward for replies.
>
>
> Where is the GTiff driver in the list below???
> And what is the output layer of the Gtiff file? I tried "1", "Band1",
> "band". No file opening with any band.
>
> So here are the commands and the error messages:
>
> First:
>
> *$user>: * gdal_rasterize -a kennummer -init 0 -l Bk50_rur_wgs -te 5.93
> 50.39 6.74722 51.22886 -ts 59 94 -ot Int32 ./Input/bk50_rur_wgs.shp
> ./tmp/output.tif
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
> *$user>: *gdal_grid -a invdist:power=2.0:smoothing=1.0 -ot Int32 -txe
> 50.39 51.22886 -tye 5.93 6.74722 -outsize 59 94 -l Band1
> ./tmp/output.tif ./tmp/newout.tif
> Unable to open input datasource "./tmp/output.tif".
>
> *$user>:* "gdalinfo ./tmp/output.tif"
>
> Driver: GTiff/GeoTIFF
> Files: ./tmp/output.tif
> Size is 59, 94
> Coordinate System is:
> GEOGCS["WGS 84",
>  DATUM["WGS_1984",
>      SPHEROID["WGS 84",6378137,298.257223563,
>          AUTHORITY["EPSG","7030"]],
>      AUTHORITY["EPSG","6326"]],
>  PRIMEM["Greenwich",0],
>  UNIT["degree",0.0174532925199433],
>  AUTHORITY["EPSG","4326"]]
> Origin = (5.930000000000000,51.228859999999997)
> Pixel Size = (0.013851186440678,-0.008924042553191)
> Metadata:
>  AREA_OR_POINT=Area
> Image Structure Metadata:
>  INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (   5.9300000,  51.2288600)
> Lower Left  (   5.9300000,  50.3900000)
> Upper Right (   6.7472200,  51.2288600)
> Lower Right (   6.7472200,  50.3900000)
> Center      (   6.3386100,  50.8094300)
> Band 1 Block=59x34 Type=Int32, ColorInterp=Gray
>
>
> *$user>: *"ogrinfo ./tmp/output.tif"
> FAILURE:
> Unable to open datasource `./tmp/output.tif' with the following drivers.
>  -> ESRI Shapefile
>  -> MapInfo File
>  -> UK .NTF
>  -> SDTS
>  -> TIGER
>  -> S57
>  -> DGN
>  -> VRT
>  -> REC
>  -> Memory
>  -> BNA
>  -> CSV
>  -> GML
>  -> GPX
>  -> KML
>  -> GeoJSON
>  -> GMT
>  -> SQLite
>  -> PostgreSQL
>  -> PCIDSK
>  -> XPlane
>  -> AVCBin
>  -> AVCE00
>  -> DXF
>  -> Geoconcept
>  -> GeoRSS
>  -> GPSTrackMaker
>  -> VFK
>  -> PGDump
>  -> GPSBabel
>  -> SUA
>  -> OpenAir
>  -> PDS
>  -> WFS
>  -> HTF
>  -> AeronavFAA
>
> *$user>:* gdal_translate -of netCDF ./tmp/output.tif ./tmp/output2.nc
> Input file size is 59, 94
>
> (This last should be done with the interpolated file, which I did not
> manage so far.)
>
> Best regards,
> Roland
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/GDAL-interpolation-of-Gtiff-ESRI-polygon-shp-tp7114807p7114807.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111221/2eb09259/attachment-0001.html


More information about the gdal-dev mailing list