Questions tagged [gdal]

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 useful commandline utilities for data translation and processing.

Filter by
Sorted by
Tagged with
1
vote
1answer
27 views

gdalwarp to change block size also changes pixel values

I'm working with a GeoTIFF from http://www.fao.org/geonetwork/srv/en/main.home?uuid=ba4526fd-cdbf-4028-a1bd-5a559c4bff38 The original has data values from 0-11: $ gdalinfo -hist ./data/FAO/...
0
votes
0answers
18 views

Seeking documentation for GDAL_ERROR 0

I'm trying to use vsis3 to access a raster remotely. I had a lot of issues having to install curl with http2 support and dealt with a bunch of issues with package versions and what not but I'm still ...
0
votes
0answers
24 views

Different color interpreter for Planet Images

I'm trying to merge a set of Planet Imagery with gdal, but I'm getting Warning 6: gdalbuildvrt does not support heterogeneous band characteristics. Skipping ./out2.tif. After checking gdalinfo I ...
0
votes
0answers
24 views

Error “Too many points failed to transform, unable to compute output bounds.” using gdal2tiles

I want to generate tiles from a GeoTIFF file using gdal2tiles. gdal2tiles.py input.tif when I try the above command I got the following error Too many points (10201 out of 10201) failed to ...
2
votes
1answer
114 views

Changing pixel size from raster by value

How to change pixel size from raster by value using PyQGIS or Python GDAL? I tried to using SAGA GIS Tool Resampling: ext2 = rasterLyr2.extent() xmin = ext2.xMinimum() xmax = ext2.xMaximum() ymin = ...
0
votes
1answer
38 views

Loading color table (.csv) file to interpret raster data using C#?

I have a raster (GeoTIFF .tif file) that is stored in three bands (Red, Green, Blue), with each band's data type as a byte. I have a separate color table in the form of a .csv file, that stores a ...
1
vote
0answers
17 views

Retrieving individual pixel height data given color table/relief data and color shaded relief map using C# and GDAL?

I am using C# GDAL/OGR/OSR bindings. I have a GeoTIFF file where each pixel is stored as a color in a Red, Green, and Blue raster band. I have a color table/color relief file (.csv) which I am able to ...
1
vote
1answer
65 views

Adding two rasters in modeller

I'm trying to build a process model which uses a series of raster operations - Rasterize, Proximity, Raster Calculator. However, I couldn't seem to add two consecutive raster calculator processes. ...
6
votes
3answers
6k views

Install GDAL extension in GeoServer

I am trying to install the GDAL extension (I want to use ECW files in GeoServer). So here is what I did so far: 1) downloaded the GDAL extension and extracted to: C:\Program Files (x86)\...
0
votes
1answer
72 views

How do I crop a TIFF down to a specific region?

I have two TIFFs that have the same pixel size. One of them is geolocated inside the other. I would like to crop the larger one down to the exact same extent as the smaller one. Is this possible with ...
14
votes
2answers
8k views

Splitting shapefile per feature in Python using GDAL?

is it possible to split a shapefile per feature in python? (best would be a solution where i can temporarily save the resulting vector objects to the memory instead to disk). The reason: I want to ...
0
votes
1answer
47 views

Remove Angle or Projection in GDAL

I am completely new to GeoData so this might be somewhat of a silly problem, but I am having a problem with the angle GeoTIFF images tend to come with. I am collecting satellite images for a deep ...
0
votes
1answer
20 views

FileGDB write support for GDAL/OGR in macOS

I am using macOS Mojave and Homebrew with latest update. I have tried to install gdal 3.0.1 and filegdb plugins via homebrew-osgeo4mac tap as below: brew tap osgeo/osgeo4mac brew install osgeo-gdal ...
2
votes
0answers
26 views

Use color map from .tif.aux.xml from ArcGIS in QGIS

I have a raster file (.tif) of different ecosystem types (from natureserve). Each value corresponds to a different type. I'm trying to get a table of those attributes and colors. The file includes (...
2
votes
2answers
1k views

Showing only raster attribute table using GDAL?

I have a binary ArcGRID raster (AIG/Arc/Info Binary Grid) with an attribute table. I would like to get only this attribute table but gdalinfo outputs also projection information and bounds and then ...
0
votes
1answer
41 views

GDAL/OGR losing OSM closed way features that OGR2OGR imports

I have managed to import an OSM PBF file into QGIS using ogr2ogr -> SQLite and then importing layers using the GUI- (essentially as per the first step in this answer : ogr2ogr -f "SQLite" -dsco ...
0
votes
0answers
7 views

Warping large virtual mosaic into a small raster results in IntegerOverflow error

I'm coming across an interesting situation using gdalwarp. I have a very large virtual mosaic with varying resolutions of source files. I use this virtual mosaic to create smaller rasters using ...
1
vote
0answers
41 views

Python Rasterio not recognized as a supported file format [duplicate]

I'm trying to run this python code with anaconda. I have an error that I can not solve. I try execute this tutorial : https://towardsdatascience.com/satellite-imagery-access-and-analysis-in-python-...
1
vote
0answers
42 views

raster2pgsql fail with JPEG encoded image

The problem I have one JPEG encoded raster that works in GDAL and QGIS. The original file 05-D Braga.jpg is available online. The CRS is EPSG:20790. To upload it to Postgis, I use: raster2pgsql -s ...
0
votes
1answer
102 views

Preventing GDAL-dissolve from ignoring attribute encoding?

Given a huge shapefile which needs desolving by one attribute field to reduce redundancy. The GDAL dissolve functionality does that quite swiftly but the output attributes change the encoding so äöü ...
3
votes
1answer
99 views

Run GDAL on android and perform operations

Could one run gdal on android devices to perform some GIS operation, like viewshed, contours, etc?
1
vote
0answers
19 views

Interpolating VRT to Geotiff using gdal.Grid in Python creates null image

I have a set of points with X, and Y coordinates and associated Z values POINT (-102.9071045 31.43453407 1871.930298) POINT (-102.8339386 31.45111084 1856.14209) POINT (-102.4687424 31.53144836 1869....
0
votes
1answer
220 views

How I can remove the gap between the mosaic image

I tried to mosaic the 2 Landsat images through (gdal_merge.py stacklayer.tif stacklayer_1.tif -o mosaaic.tiff) following output come How I can remove the gap although there projection is same ...
0
votes
0answers
21 views

Clip two shapefiles in Python using only OGR results in error Segmentation fault (core dumped)

Is it possible to clip two polygon shapefiles using only the ogr library? It has to be a native Python solution, so subprocess.call(['ogr2ogr', '-clipsrc', ...] ) is not what I'm looking for. ...
0
votes
0answers
33 views

Degradation of the quality of a raster after publishing to GeoServer [duplicate]

I'm trying to publish a satellite raster (.tif) into GeoServer and display it in a web application using OpenLayers. I tried to use many procedures but without any good results. This is the original ...
2
votes
1answer
114 views

Specifying pyproj lat and lon in radians

I'm using pyproj to do some conversions: import pyproj myprojection=pyproj.Proj('+proj=gnom +lat_0=1 +lon_0=1 +R=1.') print myprojection(30,30) Out: (0.5480783303637778, 0.6353400942474053) Now I ...
0
votes
1answer
452 views

Getting OGR to work on a Mac

I downloaded GDAL on my Mac (running Mojave 10.14.1) through Homebrew and I'm having trouble getting OGR to work with Postgresql. When I try the following to create a geojson from gpx files I have, I ...
1
vote
2answers
45 views

Converting BMP image into TAB MapInfo format using MapXtreme?

I am developing a plugin for MapInfo and I have BMP image with all the prop and I have rectbounds. I have done through GDAL using the below solution. But I am not getting proper output which I am ...
3
votes
1answer
22 views

How can I build GDAL without the static libraries?

Background I'm building GDAL myself, because I need it linked against libkml, with: wget -O gdal.tar.gz "https://github.com/OSGeo/gdal/archive/${GDAL_VERSION}.tar.gz" tar --extract --file gdal.tar....
0
votes
1answer
76 views

Recurring system crash while using GDAL Georeferencer in QGIS 2.18

I am currently working on aerial images I have to reference in QGIS. I usually use the GDAL tool for that, but during the last days, QGIS crashes all few minutes whenever I use it. I ran into this ...
0
votes
1answer
99 views

Reprojecting GeoTIFF from WGS84 to UTM with gdalwarp?

I have a GeoTIFF image in WGS84 and when I try with gdalwarp to reproject to UTM, it has a problem. Size of TIFF is J: 15769, W: 60027 J_LeftTop:2.0705046510 W_LeftTop:0.4974727391; J_RightTop:2....
30
votes
5answers
28k views

How to get raster corner coordinates using Python GDAL bindings?

Is there a way to get the corner coordinates (in degrees lat/long) from a raster file using gdal's Python bindings? A few searches online have convinced me that there is not, so I have developed a ...
2
votes
0answers
47 views

Errors opening Geospatial PDF in QGIS 3.8.3

I'm a complete QGIS newbie so bear with me if I'm missing something obvious... I'm unable to open GeoPDF's that I've downloaded from USGS's The National Map (TNM) site. This is the error that I get ...
0
votes
0answers
18 views

On converting raster image to tiles using GDAL the initial image is blurred

On converting a raster image to tiles using GDAL the initial image is blurred. I have followed this tutorial. My image is getting converted into tiles but the raster initial image is blurred (see ...
1
vote
0answers
34 views

How to fix rasterio error: The EPSG code is unknown. Unable to open EPSG support file gcs.csv

I try to open a jp2 image with the Python's Rasterio package. The code is below. The problem is that the coordinate reference system is not recognised and when I want to see the meta attribute of the ...
2
votes
1answer
55 views

Creating a vector tileset from a vector GeoPDF

I have a georeferenced PDF published by the USFS. It appears to have been created using Esri ArcMap, and all of the labels and linework appears to be in vector format. Is there any way to convert ...
1
vote
0answers
40 views

GDAL open failed-4

In SPHY mdel preprocessor (modules to process) i am facing a problem of GDAL Open Failed-4 (snap is attached). What could be the reason for this problem and how to resolve this issue?
1
vote
1answer
188 views

Java unsatisfied link error at runtime

I'm getting an unsatisfied link error when running gdal.AllRegister() in my java application running on AWS Lambda. java.lang.UnsatisfiedLinkError: /var/task/lib/libgdaljni.so: libgdal.so: cannot ...
1
vote
1answer
73 views

Reproject NetCDF file using gdalwarp?

I'm trying to convert this file to EPSG:3857 with this command: gdalwarp -t_srs EPSG:3857 S2A_rhow_l2r.nc test-proc.nc Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute Warning 1: Several ...
1
vote
1answer
83 views

gdalwarp: differentiate between empty-in-source and outside-of-cutline?

I'm using gdalwarp to clip a polygon out of a map layer using --crop_to_cutline. The original map layer has a lot of empty pixels (well, transparent / alpha=0, to be precise). As it stands, my output ...
2
votes
2answers
1k views

QGIS 3.0 - No GDAL Tools work

In QGIS 3.0, none of my GDAL raster tools work (toold in Raster Analysis, Raster Conversion, etc). I've been able to find workarounds because many of these tools are available in other toolboxes. ...
1
vote
1answer
25 views

Get shortest/fastest path between two points from SpatialLines(DataFrame)

I have a large rivernetwork as a SpatialLines(DataFrame) and want to subset it so I get a SpatialLine with only the shortest/fastest path between two SpatialPoints(DataFrame) which propably need to be ...
0
votes
0answers
25 views

Converting from netCDF to GeoTiff using gdal_translate

gdal_translate netcdf_file.nc output.tif I'm trying to generate a GeoTiff using this command, and it works... kind of. The output tif image is just black and white, and I'd like actual colors on the ...
2
votes
1answer
51 views

Making polygon shapefile from unsorted point shapefile?

I have a point Shapefile with unsorted feature ID's (FID). I want to convert the same point file into polygon Shapefile by using python gdal/ogr. I got the help from link1 and link2. I'm able to make ...
1
vote
0answers
37 views

Getting inconsistent raster output from gdal_calc.py raster calculation

I'm attempting to do what is generally a straightforward raster calculation when I do this in QGIS, but am trying to do this with gdal_calc.py in terminal. The output is close, but produces banding ...
1
vote
0answers
38 views

Mathematical rule to convert between degrees and centimeters based upon projection

I have some Tanzania drone imagery data in a local geographic projection EPSG:32737 that uses the unit of meters. Then I have other vector data that is in EPSG:4326 which is denominated in degrees. In ...
1
vote
1answer
41 views

How to convert GeoTIFF to array of normalized (0 - 1 range) values using C# GDAL Nuget Package?

I currently have a Unity3D tool that allows users to import different heightmap files into the Unity3d Game Engine, in order to produce Unity Terrain objects. The tool currently has limited support ...
0
votes
1answer
32 views

Batch processing of GDAL clip function

When I am trying to batch process GDAL clipping in QGIS 2.18 with 30 raster files I get the following Error: GDAL command output: ERROR 1: Cannot compute bounding box of cutline. My ...
31
votes
5answers
8k views

How to reproject raster from 0 360 to -180 180 with cutting 180 meridian

I have a geotiff raster image that has a coordinate system with longtitudes from 0 to 360. The horizontal center of the image is 180 longtitude. See image below: I want to transform it to EPSG:4326 ...
1
vote
1answer
45 views

Converting Longitude range from (0,360) to (-180,180) in Python or by using gdal commands

I have a raster downloaded. Visualising it in QGIS. I want to correctly project it so that its extent varies with longitudes from -180 to 180 instead of 0 to 360. gdalinfo filename.nc outputs the ...