GDAL is an open source translator library & utilities for raster geospatial 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.
1
vote
1answer
128 views
How to extract a WCS layer with gdal_translate?
There is a certain WCS layer that I'd like to save it to my local computer for analysis.
According to GDAL WCS driver draft:
"Accessing a WCS server is accomplished by creating a local service ...
1
vote
1answer
157 views
GDAL 1.9.1 ogr2ogr KML to PostGIS not incuding ExtendedData
I have a KML file utilizing a Schema in the document and ExtendedData in each placemark. The ExtendedData does not seem to pass in conversion to PostGIS or shapefile.
Any assistance would be much ...
1
vote
2answers
2k views
Get extent of Georeferenced Rasters in Python and output to polygon shapefile
I would like to create a shape file containing the extents of each of the rasters in a directory. Is it possible to capture the extent of a raster using Python?
I have tried
...
10
votes
1answer
589 views
Understanding the Map Tile creation properties
I am trying to create a tile base map.
I have an image that I want to create the tile from and I am using GDAL.
I managed to create the tiles but when I view the result it seems that the tiled map ...
5
votes
1answer
484 views
GDAL RasterizeLayer Doesn't Burn All Polygons to Raster
I am trying to burn a shapefile to a raster using GDAL's RasterizeLayer. I pre-create an area of interest raster from a different shapefile, given a specific pixel size. This AOI then serves as a base ...
5
votes
2answers
232 views
Adding noise to a raster
I want to add some fine-grained noise to a raster in an automated python process (i.e. I do not want to use Photoshop or GIMP). I looked at PIL, but unless I'm mistaken, it doesn't seem to have any ...
5
votes
2answers
1k views
How can I turn a shapefile into a mask and calculate the mean?
I have been using python to process huge arrays stored as netcdf files. I would like to calculate the mean of an area defined by a shapefile.
I have just installed GDAL but if there are other tools I ...
5
votes
1answer
233 views
Clarification of the “25D” option in ogr2ogr
[EDIT: In my original post, I had received an error that was based on a typo, so I scrapped that part of the question, but left the questions that still apply.]
In the ogr2ogr docs it says:
-nlt ...
4
votes
1answer
118 views
Update PostGIS after updating GDAL?
I am using PostGIS 2.0 and I want to use the raster functionality through mapserver. It seems as if the latest official GDAL release 1.9.1 has an unstable PostGIS raster driver, as pointed out in a ...
4
votes
1answer
136 views
How to convert a png with known bounds from Plate Carree to Mercator with GDAL
I have a png image that shows the region defined by the geo bounds UpperLat, LeftLon, BottomLat, RightLon (in degrees & -ve for West Lon and South Lat) in Plate Carree EPSG:4326. I want to convert ...
4
votes
2answers
296 views
How to fix a raster with wrong Eastings?
I get an error when trying to warp a tif file in QGIS:
ERROR 1: Too many points (35721 out of 35721) failed to transform, unable to compute output bounds.
I am using QGIS 1.7.0 Wroclaw with gdal ...
3
votes
1answer
470 views
How do you open shapefiles with ogr2ogr
I'm following along the D3 tutorial, and on this line:
ogr2ogr \
-f GeoJSON \
-where "adm0_a3 IN ('GBR', 'IRL')" \
subunits.json \
ne_10m_admin_0_map_subunits.shp
run into the following ...
3
votes
1answer
109 views
How to run OSgo4W shell script on Windows?
I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
3
votes
1answer
165 views
ogr2ogr / GDAL remove features in FileGDB while in use by ArcGIS Server map service
I'm using ogr2ogr to pull features out of Oracle and put them into a File GeoDatabase. The FGDB is being used by an active ArcGIS Server map service. This is all done for performance / reducing DB ...
2
votes
1answer
69 views
OGR - Weird GeomType -2147483645 on polygon shapefile
I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:
datasource = ogr.Open("c:\\temp\\data.shp")
...
2
votes
1answer
123 views
gdal.py as part of bat script in windows 7
I need to run the following bat file from a MS4W shell which has gdal_retile.py as the final option. I have added C:\ms4w\python\gdal to my pythonpath but within a pyscripter shell I can not import ...
2
votes
2answers
136 views
--optfile not working with gdal_retile?
I have the following gdal_retile command I am trying to run, but it errors on the --optfile:
gdal_retile.py -v -r bilinear -levels 8 -ps 512 512 -co "tiled=YES" -targetDir pyramid --optfile files.txt
...
2
votes
1answer
510 views
Qgis - How to change GDAL version
im working on Ubuntu 12.04 server; i noticed this when i installed additional support for ECW format into the GDAL 1.9.1 which worked ok. Then i tried to add ECW files to Qgis but it said they still ...
2
votes
1answer
721 views
Convert area from square meters to degrees globally
I have a global raster file with 3600x1800 pixels. I don't have any information about the projection used.
The raster contains one band with a quantity with the unit "per square meter". How can I ...
2
votes
3answers
541 views
Batch script converting and resampling orthophotos
I would like to convert more than 300 orthophotos produced at scale 1:8.000 with a pixel size of 0.8m X 0.8m from Ecw format to Tiff format and after resampling pixel values.
My aim is to batch ...
2
votes
1answer
344 views
Finding lat/lon of corners of geotiff file
I am a GIS newbie. I just recently managed to turn a GeoTIFF file into a bmp file using gdal_translate. Now I need to find the latitude/longitude coordinates of the corners. I would prefer to use ...
1
vote
1answer
219 views
GDAL: C++ API to Convert Text file of Coordinate points to Raster Pixel line?
I am using GDAL to "Grow" areas form starting seed points. I have a text file listng the coordinates of my seed locations. The X,Y coordinates are in the coordinate system of a raster image. I want ...
1
vote
1answer
342 views
Filtering a raster by pixel value with GDAL
I have downloaded Globcover data in GeoTIFF format. I want to create a new grid which only has values where the Globcover data (the only band in the TIF file) has one certain value (==190).
Can I do ...
1
vote
2answers
878 views
ogr2ogr srs options: where is the well known definition determined?
In the ogr2ogr documentation it says that when using -a_srs srs_def:
Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT ...
0
votes
0answers
328 views
How to add ECW support to GDAL bundled with PostGIS Windows
I'm currently trying the new raster functionalities of PostGIS 2.0 and I successfully imported some GeoTIFF file into PostGIS (although it only find one band so it's all black and white for some ...
