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
56 views

Call gdal_proximity() from R

I have a raster including eight land cover types (pixel values ranged from 1 to 8): > r class : RasterLayer dimensions : 9887, 30532, 301869884 (nrow, ncol, ncell) resolution : 10, 10 (...
3
votes
0answers
41 views

How do I rotate a coordinate system (ArcGIS/GDAL driver)? [closed]

I am trying to get oblique tiles into a mosaic dataset. The tiling scheme works perfectly well for vertical and north imagery (using google tiling scheme) through the GDAL driver, however I am ...
1
vote
0answers
30 views

GDAL compilation to .NET (C#) use

I want compile GDAL library for use in C# program. I use Microsoft Visual Studio 2013. First, I compiled GDAL C++. As a result I have DLLs and libraries (No problems) . Next, I tried to compile with ...
5
votes
0answers
99 views

Different results from GDAL raster attribute table command on mac and windows

I am trying to get the raster attribute table of the following file: Shift_cult_past_current_prediction_20160107_gr1DD.tif available here: https://www.dropbox.com/s/fmomfpro3j6dmz8/...
3
votes
1answer
59 views

How to create dataset in python with creation options like in ogr2ogr with -dsco options

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, ...
1
vote
0answers
39 views

where to find good GDAL training [duplicate]

Can anyone list out great sources of GDAL training? Books, videos, companies and/or people offering tutoring?
1
vote
1answer
12 views

How do I correct the GeoTransform of a GRIB dataset if I scale/crop the data?

I have modified the GRIB2 data to be cropped and a different size. I'd like to create a new GRIB2 file which contains this modified dataset. How do I calculate the new GeoTransform and create it using ...
2
votes
1answer
48 views

Imagery Band order for Natural and False color imagery

I have an image which has had its band ordering rearranged, giving it a weird false color. I wanted to change it back to a natural color, so I used GDAL and through trial and error got the bands re-...
0
votes
1answer
103 views

Seeking C++ api to read/write PostGIS?

I need read/write geometry object from PostGIS. Is there C++ library to do this?
2
votes
1answer
33 views

Discrepancy between GTiff and MEM drivers

I was expecting that both the drivers would behave the same way, except that 'MEM' will not create the file. However, in this test 'MEM' pass, but 'GTiff' does not. Can someone explain why? class ...
1
vote
1answer
42 views

32-bit Map tiles for use with leaflet

I've got a lot of single-band Geotiff files with the GDT_Float32 format and I need to present these over the web, hopefully using a webmap leaflet/mapbox/googlemaps widget where clients can hover over ...
0
votes
0answers
5 views

store the output of gdal_rasterize as a pgraster?

I was wondering when using gdal_rasterize to convert something to a raster, is it possible to store the output raster as the PostGIS raster instead of, say, a tif? For example: I have the following ...
3
votes
1answer
87 views

Visualizing netCDF file with unknown projection

I'm having a tough time visualizing a netCDF file with poor metadata in ArcMap, which is probably not a surprise. I know the file to contain ozone concentrations over the United States. If I try to ...
1
vote
1answer
42 views

Why can't PHP insert new geometry on PostGIS?

(Copied this question from stackoverflow, since it may have more answers here.) I'm using ogr2ogr to upload a GPX file to PostGIS. When I do it on command line (Ubuntu 14.04), it works fine. ...
2
votes
1answer
101 views

Vertical Datum conversion of a raster with gdal

Is there a tool available in gdal to do vertical datum conversion of a raster DEM? I'm looking for a single command line to execute the vertical datum conversion of a raster like the las2las of Liblas ...
4
votes
1answer
94 views

Clip raster by mask layer returns error “wrong number of parameters”

Using Python for QGis 2.14 Essen i try to clip a raster by a Polygon, as indicated here: http://docs.qgis.org/2.6/de/docs/user_manual/processing_algs/gdalogr/gdal_extraction/cliprasterbymasklayer.html ...
3
votes
2answers
86 views

Ogr2ogr is rounding numeric field from PostgreSQL to 6 decimals

I am using ogr2ogr to convert the data from PostgreSQL to GeoJSON. PostgreSQL contains field named shape.area, type numeric, which stores values up to 17 decimal places, like 0.15627328781960101. The ...
2
votes
1answer
45 views

Reverse 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 ...
1
vote
0answers
10 views

Gdal overview creation [duplicate]

I need to generate gdal overview for tif image having parameter value 2 4.but when I run following error shows- Error 4:'example.tif.ovr' not recognized as a supported file format. overviews building ...
3
votes
2answers
124 views

GDAL/OGR ogr.Layer.Intersection fails when producing mixed geometry results

I am trying to intersect layers using the ogr.Layer.Intersection method, in Python. This works fine for pairs of polygons, but I have found intersecting two linestring layers containing matching ...
0
votes
0answers
42 views

How to georeference *.tiff to a given feature geometry automatically?

I´ve got the task to georeference an tiff image to the referencing polygon footprint (Polygon). I have found a lot of ways to do get the footprint from a raster but I could not find a way to use ...
0
votes
0answers
25 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
33 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: pygeoprocessing.geoprocessing.get_rat_as_dictionary_uri(...
0
votes
1answer
124 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
31 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
1answer
94 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 inputRaster:...
1
vote
1answer
19 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
45 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 ...
4
votes
3answers
139 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
41 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
30 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 = ogr....
1
vote
1answer
111 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
72 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
30 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
79 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
51 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
15 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
60 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
71 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
31 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 column=...
2
votes
0answers
37 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 save_tiff(channels,...
1
vote
1answer
172 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
48 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
87 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
53 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
34 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
111 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
40 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
35 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: ...