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
16
votes
2 answers

can't import gdal in python?

I have gdal installed and running on Ubuntu Jaunty but I can't run gdal2tiles because I get the error: Traceback (most recent call last): File "/usr/local/bin/gdal2tiles.py", line 42, in import gdal ImportError: No module named…
AP257
  • 89,519
  • 86
  • 202
  • 261
15
votes
5 answers

GDAL install on Mac OS X Lion

I'm trying to install GDAL 1.7.1 on Mac OS X Lion using: python setup.py build python setup.py install and get the error: running build running build_py running build_ext building 'osgeo._gdal' extension llvm-gcc-4.2 -fno-strict-aliasing…
Benjamin
  • 11,560
  • 13
  • 70
  • 119
15
votes
1 answer

Ubuntu 16.04 R Installation: configure: gdal-config not found or not executable

System info: Ubuntu 16.04 64 bit I'm trying to install rgdal_1.2-16.tar.gz for a research project. I looked here and did sudo apt-get install libgdal1i R CMD INSTALL rgdal_1.2-16.tar.gz * installing to library ‘/usr/local/lib/R/site-library’ *…
Nathan majicvr.com
  • 950
  • 2
  • 11
  • 31
15
votes
3 answers

Install GDAL in virtualenvwrapper environment

I tried to install gdal (pip install gdal)in virtualenvwrapper environment but I got this error : error: command 'gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for gdal Failed to build gdal I…
GeoCom
  • 1,290
  • 2
  • 12
  • 33
15
votes
2 answers

Which C++ library for ESRI shapefiles to choose?

Does anyone have an experience in processing (reading) ESRI shapefiles from C++? I have found at least 2 open source libraries: ShapeLib C library and OGR. Which one is better? Does anybody used one of them? How about the experience?
Sergey Borodavkin
  • 285
  • 1
  • 3
  • 7
14
votes
4 answers

Having trouble installing GDAL for python

Let me start by saying that I have searched for help this problem and gone through the numerous threads that I have found, and none of them have worked, or I wasn't able to understand what they are saying to do. Once such thread is here: Python GDAL…
wfgeo
  • 2,716
  • 4
  • 30
  • 51
14
votes
5 answers

"No Disk" error using GDAL from C#/.NET

I am using Tamas Szekeres builds of GDAL including the C# bindings in a desktop GIS application using C# and .net 4.0 I am including the entire GDAL distribution in a sub-directory of my executable with the following folder structure:…
Blue Toque
  • 1,775
  • 13
  • 24
13
votes
3 answers

Django: Could not find the GDAL library (OSX)

After my old macbook died I am transferring across a Django Webapp I'd been building to my new machine (which is a MacBook Pro M1 2021). I am currently in the process of reinstalling the correct packages and extensions for the app. However I am…
deadant88
  • 920
  • 9
  • 24
13
votes
4 answers

GDAL, ogr2ogr "Cannot find proj.db" Error

I've tried to extract certain country from the world shp file from natural earth. I am currently using windows 10, so I installed python 3.7, gdal to use the ogr2ogr. I typed the below code in the command to extract the south korea ogr2ogr -f…
Yang JongHyun
  • 133
  • 1
  • 1
  • 6
13
votes
1 answer

Package missing in Alpine Linux even though it's listed on package repo website

I am attempting to build out a Docker container that runs Alpine Linux with GDAL and the necessary Python hooks: FROM python:3.6-alpine RUN apk update RUN apk add py-gdal gdal RUN pip install uwsgi RUN mkdir /code WORKDIR /code COPY…
nerdenator
  • 1,265
  • 2
  • 18
  • 35
13
votes
1 answer

Get feature extent using gdal/ogr

This feels like something that should already have a function to do easily, but I can't find one. What I'm ultimately trying to do: I have a shapefile with 3 features that show bounding boxes; I want to use one of those features to select all the…
Jessica
  • 505
  • 1
  • 3
  • 11
13
votes
9 answers

No module named _gdal

I am trying to run a Python script test.py to test the gdal library. The script contains the line: from osgeo import gdal At that line I get the traceback: File "~/test.py", line 9, in from osgeo import gdal File…
PyNerd
  • 645
  • 2
  • 9
  • 19
12
votes
3 answers

GeoDjango can't find gdal on docker python alpine based image

I am creating a geodjango container (based on Python alpine official image) with gdal. When starting the container, I get the following error: >>> from django.contrib.gis import gdal Traceback (most recent call last): File "", line 1, in…
lpofredc
  • 151
  • 1
  • 7
12
votes
1 answer

python: perform gdalwarp in memory with gdal bindings

I currently have a processing chain in R which downloads MODIS data and then calls gdalwarp from the system to reproject a specific subdataset (e.g. NDVI) into WGS1984. The resulting GeoTiffs are then collected into an HDF5 file for further…
Val
  • 6,585
  • 5
  • 22
  • 52
12
votes
2 answers

What is relationship between GDAL, FDO and OGR?

Their documentations are simple and professional. But they don't mention too much about the relationship between these open source projects. When should I use which one? And which one is suitable for what scenario? If you are a GIS developer who is…
Cui Pengfei 崔鹏飞
  • 8,017
  • 6
  • 46
  • 87