Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

0
votes
0answers
17 views

Loading shapefile into Oracle Spatial using GDAL and C++? [on hold]

How do I use GDAL (2.2) to connect to Oracle Spatial, and load shapefile (GIS data *.shp) into Oracle Spatial using C++?
1
vote
0answers
22 views

How can I stop single pixel nodata values propagating through a tile pyramid when using gdal2tiles?

I am using gdal2tiles_parallel.py to generate a tile pyramid from a single geotiff with nodata value set. I have noticed that if I have a small hole in the original geotiff (say single pixel), then I ...
-3
votes
0answers
16 views

GRASS GIS Intro at GEOSTAT 2018 - Tutorial is not reproducible in Windows [on hold]

I am trying to follow and complete the tutorial found int the following link for GRASS GIS Intro - Analysing ECA&D climatic data However, I am having a lot of trouble following it because the ...
1
vote
0answers
31 views

How to change black edge into transparent edge using GDAL?

I am trying to make seaice map in the Arctic Ocean. I used a code like this. gdal_translate -outsize 100% 100% -a_nodata value -co format=png -of KMLSUPEROVERLAY input.tif output.kmz However when ...
0
votes
0answers
23 views

Error when importing data source from web using GDAL/OGR in GRASS 7.4.1

I am running the latest bundle of OSGeo4W with GRASS 7.4.1 I am following the tutorial in the following URL: Analysing the ECA&D climatic data, where I am trying to import data from web using ...
1
vote
1answer
32 views

R dissagregate method in python

It seems an easy question, but I can't find the Python equivalent of R's Dissaggregate: Disaggregate a RasterLayer to create a new RasterLayer with a higher resolution (smaller cells) I expected ...
0
votes
1answer
32 views

Vectorize raster

I'd like to vectorise the Natural Earth II raster in order to be able to change its colours and display it with as a vector map. Using gdal_polygonize.py won't help as it will create 1 polygon per ...
-1
votes
0answers
19 views

Transfer data from postgres database to SQL database using GDAL

I am new to GDAL and have been uploading CSV crime data to a postgis database using ogr2ogr. ogr2ogr -f "PostgreSQL" -lco GEOMETRY_NAME=geometry -lco FID=gid PG:"host=server user=user dbname=dbname ...
0
votes
1answer
30 views

Installing osgeo (“osgeo not found”)

I'm using Win10 (with the bash shell) and one of my python scripts requires gdal/osgeo. I ended up trying multiple install methods (gdal was successful with all of them, but I couldn't use osgeo), ...
1
vote
1answer
24 views

Deleting empty Geometry in shapefile using GDAL command-line GDAL utilities?

How empty geometries be deleted from shapefile using the command-line GDAL utilities?
0
votes
0answers
37 views

Using GDAL to clip data from Oracle Spatial to SHP has unwanted attribute data

I am using GDAL Library ogr2ogr to export data from Oracle Spatial to ShapeFile and also clipping it as per Bounding Box extents. The geometric clipping is working fine, but the output dbf file ...
3
votes
1answer
59 views

Problem with gdal algorithm process

Last week I try unsuccesfully to install the plugin to open ecw files in QGIS 3.2.on Ubuntu 18.4. Since then GDAL algorithms are not working for rasters. I have the exact same error for all of them: ...
0
votes
0answers
16 views

Reading Sentinel 1a SLC data using GDAL in Python3.6

I am reading Sentinel 1a SLC data using GDAL package in Python. I am able to access Metadata from the manifest.SAFE file and intensity from .tif files, but I am more interested in fetching the I and ...
0
votes
1answer
19 views

gdalinfo and other applications not running through Anaconda Prompt

I am using GDAL 2.0.3(installed through wheel) in Anaconda 4.2.0 with Python 3.5 installed. I am able to import GDAL in my code. But whenever I am trying to run gdalinfo and other applications(such ...
1
vote
0answers
22 views

rasterio & cogeo

I am trying to use rasterio to read cloud-optimized geotiff stored in a gc bucket. With method 1, GDAL makes use of the overviews and read is quick. Unfortunately, if the extent is not fully included ...
0
votes
1answer
34 views

GDAL - Unable to convert to Web Mercator using gdalwarp

I am making geoTIFs of weather data (for a Mapbox overlay) and I am converting them to web mercator for use on the map. The images were generated from the same source file and both images have the ...
1
vote
2answers
55 views

Getting RGB values of each pixel in a LANDSAT 8 GeoTIFF with Python 3

I'm working with a set of LANDSAT 8 Collection 1 Tier 1 GeoTIFFS pulled from Google Earth Engine, and I need to find the RGB values of every pixel in this GeoTIFF. I've tried using the code from ...
1
vote
1answer
44 views

Efficient downsampling with GDAL?

I have a 350go GeoTIFF file with DEM data for the entire world. (a mix of SRTM, EUDEM, etc. ...) This TIFF file is tiled with a block size of 256*256. I would like to downsample this file to a lower ...
1
vote
0answers
30 views

ValueError: array is too big

I'm trying to get the value of a pixel from a coordinate. The problem is when I use a large image, so this error appears Traceback (most recent call last): File "D:\algoritmo\teste_read_2.py",...
1
vote
0answers
17 views

reprojection and write grib files

I'm working on GRIB file, In input, I have the file with data from 0 to 360°. As gdalwarp does not write GRIB file (only gdal_translate), I use gdal warp to projct data from [0,360] & [-90;90] to ...
1
vote
0answers
32 views

Using GDAL tools to convert GeoTIFF for Mapbox use

(Edit) I have added a link to the files needed to reproduce problem (unzips to 180MB TIFF) : https://www.dropbox.com/s/qrrlsjlmafctt38/issue.zip?dl=0 I have been working on a project the past few ...
0
votes
1answer
47 views

How to polygonize raster file according to band values?

I want to polygonize a raster by using GDAL in python. I found this webpage below: https://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html#polygonize-a-raster-band But it creates a polygon ...
1
vote
1answer
32 views

GDAL Planet data request returns “HTTP error code: 411”

I've been able to successfully download Planet scenes through the Open California initiative without any issues until yesterday. Here is an example where I'm trying to get the metadata of a scene: ...
2
votes
1answer
22 views

GDAL processing of GRIB2 raster prints hundreds of unsuppressable warnings

I am processing some GRIB2 raster files from NCEP (weather model stuff). An example file would be: http://nomads.ncep.noaa.gov/pub/data/nccf/com/hiresw/prod/href.20180906/ensprod/href.t00z.conus.mean....
0
votes
1answer
33 views

Reproject full swath data with VRT files

I am attempting to follow the following link to reproject swath data to a grid. http://geoinformaticstutorial.blogspot.com/2014/06/reading-and-map-projecting-amsr-2-data.html In this link it is ...
1
vote
0answers
24 views

Cutting TIFF in QGIS 3.0.2 produces an empty Raster

I am currently trying to cut a georeferenced TIFF image by using a Polygon as cutting boundary. Both are saved in EPSG 25832. When running the algorithm from the Raster - > Extract menu it runs and ...
0
votes
0answers
57 views

GDAL interpolation ignores edges with nodata vals

I have a grib file with weather data in 0.25-degree resolution and I want to upsample its higher resolution. I used gdalwarp: gdalwarp -t_srs EPSG:3857 -of GTiff -wo SOURCE_EXTRA=1000 -wm 2000 --...
1
vote
0answers
50 views

Export PostGIS geom polygon to PNG

I am trying to build a REST API using Flask and Postgis. I have a PostGIS table with a GEOM column. Querying the table using ST_AsGeoJSON gives me a MULTIPOLYGON with lat, lon in WGS84. [('...
2
votes
0answers
13 views

How to get raster metadata use Geotools just as gdalinfo do?

Is there anyway to get raster file's metadata, such as pixel size and nodata value of a GeoTIFF file, use GeoTools in a Java program? Now, I can get the Coordinate Reference System and Envelope's ...
1
vote
1answer
21 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 ...
0
votes
0answers
18 views

Import _gdal_array error. Version 2.3.1 2018 Where to find _gdal_array.py?

There is a lot of posts similar to this one, but all are fairly old, and give solutions that no longer apply. I compiled GDAL. The error when I try band.ReadAsArray() is: ImportError: cannot import ...
1
vote
2answers
52 views

Convert Raster to vector - create polygons based on each pixel

I want to convert a raster file (100x100m pixel size) which contains population counts as pixel values. I need a vector based file of the 100x100m grids and the population as attributes. I tried ...
1
vote
1answer
42 views

Very large VRT file generated by gdal after cutline

In Python, I generate a virtual raster using gdal warp with a cutline as per below gdal.Warp(warpedFilePath, ds, format = 'VRT', cutlineDSName = csvFilePath, srcNodata = 0, dstAlpha = True, ...
3
votes
2answers
64 views

Coordinate reference system transformation

I am looking to transform the CRS of the geometry from my initial shapefile data to standard lat-long coordinates - espg 4236. Here's the geopandas dataframe: I wrote some script below that ...
1
vote
1answer
52 views

How do I create a line with fixed size from a single point in QGIS?

My question pretty much sums up my problem. Basically, I have a layer containing points: And I need to convert them into lines with fixed size (25 meters). I don't care if the point will be taken as ...
1
vote
0answers
11 views

Creating polar-stereographic projection of HDF data subset?

I have an HDF4 file. I would like to create a geotif file containing a polar-stereographic projection of one of the HDF4 data sets. I've tried using gdalwarp. This works for some projection types, ...
0
votes
0answers
19 views

How to get pixel position of a location, given latitude and longitude, in Python 3? [duplicate]

I have a sentinel-1 GRD product, downloaded from Copernicus. I have used a shapefile created in QGIS and used 'gdalwarp' to crop it. Now, I'd like to open that file in Python using gdal or some other ...
3
votes
1answer
50 views

Randomly sample from geopandas dataframe in python

I am reading a shapefile as geopandas dataframe and them using pandas subset method to select a region. geodata = gpd.read_file(bayshp) geodata.dtypes geodata.head(10) OBJECTID FIPSSTCO ...
0
votes
0answers
14 views

how to remove black border pixels of georeferenced image without affecting interior pixels using GDAL python [duplicate]

I'm trying to remove the black border from the Geotiff image. The problem is that the value of the pixel border (0) also exists inside the image i tried this but it doesn't work Removing black ...
2
votes
0answers
27 views

No processing tools in QGIS 3.2 [duplicate]

I recently upgraded to QGIS 3.2 and followed the install instructions carefully. Under the raster and vector menus I have only 1 tool for vector and only 3 for raster. No analysis, geometry, ...
1
vote
1answer
119 views

Installing GDAL with Anaconda

I just did a fresh install of Anaconda3 and am trying to add GDAL/OGR. I've tried installing with both conda install gdal and conda install -c conda-forge gdal. In both cases, the install completes ...
2
votes
0answers
38 views

Error while converting raster into vector in QGIS

I am using QGIS 2.18.23 and trying to convert a raster file (.tif) into a vector file (.shp). But I am getting an unusual error: 2018-08-28T12:41:38 1 Traceback (most recent call last): ...
0
votes
0answers
9 views

gdal tranparent doesnt work

i trying to create another geotiff file with another arrays, cols and rows like an first tiff, it doesnt matter, i got a problem with transparency, the 4 band is alpha and i set it to 0, but it ...
1
vote
0answers
33 views

Min-max stretch using gdal_translate in a batch

I'm trying to do a min-max stretch on a raster and save it using gdal_translate. The syntax requires to enter source min and max raster values as arguments for a -scale option: -scale [src_min ...
1
vote
0answers
38 views

Best format for GDAL to ESRI

I'm trying to create a 30 meter, Int16 raster covering the entire continental US using Python/GDAL. This raster will ultimately be used to do raster algebra in ArcMap by downstream users. Ordinarily ...
0
votes
0answers
9 views

Error GDAL HDF5 Amazon linux

For the installation GDAL and HDF5, I followed the information of "http://hdfeos.org/software/gdal.php" I'm trying to transform an image *.h5 to *.tiff using GDAL, execute "/tmp/bin/gdal_translate /...
1
vote
0answers
30 views

Is it possible to create .OVR (like by gdaladdo) as smooth as QGIS oversampling feature of raster layer?

I found Hugolpz's tutorial for creating a GeoTIFF that contains grayscale with an alpha band. Creating transparent hillshade? # filter the color band, keep greyness of relevant shadows below limit ...
0
votes
0answers
19 views

gdal.Warp workingType option default

I have been using gdal.Warp() in Python 3.6 for some time now and have just noticed the workingType option (see here for gdal.WarpOptions()). From its definition: workingType --- working type (...
0
votes
0answers
45 views

Displaying a raster layer (Sentinel-2) MapServer/WMS

I have a lot of raster data Sentinel-2, I need to display them on the map with MapServer/WMS. when I saved the data as images through the QGIS, they were displayed correctly, because as much data I ...
-1
votes
1answer
27 views

Why can't I specify a special geomfield using ogr2ogr

my command like this: ogr2ogr -f "GEOJSON" -geomfield "the_geom" /Users/ziwen/work/test/ttt.geojson "PG:host=localhost dbname=g-default user=postgres password=xxxxxx" -sql "select * from data.city" ...