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

2
votes
1answer
14 views

Does GDAL has any substitute function for the ExtractByMask in arcpy

I am now using arcpy: arcpy.sa.ExtractByMask(weight_raster,elev) both weight_raster and elev are raster data in different size. I want to use functions in GDAL to replace this arcpy methods. Does ...
0
votes
0answers
9 views

How to get linestringe from kml into shp or postgis [duplicate]

Im looking into extracting linestrings from a kml file into a shp file or postgis db. Each linestring would be a feature/row. How would I go about it usinge ogr2ogr or python? I'd like to get ...
1
vote
0answers
7 views

Gdal+Geos point in polygon test fails under MinGW64

I have to build a grid of points and remove the points that falls inside a polygon. Polygons are defined in a ESRI shapefile, points are in a list. This is how I make the test: OGRLayer *layer = ...
0
votes
0answers
25 views

Old GDAL/OGR version with QGIS from ubuntugis in 14.10?

Installing QGIS 2.6 from ubuntugis installs an old GDAL/OGR (ogrinfo --version GDAL 1.10.1, released 2013/08/26) - it should be 1.11 for support of the Open FileGDB connector in QGIS 2.6 So I don't ...
2
votes
0answers
14 views

ogr2ogr fileGDB translating points

I am converting data from spatialite to fileGDB (and reverse) for a project using QGIS and ArcGIS. When I convert using ogr2ogr (or QGIS) from spatialite to fileGDB, the points are translated ...
1
vote
1answer
32 views

How to save changes in Feature-Geometry with GDAL/OGR and Python? (Segmentation fault)

I have a problem with my code: driver = ogr.GetDriverByName('ESRI Shapefile') dataSource = driver.Open('merge.shp', 0) if dataSource is None: print 'Could not open file' sys.exit(1) layer = ...
0
votes
1answer
14 views

d.rast -o failed after successfully imported.

I imported a geotiff raster using GUI grass, it was successful. (Thu Nov 20 15:55:35 2014) r.in.gdal input=C:\Users\Administrator\grassdata\kavaja\JPEG_8.tif output=JPEG_8 Projection of input dataset ...
0
votes
0answers
18 views

How to create a 8Bit unsigned geotiff with gdal?

I'm trying to create a 8 bit geotiff with this code. Is there a way to use unsigned 8 bit? I only found the GDT_UInt16? import numpy as np from osgeo import ogr, osr, gdal from osgeo.gdalconst ...
0
votes
1answer
30 views

Python buffer in a line using GDAL

I am trying to make a buffer from a line using gdal. I use the example in the gdal Cookbook import ogr, os def createBuffer(inputfn, outputBufferfn, bufferDist): inputds = ogr.Open(inputfn) ...
1
vote
1answer
29 views

How do I convert a TIF to EPSG:3857

I'm trying to convert this TIF to EPSG:3857, but when I run: gdalwarp -of GTiff -s_srs epsg:4326 -t_srs epsg:3857 -co "tfw=yes" original.tif converted.tif I just get a black TIF do you know what I ...
0
votes
5answers
52 views

Aligning Raster Over the Polygon

I have a raster image which have to be aligned over the polygon. Both the raster and polygon have the same coordinate system. The figure shows the raster image which has to be fitted over the RED ...
0
votes
0answers
14 views

Projection of COSMO-EU?

I have data points of COSMO-EU data stored in WGS84 coordinates. Now I try to transform them into coordinate system where the points becomming arranged to a regular grid. Does anybody knows the Proj4- ...
1
vote
1answer
31 views

Using GDAL's GetProjection information to make a coordinate conversion in pyproj

I'm opening a geoTIFF file in Python using gdal. Upon reading with the GetProjection() method, I find the following information ...
0
votes
0answers
29 views

GDAL virtual file system, how to create your own

I just found a blob post about, GDAL virtual file system, and I was wondering if I could create my own and how to do so? I want to create a virtual file system for reading directly from blob storage. ...
1
vote
2answers
66 views

Convert a grid file from one set of coordinate systems to another

I have a grid file in a certain coordinate system. I'd like to change it so I have the same grid in geographic lat/long based on WGS84. This seems like something that gdal can tackle quite easily ...
1
vote
0answers
12 views

Python Band.SetNoDataValue(), sets all bands at once

Can someone tell me what I am doing wrong? I want to set bands 1 and three to 255, and band 2 to 0. The code below only should only set band 2, but gdalinfo shows that all bands get set to 0. Ubuntu ...
2
votes
1answer
38 views

Determine spatial average of several tiff files

I am relatively new to GIS. I have a set of tiff files containing a raster each. I would like to average them, though their extents are slightly different. They each have their geospatial data ...
3
votes
2answers
111 views

Piping data to ogr2ogr

Is it possible to directly pipe data to ogr2ogr? I'm trying to curl a GeoJSON file and pipe it to ogr2ogr to covert it to another format. Without using a pipe, I was able to achieve this by first ...
1
vote
1answer
24 views

Mapping NetCDF CF Mercator parameters to GDAL

I have coordinates on a mercator grid projection from a NetCDF (CF) file. The metadata attributes in the file include : standard_parallel, longitude_of_projection_origin, earth_shape (spherical), ...
3
votes
2answers
63 views

How to create a raster tiff (dem / heightmap) from a mesh of xyz points?

I have to create a terrain heightmap(raster tif preferably) from mesh of xyz ungridded points(in geographical coordinates), I tried taking min and max of bbox of mesh and making width & height by ...
0
votes
1answer
11 views

Merging separate country features together into one region

I am trying to creating a map of the UK where Scotland and England are merged into one shape and not separate shapes for each country. As a minimum working example, I'm following Mike Bostock's Let's ...
0
votes
0answers
43 views

Fiona write crashes

I am trying to write a new shapefile with fiona but after creating the features, i keep getting this output after the program crashes: The program '[6668] python.exe' has exited with code -1073741819 ...
1
vote
1answer
58 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?
0
votes
0answers
8 views

Change “World Size” with gdal2tiles.py

When I use the flag "-p 'geodetic'", the output is a world that is 512x256px at zoom level 0. In order for it to overlay with other datasets, I need it to be 640x320px at zoom level 0. I am looking ...
1
vote
1answer
28 views

Which algorithm does gdal_polygonize use?

I would like to know which algorithm (i.e. Sobel operator ) is used to extract the polygons in gdal_polygonizer. I searched here and here but could not find it. Any help would be appreciated.
2
votes
1answer
85 views

Convert GeoPDF with GDAL

I'm attempting to convert a USGS US Topo GeoPDF in Windows. I'm using GDAL 1.11.1. My initial attempts were with this Python script, which automates the process by feeding a command to the Windows ...
1
vote
0answers
24 views

“fill in” .vrt with missing locations in a mosaic

I have ~2000 NASA SRTM .hgt files. I wanted to join them together in a single mosaic, and to save disk space I used GDAL to create a .VRT rather than a very large GeoTiff. This is read by Mapnik. ...
1
vote
0answers
23 views

different data range of raster file in mapserver and qgis

a NetCDF file with only one band with a data range from [0,1.1]. IDV & QGIS identifies it correctly, however gdalinfo finds the data range [1,26505]. Or could it be possible that gdalinfo is right ...
1
vote
3answers
40 views

Lossless conversion from shapefiles to XML/JSON/Text

I'm a software developer and I need to create a custom tool that imports ESRI shapefiles (shp + shx + dbf), manipulates the content and then exports new shapefiles. To avoid a complex binary reading ...
1
vote
1answer
43 views

Remove values below a given value with GDAL for DEM geo tif files

I have a DEM in GeoTiff format. The processing have made areas that have really low values that I would like to remove. Are there any GDAL tools that could set all values below -30 to NODATA or -30.
2
votes
0answers
26 views

Compression in GeoTiff files with GDAL

I have an output from 3th party program in tif format where gdalinfo gives the following information: Driver: GTiff/GeoTIFF Files: J:\ascend\Lufthavne - ...
2
votes
1answer
45 views

Can ogr2ogr write data to a file geodatabase feature dataset?

I am dumping postgis tables into a file geodatabase and it works great--the result is a file geodatabase full of featureclasses. But is it possible to write these featureclasses into feature ...
2
votes
0answers
28 views

Getting a raster extent excluding nodata area

I have a GeoTiff raster in which half of its area is nodata. The problem is that the raster extent includes the nodata area. Is there a way with GDal to recalculate the extent of the raster excluding ...
0
votes
0answers
40 views

GeoTiff using GDAL

How can I project a tiff using the position of the four corners where the picture have to be placed ? The tiff file has no georeference or projection information I have got a grid with values of ...
2
votes
1answer
36 views

Open Source counterpart to Euclidean Allocation

I'm looking for a function that can perform something similiar to the Euclidean Allocation process in arcGIS ...
1
vote
1answer
18 views

Invoke OSGeo4W commands with Java

I want to use the command gdal_polygonize image.png bla in a Java for-loop, where image.png and bla changes in every iteration. How can I do this? I searched for it on google and stackexchange and I ...
0
votes
0answers
29 views

Google Tracks convert kml to shape and preserve attributes

I've been attempting to convert a Google Tracks kmz file to an ESRI shapefile using the GDAL and libkml(http://www.gdal.org/drv_libkml.html) which I built on my Ubuntu 14.04 (64-bit) system. The kml ...
2
votes
1answer
25 views

gdaldem output file size explodes

I want to create a color-relief and a hillshade with gdaldem and use them with mapnik. System: Ubuntu 14.04 LTS Server, gdal-bin 1.10. Here are my steps: Download all SRTM tiles from ...
2
votes
0answers
25 views

Diminishing performance of gdal_polygonize in a python subprocess for GRASS to PostgreSQL

I have written a python script to polygonize GRASS rasters into a PostgreSQL database using the gdal utility gdal_polygonize: sub.call('gdal_polygonize.py -8 gdb/quercus/{0}/cellhd/{1} -f ...
2
votes
1answer
62 views

Gdal/QGIS resampling asc file

I have a DEM (.asc) file with a resolution of 1000 meters per pixel. Therefore the file has a lot of columns and rows. I would like to chance the resolution per pixel from 1000 to 3000 meters per ...
0
votes
1answer
43 views

Tools/Software for QA/QC of data

I currently have written a few custom scripts that run basic checks (null values, geocoding errors, fullness of metadata) using Arcpy(10.2 with almost all licenses) and gdal. I'm interested to know ...
2
votes
1answer
51 views

Export PostGIS line to AutoCAD with graphical direction information

Some time ago I managed to export from PostgreSQL to AutoCAD DXF format a line (LINESTRING) using ogr2ogr program with a PostgreSQL Query, and it works (I can visualise it by the QuantumGIS). Now I ...
0
votes
1answer
37 views

gdal_polygonize unable to open PNG

I use OSGeo4W on Windows 7 (64 bit) and included libpng16.dll When I try C:\OSGeo4W64\bin>gdal_polygonize star.png bla I get the following error: ERROR 4: `star.png' does not exist in the file ...
4
votes
0answers
60 views

Working with MODIS in R

I am new to using MODIS data and was hoping to get some help starting out. I have been able to download the hdf file but viewing it in R has been a problem for me. What I have found so far, and ...
0
votes
2answers
55 views

building GDAL with libKML support

I'm attempting to import a kml/kmz file generated using Google Tracks into my QGIS 2.4 system (built with GDAL 1.10). KML files currently lose all attributes, and as such I'm attempting to build GDAL ...
2
votes
1answer
64 views

Re-project from Polar projection to EPSG:4326

I simply want to project a polar stereographic raster (EPSG:3411) to Mercator (EPSG:3857) or WGS84 (EPSG:4326). The data I is from NOAA. $gdalwarp -s_srs EPSG:3411 -t_srs EPSG:3857 northpsg.20141027 ...
0
votes
0answers
21 views

Script Efficiency

I have been working on a script to read pixel values and print the values out to a text file. This is currently working but takes around two hours with a 6.6gb file. This is to replace an older script ...
1
vote
0answers
39 views

Extract polygons of PNG with GdalOgrInJava

I have PNG pictures with polygons of different colours on them. What I plan to do is to extract these Polygons using the polygonize function (see here) Then I will try to encode the polygons in ...
1
vote
1answer
34 views

GDAL external overviews not recognized by ArcGIS

I am adding external overviews to a number of TIF files with GDAL as follows: gdaladdo -ro file.tif 2 4 8 16 --config COMPRESS_OVERVIEW LZW Then, when I add the tif file to ArcGis is still asking ...
1
vote
1answer
67 views

Could not open/read USGS raster file

I could not open/read the following .img file. The document below says it is a raster file. http://edc2.usgs.gov/1KM/land_sea_mask.php I tried to open it using many ways such as Q-Gis software, and ...