Quantcast
Channel: Question and Answer » gdal
Browsing all 397 articles
Browse latest View live

How to use ST_fromGDALRaster correctly with a given GeoTIFF

I am trying to import gdal raster data (a GeoTIFF) to a Postgis database, using the ST_FromGDALRaster method (http://postgis.net/docs/manual-2.1/RT_ST_FromGDALRaster.html). The question is that I don’t...

View Article


netCDF transformation

I have netCDF files with some datasets with data and two datasets containing lons and lats. I would like to open data layers in QGis in coordinates that are writen in netCDF’s lon/lat datasets. How...

View Article


gdalinfo documentation includes -json flag but using it returns “FAILURE:...

Reading the documentation for gdalinfo describes the option of formatting the output as JSON. -json Display the output in json format. However, when I use the -json tag it appears not to be...

View Article

Dealing with NULL values in geodatabase using GDAL commands?

I have a geodatabase and I’d like to return a value for NULL. (When I look at my raster layer, there are a lot of zeroes which I am assuming is because of the NULL values) Is there a way to use the...

View Article

How to calculate the bounding box in projected coordinates?

I’m using GDAL in Python to reproject rasters. I’d like to be able to take an existing raster, and project it into a new raster to my projection and output pixel size of choice. I’m worried about how...

View Article


GDAL – replacing rgb value (0,0,0) with (nodata,nodata,nodata)

I have a set of rasters in which I want to replace any rgb value of (0,0,0) with (nodata,nodata,nodata) I’ve tried using gdal_translate -a_nodata "0,0,0" in.tif out.tif But this seems to convert all 0s...

View Article

No GDAL/OGR package for Ubuntu 15.04?

Using Ubuntu 15.04, I’m trying to install GDAL/OGR. I did: [] sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable [] sudo apt-get update However, I found this error message W: Failed to fetch...

View Article

resampling DEM using gdal in python

I have yet again trouble using gdal… I want to resample (in this case, oversample) a DEM. The only thing that should change is the pixel spacing, so I want to interpolate in between the values that I...

View Article


GDAL – Layered and Georeferenced PDF

Has anyone has sample outputting maps into a Layered and Georeferenced PDF using c++ and GDAL?

View Article


Image may be NSFW.
Clik here to view.

How to make transparent the Index 0 of the color table of a Tif/GTiff/GeoTiff...

With a Tif file, I’m trying to generate tiles using gdal tools. gdalinfo gdalinfo I_III_IVA_MRA_WGS.tif | more Output Driver: GTiff/GeoTIFF Files: I_III_IVA_MRA_WGS.tif Size is 17119, 23309 Coordinate...

View Article

Write ogrinfo result to text file

I have obtained a desired value from a dataset using: ogrinfo input.shp -dialect SQLite -sql "SELECT SUM(field) from input The ogrinfo command prints the desired value via the command line when I run...

View Article

How to use GDAL Correlator?

I need to align several images using FOSS. There is Correlator tool in GDAL (source) that seems to be suitable for the job. But I was unable to find documentation for it or a tutorial. Can someone...

View Article

Python Gdal ERROR 6: GEOS support not enabled

I installed GDAL from here (https://pypi.python.org/pypi/GDAL/1.9.1) Before attempting the python GDAL I installed the prerequisite gdal libraries using Kyngchaos’s description some time ago...

View Article


GDAL Python OGRFeature .GetGeometryRef vs .Clone().GetGeometryRef

Just recently I was trying to get the geometry of a polygon stored in an ESRI Shapefile. In the script I was trying to read the polygon as follows: import ogr path = "shape.shp" ds = ogr.Open(path, 0)...

View Article

Handling warning about DX and DY in gdal_translate from .Gtiff to .ASC?

When I try to convert Gtiff to .asc file, QGIS shows the warning: Producing Golden Surfer style file with DX and DY instead of CELL SIZE since the input pixels are non-square. Use the FORCE CELL SIZE =...

View Article


Improving performance of Clip using OGR?

I have a set of points which I am trying to clip to a set of polygons. The files have many features (150,000 polys, 8,000 points). I’d like to automate this process carry it out once a day, hence I am...

View Article

Converting large jp2 files using gdal

I have a bunch of jp2 files with size going from 40MB to 1GB and I need to convert them all to a .tif format. When using gdal_translate for the small files (having the jasper driver to support jp2...

View Article


Raster statistics change after re-projection — which one is correct

I’m looking into some global DEMs (like ETOPO1 – http://www.ngdc.noaa.gov/mgg/global/global.html), and noticed that the statistics for the elevation values can change quite a bit after reprojecting the...

View Article

GDAL/OGR in C++: Merge multiple vector datasets to single [closed]

I need to merge multiple kml files into a single one. I found that I could use “ogr2ogr -append” but I have to do it through c++ and my Google-fu hasn’t been successful so far. So, any ideas? Also, how...

View Article

USGS Raster Conversion with GDAL Returns Blank .TIF File

I am new to GIS systems. I installed GDAL to convert .ADF files to .TIF files to obtain image heightmaps. It outputs a GeoTIFF .TFW file that I can’t open, and a .TIF file that is blank (all white). Am...

View Article
Browsing all 397 articles
Browse latest View live