Resampling a raster file with GDAL C#
Is it possible to resample the raster by using GDAL C# binaries, in a way that every other cell in a row and column is removed? Basically a replication of this GDAL command: gdal_translate -outsize 50%...
View ArticleWhy can't I run .tif file with GDAL?
I am trying to extract data from a geotiff file in the Ubuntu terminal. My professor used the command “gdal NDVI.tif” and was able to write the data to a text file. When I use that command, I get the...
View ArticleReproject raster without projection info
I’m pretty new to gdal and got a presumably easy question for experienced gdal users. My problem: I have a raster ascii file of which I don’t know the projection or epsg code. However, I want this...
View ArticleBest file format to manipulate raster data with big length and small width
How is the best way to manipulate data from specific distance from an axis? Problem: I have a road axis; I want to manipulate 1Km of data from each side of this axis; Pixel size is 1m X 1m Axis Length...
View ArticleHow to use gdal_rasterize with postgis vector?
I’m trying to convert a multipolygon vector layer to a raster using the GDAL tool gdal_rasterize. The command I am using is: gdal_rasterize -b 1 -burn -9999 PG:"dbname=db password=password" auckland...
View ArticleMODIS data with .hdf extension not compiling in Ubuntu
I am trying to use GDAL to read .hdf file, but it does not seem to recognize the extension. It works fine in Windows system. The GDAL open command gives the following error message: ERROR 4:...
View ArticleWriting 3 channels to 8-bit TIF in Python using gdal
I have some Python code to write 3 channels to file. Here, channels is an array of 3 numpy 2D-arrays (RGB), outfile is the filename, and rows and cols are the image dimensions. def save_tiff(channels,...
View ArticlePython GDAL open dataset in PostGIS with quotations
Error trying to use gdal to open a dataset in PostGIS with the following code: ds = gdal.Open("PG: dbname=nyc host=localhost user=postgres password=mypassword port=5432 mode=2 schema=public column=rast...
View ArticleGDAL 2.0.1/QGIS 2.14.0 on OSX won't open MODIS HDF?
I’m on OSX 10.9.4, using GDAL 2.0.1 from the terminal. I want to mosaic MCD12Q1 HDFs together with GDAL but my build can’t even read them. The file:...
View ArticleHow to clip MrSID Files in R and export to GeoTiff?
I would like to use R to: Read in an MrSID raster (.sid format) Clip the extent using a shapefile Save the new clipped raster as a geotiff I am fine with steps #2 and 3, but I can’t find any...
View ArticleGeoreferencing files that are orthogonal to a point on a sphere
I have about 65000 photos, each of them a square where an inscribed circle is radius 1 degree. Each of these photos has an associated latitude and longitude of the center. I’m trying to figure out how...
View ArticleCombining data in two projections?
The PAMAP dataset comes divided between two different projections: Pennsylvania North State Plane and Pennsylvania South State Plane. I’d like a great big DEM of the whole state of Pennsylvania....
View ArticleHow can I use gdal_retile on RGBI (4 band) GeoTIFFs while preserving band...
I want to retile large GeoTIFFs with 4 bands: R = Red, G = Green, B = Blue, NIR = Near Infra Read; in short “RGBI” if I understand correctly. gdalinfo on the input file prints as band information: Band...
View ArticleReverse colour-ramped DEM to its original elevation value?
A have a GeoTIFF LIDAR image which display DEM in its color-ramp version (color relief) from blue (minimum value) to red (maximum value) and green (in between). I don’t have the original elevation...
View ArticleIs there a way to use the GDAL C++ API to find areas of overlap between two...
I have a bunch of SAR images (about 1 GB each) on which i need to do some image processing. Each image is georeferenced and there is significant overlap between each pair of images in the set ie. one...
View ArticleHow can I blend DEM rasters with GDAL?
I have several DEM rasters in different projections and at different resolutions. The rasters are not rectangular, but they have appropriate NoData values. They overlap enough that I should be able to...
View ArticleHow to create dataset in python with creation options like in ogr2ogr with...
In ogr2ogr there is dsco option (data source creation option). e.g. ogr2ogr -f DXF -dsco trailer=trailer_buildings.dxf -dsco header=header_buildings.dxf out.dxf test_buldings_shp.shp. It works well,...
View Article