Questions tagged [gdal]

GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.

GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.

2184 questions
136
votes
10 answers

Error: gdal-config not found while installing R dependent packages whereas gdal is installed

Please point out the point that I am missing: openSUSE 11.3 xx@linux-y3pi:~/Desktop/R> sudo R CMD INSTALL rgdal_0.7-12.tar.gz root's password: * installing to library ‘/usr/lib64/R/library’ * installing *source* package ‘rgdal’ ... ** package…
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411
58
votes
2 answers

Numpy - Replace a number with NaN

I am looking to replace a number with NaN in numpy and am looking for a function like numpy.nan_to_num, except in reverse. The number is likely to change as different arrays are processed because each can have a uniquely define NoDataValue. I have…
Jzl5325
  • 3,898
  • 8
  • 42
  • 62
58
votes
2 answers

Obtain Latitude and Longitude from a GeoTIFF File

Using GDAL in Python, how do you get the latitude and longitude of a GeoTIFF file? GeoTIFF's do not appear to store any coordinate information. Instead, they store the XY Origin coordinates. However, the XY coordinates do not provide the latitude…
Phanto
  • 1,147
  • 5
  • 16
  • 19
48
votes
4 answers

python GDAL 2.1 installation on Ubuntu 16.04

Here will be my sequence of command lines while trying to install gdal2.1 in a UBUNTU virtual machine. My virtual machine is a UBUNTU 16.04 LTS(64bit) I would need gdal2.1 and especially the Python bindings to work with it in python. The versionof…
Antonio
  • 589
  • 1
  • 4
  • 5
44
votes
1 answer

How to fix symbol lookup error: undefined symbol errors in a cluster environment

I'm working on some python code that extracts some image data from an ECW file using GDAL (http://www.gdal.org/) and its python bindings. GDAL was built from source to have ECW support. The program is run on a cluster server that I ssh into. I have…
agnussmcferguss
  • 485
  • 1
  • 4
  • 10
39
votes
6 answers

Error while installing GDAL

I'm trying to install GDAL through pip. But I'm getting this error: extensions/gdal_wrap.cpp:3089:27: fatal error: cpl_vsi_error.h: No such file or directory #include "cpl_vsi_error.h" ^ compilation terminated. error:…
Rahul
  • 3,208
  • 8
  • 38
  • 68
35
votes
8 answers

readOGR() cannot open file

wmap <- readOGR(dsn="~/R/funwithR/data/ne_110m_land", layer="ne_110m_land") This code is not loading the shape file and error is generated as Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, : Cannot open…
Ritesh Jung Thapa
  • 1,177
  • 2
  • 13
  • 20
34
votes
8 answers

Downsample array in Python

I have basic 2-D numpy arrays and I'd like to "downsample" them to a more coarse resolution. Is there a simple numpy or scipy module that can easily do this? I should also note that this array is being displayed geographically via Basemap modules.…
wuffwuff
  • 730
  • 2
  • 9
  • 19
31
votes
1 answer

Rasterizing a GDAL layer

Edit Here is the proper way to do it, and the documentation: import random from osgeo import gdal, ogr RASTERIZE_COLOR_FIELD = "__color__" def rasterize(pixel_size=25): # Open the data source orig_data_source = ogr.Open("test.shp") …
Luper Rouch
  • 9,304
  • 7
  • 42
  • 56
30
votes
3 answers

trouble installing "sf" due to "gdal"

I can't install the package "sf" on R. Seems there is an issue with gdal. No idea how to resolve it. > install.packages("sf") There is a binary version available but the source version is later: binary source needs_compilation sf 0.4-3 …
invictus
  • 1,821
  • 3
  • 25
  • 30
28
votes
5 answers

How to set the GDAL_DATA environment variable to point to the directory containing EPSG csv files?

I want to wrap(re-project) one variable in this netcdf file. D:\ gdalwarp -t_srs EPSG:4326 NETCDF:"C:\fie.nc":var "C:\Desktop\SM.img" But I get this error: ERROR 4: Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment…
sacvf
  • 2,463
  • 5
  • 36
  • 54
26
votes
1 answer

Gdal Installation error using pip

Im trying to install GDAL latest version using pip, but im getting the following error, Failed building wheel for GDAL. My python version is 2.7.9, Please help me. It is installing gdal 1.11.3 version if i specify the version but i need latest…
Satya Chandra
  • 728
  • 2
  • 12
  • 26
26
votes
4 answers

Trouble installing rgdal

I want to install rgdal for "R version 3.2.3 (2015-12-10)". I downloaded and installed GDAL 1.11 Complete PROJ framework v4.9.2-2 GEOS framework v3.5.0-1 from KyngChaos Then in RStudio I typed install.packages("rgdal") which gave me this: > ....…
four-eyes
  • 10,740
  • 29
  • 111
  • 220
24
votes
3 answers

Shapefile into geojson conversion python 3

output_buffer = [] for features in range(0,layer.GetFeatureCount()): feat = layer.GetNextFeature() geom = feat.GetGeometryRef() result = feat.ExportToJson() output_buffer.append(result) When I convert into geojson, I get output, but…
Vas
  • 395
  • 1
  • 3
  • 13
24
votes
7 answers

Python GDAL package missing header file when installing via pip

I'm trying to install gdal from pip pip install gdal inside a virtual environment (Ubuntu). It fails because it cannot find cpl_port.h extensions/gdal_wrap.cpp:2853:22: fatal error: cpl_port.h: No such file or directory compilation…
Kevin
  • 1,113
  • 3
  • 12
  • 26
1
2 3
99 100