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

How to make a mask by using gdal.RasterizeLayer() from list of coordinates?

I have a list of coordinates points(x,y) of some multipolygon like this: [[x1,y1][x2,y2][x3,y3] ... [xN,yN]] Also can convert between lat/lon and UTM coord systems. When we use gdal.Raesterize like ...
0
votes
1answer
11 views

How to merge GDAL tiles and crop via a bounding box

I am using GDAL. Assume I have four adjacent GDAL tiles in the formation of a square. I have a bounding box with a corner in each tile so that the rectangle formed spans all four tiles. My goal is to ...
1
vote
0answers
9 views

Determining resolution of specific image in PDF document?

Can GDAL be used to determine the resolution of an image embedded inside a PDF? If not GDAL, is there another method? I'm using gdal_translate to convert TIF+TFW files into geospatial PDF. I know ...
1
vote
1answer
7 views

How to I replace pixel values in a single band DEM?

I have a single band DEM tif. And would like to replace values above or below a certain threshold with 0. Can I do that with GDAL?
3
votes
3answers
1k views

How to create a compressed GeoTIFF with the QGIS Clipper tool?

I have a geo-tiff created by Pix4D which is about 375 Mb in file size. I have clipped it to a smaller area using Qgis 2.8(using Raster ‣ Extraction ‣ Clipper), and the output file is about 900 MB in ...
5
votes
2answers
1k views

ESRI GDB Support in GDAL / ogr2ogr on Mac OS X 10.8

How do you incorporate support for ESRI's fgdb format into GDAL / ogr2ogr on Mac OS X 10.8?
3
votes
2answers
39 views

How to use gdal2tiles on a custom tiff image recieved from providers to generate tiles

I have been struggling a bit to generate tiles for a high-resolution image that we have. The current image we have is a very large (+20GB) image, saved as a GeoTiff file. I would like to generate ...
0
votes
1answer
60 views

Clipping GeoTIFF file by GeoJSON?

Input GeoJSON file: { "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Multipolygon", "coordinates": [[[ [27.397511483867362, 44.161117466010516], [...
1
vote
1answer
40 views

Install GDAL python package in virtualenv on mac

I'm trying to instal the GDAL python package, preferably in a virtual environment, but when I try "pip install gdal", I get the following error: extensions/gdal_wrap.cpp:3085:10: fatal error: '...
1
vote
0answers
22 views

How to change which python GDAL is “connected” to?

I would like to use GDAL with Python 2.7 on Ubuntu 14.04. I have installed gdal-bin and python-gdal from UbuntuGIS following their instructions. However, importing GDAL (from osgeo import gdal) only ...
0
votes
0answers
12 views

Batch Process for GDAL Georeferencing in windows command line? [on hold]

I used Georeferencing using GDAL? for georeferencing images and the thing is i have lot of images in a folder and a csv file which has the image name in a column and x-min,x-max,y-min and y-max in a ...
10
votes
1answer
5k views

Georeferencing using GDAL?

I have a .tiff image that I am trying to overlay in google earth. For that I require to georeference it first. The image projection is UTM with NAD83 as datum. I know the lat/long of the four corners ...
3
votes
1answer
688 views

Uploading raster format(*.tif) to postgis through raster2pgsql

I'm new to postgis and raster file format. i currently working on netcdf files and i want to import it into postgis through curl command line tool but its failed for me.so i jump on to GDAL v1.9.2 ...
2
votes
1answer
208 views

NASA SRTM: precipitous contour lines in TileMill

I was trying to make a nice looking print map of Bali (Indonesia) in TileMill. After creating a terrain layer (using this walkthrough) I noticed that the island's coastline was precipitous. Is ...
0
votes
0answers
22 views

using gdal to convert from NAD83 to WGS84

I'm trying to use gdal in OSGEO4W to convert from NAD83 to WGS84. I'm very new to this so if you can, be as thorough as possible with your answers. The command I'm running is gdalwarp --config ...
0
votes
2answers
29 views

hdf files in GDAL throwing an error in R gdalinfo

I am having issues using some modis hdf files in R. Working on Windows 10. I had a previous question where gdal wasn't working but I think I have resolved that. I tested with existing tifs and they ...
1
vote
0answers
23 views

Segmentation fault in readasarray

I am running the following code and get: Segmentation fault (core dumped) I have no clue why, I have been using the functions many times before and now suddenly this happens. Sometimes it happens at ...
1
vote
1answer
31 views

Array written by GDAL with Python script has numbers read as “nan” by QGIS?

I would like to write an array to a geotiff with Python script using the GDAL module. When I try to do something simple like copying an existing GeoTiff via reading it to an array, then, writing to a ...
0
votes
0answers
10 views

How to integrate multiple tile outputs generated from gdal2tiles into a single google map

Todo Generated tiles from image1.tif - done Generated tiles from image2.tif - done Need to overlay these 2 sets of tiles on top of google maps - this is the problem gdal2tiles generated ready-made ...
0
votes
0answers
7 views

gdal_retile for big mosaic file

I have some big mosaic files (about 3GB, 50k x 50k) and use gdal_retile.py to generate the pyramid tiles for geoserver. It takes very long time to generate all tiles (about one day in my computer). ...
2
votes
1answer
315 views

Unsupervised raster classification using GDAL

Is there an equivalent in GDAL to the Arcpy ISO data unsupervised classification tool, or a series of methods using GDAL/python that can accomplish this?
2
votes
1answer
249 views

gdal_calc works but I get a Python error at the end of each process

I have a problem while using gdal_calc by a .bat file. Here is the code : call "C:\OSGeo4w64\bin\o4w_env.bat" gdal_calc -A"D:\tuilage_script_1\tuilage\ndvi\4_810000_6370000_820000_6360000_ndvi....
1
vote
2answers
534 views

Import error: no module named _gdal_array

I am using python 2.7 and have gdal installed. I want to read an entire .jpg image at once and so I used statement import gdal from gdalconst import * driver = gdal.GetDriverByName('JPEG') driver....
0
votes
0answers
24 views

Unable to generate tiles using gdal2tiles.py for a single band gray image

I am using and playing around with Cesium at the moment, and I am enjoying the functionality so far. I am trying to provide my own imagery to Cesium with the TMS imagery provider: imageryProvider: ...
2
votes
3answers
90 views

GDAL error in R path.expand(path): invalid 'path' argument

Using windows 10. I would like to stick to using R since that's where a lot of my pre-processing and analysis will take place for a bigger project. I have downloaded a number of MODIS files for the ...
1
vote
1answer
18 views

How do I convert WKT geometry from 3D to 2D

I'm working with kml files using Python gdal.ogr module. When I extract feature's geometry using feature.GetGeometryRef(), I get: POLYGON ((44.184069865521963 41.971859752507207 0,44.355248797385123 ...
1
vote
1answer
57 views

gdal/python WriteArray working for 8-bit but not 16-bit

I'm trying to use GDAL/python API to open a raster, do some math, then write the two resulting arrays as rastes. One is to be an 8-bit raster and the other 16-bit signed. However, only the 8-bit ...
3
votes
1answer
24 views

merge two tiles of Worldclim data with gdal_merge.py - Nodata

I am trying to merge two tiles of the worldclim data in geotiff format, which I want to subsequently work with in the raster package in R. When I use gdal's gdal_merge.py script: gdal_merge.py -v -o ...
0
votes
0answers
11 views

gdalwarp fails based on output filename? does it have to do with my using -t_srs?

I am so confused by what is going on with my gdal warp. From my terminal I can enter a command for it: $gdalwarp -t_srs '+proj=ortho +datum=WGS84' test_imagery/Maui/OBS_IMAG.nitf testout3.tif ...
1
vote
1answer
48 views

GDAL python cut geotiff image with geojson file

I wrote the function which cutting geotiff image by bounding box. First image is original. At second you can see result off my code. I don't use gdalwarp or any console utilities. But I have no idea ...
4
votes
1answer
210 views

Tabulate Area using GDAL and Numpy

How could I perform a Tabulate Area using GDAL and Numpy? I am trying to summarize how many pixels of each class in a Landcover raster are within each polygon of a Census Blocks shapefile. I've ...
2
votes
1answer
43 views

Clip raster with shapefile and set a value outside the mask

I want to clip a raster using a shape file with the command: gdalwarp -cutline INPUT.shp INPUT.tif OUTPUT.tif from this answer. However I want to set the pixels outside the mask to a particular ...
1
vote
0answers
42 views

Is there any difference between gdal_proximity.py and ArcGIS Euclidean Distance?

The gdal_proximity.py description says: The gdal_proximity.py script generates a raster proximity map indicating the distance from the center of each pixel to the center of the nearest pixel ...
1
vote
1answer
1k views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
3
votes
1answer
100 views

GDAL Python cut geotiff image

I was stuck for 2 or 3 days. I have read many lectures from RS/GIS Laboratory of Utah State University. Also I read «Python Geospatial Development» book and many docs from gdal.org. So, my problem ...
1
vote
1answer
186 views

Accessing bands in .pix (PCIDSK) file in python/arcpy

I am trying to perform zonal statistics on a single band from a multi-band raster in .pix format. I have things working great with a tiff file. I am able to access the bands using this code: desc = ...
5
votes
2answers
2k views

how would one get the end points of a polyline?

I am attempting to write a script to get the end points of a series polylines, and then use those end points to create a polygon. I'm not sure which tools to begin to use on this project. I would ...
1
vote
2answers
33 views

python gdal - libgdal.so.1: undefined symbol: sqlite3_column_table_name

I just reinstalled my python environment (and my whole Ubuntu). In python (or IPython), when loading geopandas: import geopandas as gpd or when I import fiona: import fiona I get this error ...
1
vote
2answers
189 views

Error Installing GDAL python package on a MAC

I'm trying to install the [GDAL python package][1] on a Mac (OSX Yosemite) with python 2.7.9 and GDAL 1.11.3. When I try $ sudo easy_install GDAL I get a number of errors ending with: error: Setup ...
1
vote
2answers
479 views

gdalwarp changing value in nodata pixels

I'm using gdalwarp to convert MODIS NDVI mosaics from Sinusoidal to epsg:4326. To save space I'm using VRT files until I reach the final product. Here is my workflow. Mosaic NDVI Modis tiles using ...
1
vote
1answer
1k views

Importing Census TIGER Shape Files to SQL Server 2012?

I've been doing my research on how to import shape files into Microsoft SQL Server 2012. and am still unable to figure out how to do it after hours of playing around with it. I'll document what I've ...
1
vote
0answers
11 views

how to prepare tiffs to create a netcdf file

I´d like to create a netcdf file containing a mean and stddev for some variables for 12 months. At this moment each geotiff (270MB) is either a mean or stddev of a month. Now my problem is that I ...
4
votes
2answers
84 views

Convert MODIS HDF file in sinusoidal projection into GeoTiff with

I'm looking for a way to convert MODIS LST data from HDF to Tiff format, and reproject from sinusoidal to WGS84 - all using python GDAL. An example file is here (I only care about band 0) : http://...
0
votes
0answers
11 views

How to color a KML with OGR/GDAL?

So I have successfully created a KML file and from an OSM file. Now I would really like to be able to color the lines of the KML file by using a value I calculated by using the KML. I already found a ...
2
votes
1answer
58 views

Using FileGDB in QGIS?

I'm trying to load an ESRI FileGDB of USDA gSSURGO data into QGIS, but I'm having some trouble. I followed the instructions at KyngChaos.com to compile GDAL 1.11 and add the FileGDB plugin (running ...
4
votes
2answers
2k views

Why does ogr2ogr SHP import error out trying to create a database?

All, Can anyone tell me what the error is with OGR2OGR when trying to import a .SHP into MSSQLSPATIAL? ERROR 1: MSSQL Spatial driver doesn't currently support database creation. Please create ...
9
votes
4answers
8k views

Using ogr2ogr to convert GML to shapefile in Python?

I am trying to convert a GML to an ESRI shapefile using ogr2ogr utility in a python script. I have successfully installed the GDAL/OGR package via osgeo but I am now struggling to find/understand ...
0
votes
1answer
588 views

Can't get gdal_merge Python script to run

I downloaded and installed GDAL. I am using Python 27. I had to use the following commands at the IDLE Python GUI: from osgeo import gdal,ogr sys.path.append('C:\Program Files\GDAL') import ...
1
vote
1answer
67 views

Force Python GDAL/OGR to flush changes to disk

I am trying to write a simple list of features and export it as a KML file, adding one extra attribute: in this case trafficability. However, ogr is failing to flush the data to disk when I run the ...
1
vote
1answer
121 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? ...