GDAL (Geospatial Data Abstraction Library) is an open source translator library & set of command-line utilities for processing raster spatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats. It also comes with a variety of ...

learn more… | top users | synonyms

0
votes
0answers
23 views

Gdal overviews issue for tif images in image caching project

we have lots of tiff images having 1 meter resolution, when we start generating GDAL overviews with parameters value 2 4 , it shows an error- Error 4:'example.tif.ovr' not recognized as a supported ...
2
votes
0answers
24 views

Reading raster attribute table using gdal in python

Is there a GDAL function that can read in a raster attribute table? Something functionally similar to this function in pygeoprocessing: ...
0
votes
1answer
67 views

How do I convert a DEM GeoTIFF to Contour Shapefile

I have a digital elevation model as a GeoTIFF and I'm looking to generate a Shapefile of contours with 5m bands on the command line. Is this possible? Ideally using GDAL and Python.
3
votes
1answer
28 views

Problem with algebra formulas for work with gdal_calc.py

I'm trying to update some values of a raster based on another raster. 1st raster (A): landuse data (values from 10 to 240) 2nd raster (B): mask data (only nodata values and a given value, for ...
0
votes
0answers
33 views

numpy.unique: ValueError: all the input arrays must have same number of dimensions

I'm trying to get the unique values of an array but am getting an error that doesn't make any sense. Here is my pseudo code: import numpy as np import gdal # I have a .tif file, call it ...
1
vote
1answer
15 views

Error in opening shapefile located on network

I have been able to successfully open a shapefile using Gdal when it is situated on my local machine. However, when I put the file on another machine on the network and try to open it, it fails. ...
0
votes
0answers
19 views

Read GeoTiff from memory in GDAL

Is it possible with the GDAL library to read an image (e.g. GeoTiff) from a memory stream, like stdin instead of a defined location on the local disk? It would be useful to read data in streaming ...
3
votes
3answers
123 views

How to get WKT for various Spatial Reference Systems?

I need to provide WKTs of spatial reference systems in the APIs provided by GDAL/OGR. Is there some specific place where I can look for WKTs of the spatial reference systems that I'm working with? Or ...
0
votes
0answers
30 views

How to convert raster in UTM to lat/lon using GDAL (or other tool)

I have a .tiff file given with UTM coordinates that I'd like to convert to a .nc (NetCDF) file with latitude/longitude coordinates. I've tried with gdal_translate and gdal_warp but these did not work. ...
0
votes
1answer
27 views

Empty file after saving…? [closed]

Code below is working, but after opening - there are No features in shp file. What can be a problem? import osgeo, os from osgeo import ogr, gdal shpFile = r'C:\Users\ReBurns.shp' driver = ...
1
vote
1answer
55 views

Remove/subset raster bands in Python GDAL

I'm trying to remove bands from a raster I have. Basically I just want the first band as a new GeoTIFF file. Here is my code so far: #!/usr/local/bin/python from osgeo import gdal # Load my GeoTIFF ...
3
votes
0answers
53 views

GDAL_merge - Stacking Files - Nodata Value wrong

I masked a large raster stack by separating the stack in 18 chunks, masking each and writing each chunk to a file (due to memory problems). Then, I use gdal_merge to stack the 18 GTiff files. All ...
1
vote
0answers
21 views

How to create tiles from c# code

I need to create tiles directly from c# code. The input file is in *.tif format. Is there a way to do this simply? I tried GDAL, but I found it complicated, I don't understand how to cut tiff into ...
3
votes
2answers
57 views

Find points that intersect a user-defined polygon in GDAL

I'm trying to do something that I don't know is possible in GDAL/Python. I have a list, L, of pre-defined lat/long points that make up a uniform grid. A user will send me a set of points that make ...
0
votes
2answers
42 views

Trouble getting shapely to run

I downloaded the GDAL complete Framework von Kyngchaos which also includes the GEOS Framework and shapely for python. I can import shapely without a problem, but when I try to perform some "geo ...
2
votes
0answers
14 views

units for gdalwrap output extent

I am attempting to write a small bash script that will mass process a large number of raster .tif files. It should do the following: Clip to a smaller extent Reproject to UTM This is what I have, ...
0
votes
1answer
25 views

Combining 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. ...
1
vote
1answer
52 views

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 ...
0
votes
1answer
62 views

Why 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 ...
1
vote
0answers
29 views

Python 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 ...
2
votes
0answers
23 views

Writing 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 ...
1
vote
1answer
146 views

How to use gdal.openEx with flags and parameters?

I'm new in python. I have a class which opens SXF format, and i want the last string self.sxf_ds = gdal.OpenEx(self.sxf_path) to be opened with flag 'GDAL_OF_VERBOSE_ERROR' but the nOpenFlags is ...
2
votes
1answer
31 views

How to build GDAL with PDF support?

I've built GDAL so many times but this time I want to add Geospatial PDF reading capability. First I built PoDoFo, but found out that Poppler is better. I found out that Win-KDE contains prebuilt ...
1
vote
0answers
62 views

Slow performance clipping raster with GDAL

I have a few large LiDAR DEMs that I want to merge. Each DEM has some glitches around the borders which need to be removed in order to get a seamless final product. I manually traced around each DEM ...
1
vote
0answers
40 views

ogr2ogr - Shapefile database SQL query; missing .cpg and .xml

I am using gdal and ogr2ogr to perform a SQL query on a database of shapefiles with the code below. The geoprocessing works and the appropriate shapefile is extracted from the query, but when I print ...
1
vote
1answer
31 views

Export Line Feature using ogr2ogr.

I am trying to export a line feature class from an oracle spatial database to a file geodatabase. I can export polygons with no problem, but cannot find the appropriate command '-nlt' for Line ...
1
vote
0answers
89 views

Transformation from local projection to WGS84

I'd like to reproject point that is in local coordinate system to the WGS84, using gdal. But exception "No PROJ.4 translation for source SRS, coordinate transformation initialization has failed" ...
2
votes
0answers
39 views

Using ogr2ogr for clipping vector files

I am looking for alternative (more efficient) methods for clipping large feature class datasets. When using the 'Clip' tool in ArcGIS, often times the tool will crash after many hours of processing. ...
0
votes
1answer
16 views

How can I use gdal_retile on RGBI (4 band) GeoTIFFs while preserving band information?

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: ...
0
votes
0answers
26 views

gdaltransform returns ERROR 1: failed to load datum shift file

I'm trying to do a NAVD88 to WGS84 (G1674) conversion using gdal. I've installed gdal (on centos7) using sudo yum install gdal proj-epsg proj-nad and am trying to perform the conversion via: ...
0
votes
1answer
23 views

gdal writeArray causes appcrash at end of python script

i'm using OSGeo4W64 (gdal 2.0.2-8) with Python 2.7.5 on Windows 8.1 64bit. Editor is PyCharm 2016.1.2. I want to save an image with gdal, but i always get an error when the python script is complete. ...
0
votes
0answers
43 views

Relation between contour_interval and DN values of a georeferenced image in gdal.ContourGenerate() function

I am generating contours from a georeferenced image by using gdal.ContourGenerate() function in python. One of the parameters of the function is contour_interval. The value of contour_interval ...
1
vote
1answer
18 views

Georeferencing 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 ...
1
vote
1answer
25 views

QGIS GdalUtils runGdal function throws error for second argument

I am trying to use a script provided in the QGIS Python Cookbook by Joel Lawhead - its a simple script that georeferences images based on control points via the gdalwarp function. (p.124 in the book) ...
1
vote
0answers
34 views

Efficiently iterating through raster calculations with Rasterio or GDAL

I've got a very slow and round-about way to currently do this, but I struggle with the general concept of using windows in raster calculations and how to apply an affine or geotransformation between ...
6
votes
1answer
106 views

Adding GDAL as dependency to Python package?

I am trying to package a Python script that uses GDAL for PyPI. I started by including a direct reference in my setup.py: install_requires=['GDAL==1.11.2'], This way the package failed to install in ...
1
vote
1answer
40 views

MODIS 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: ...
5
votes
2answers
94 views

Why am I getting two different outputs from Python and C++ using GDAL?

I am trying to gather information from a *.tif file using the GDAL libraries. When I open the *.tif file using both the Python API, and C++ API, I encouter two completely different answers. Here are ...
4
votes
1answer
62 views

Georeferencing Himawari-8 in GDAL (or other)

Does anyone know the appropriate project information to georeference (and hence reproject) Himawari-8 AHI data in the IR? The images are 5500x5500 pixels. Currently I try these: ulx=-5570248.832537 ...
1
vote
0answers
68 views

How to make NoData transparent?

I have been using python to turn a netcdf into a geotiff. Once I have the geotiff, I am using gdalwarp to transfer it into the right projection. Then use gdal_translate to get the tif into a vrt ...
1
vote
2answers
90 views

Translating ArcPy Commands to GDAL Equivalents? [closed]

I'm trying to figure out GDAL equivalencies to the following arcpy functions: arcpy.env.overwriteOutput() arcpy.MakeFeatureLayer_management() arcpy.SpatialJoin_analysis() arcpy.da.SearchCursor() ...
1
vote
0answers
14 views

Is there a Guide to Translate ArcPy code to GDAL equivalent? [duplicate]

Due to cost-cutting measures I've been asked if I can migrate ArcPy code to a GDAL equivalent. I'm fairly new to GIS, ArcPy, and GDAL. Is there a website or guide which caters to providing ...
1
vote
2answers
79 views

Reproject 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 ...
1
vote
0answers
31 views

Gdalwarp UTM reprojection causes image distortions

I'm trying to re-project Sentinel-2 images to a common UTM zone in order to create a mosaic. For this I'm using gdalwarp with the following syntax: C:/OSGeo4W64/OSGeo4W.bat; gdalwarp -t_srs ...
1
vote
0answers
35 views

gdalwarp won't run with “cubic” resampling method

I am having an issue with running the gdalwarp command from command prompt. Basically I have a raster WGS84 file, which I would like to reproject to spatial reference which is using the Azimuthal ...
2
votes
1answer
47 views

Tiff: How to calculate Tiff Tag ModelPixelScaleTag (field 33550) and Field 34735

I have to manage a service which can return images in tiff format. This service is requesting another WCS Service from which it receives the Image File without geo-referenced informations. So i need ...
1
vote
0answers
77 views

mosaic rasters with gdal_merge.py

I want to mosaic 2 rasters "rasa" and "rasb" using gdal_merge.py . While running the code, it produces an error " No input files selected". Can somebody help me to find the error in the code? ...
0
votes
0answers
23 views

Installation and execution of GDAL

I am trying to install GDAL on the remote server. I do: pip install GDAL==1.9.1 It gets installed and then I try to do: gdalinfo --version But I get 'command not found'. I understand that I ...
1
vote
2answers
51 views

Create GeoJSON after processing.runalg('qgis:clip', …)

I have the following problem: I have two vector layers, foobar and clipLayer. About the python console I call the following command: processing.runalg ('qgis:clip', 'foobar', 'clipLayer', None) As a ...
1
vote
0answers
62 views

Troubling using MODIS package in R (mac). Error with gdal

I'm new to using MODIS data, and have been trying to set up a a way to use the HDF files produced by MODIS on R. I had trouble with gdal (could only download the package through system dialog), and ...