2013 10:25 PM
To: gdal-dev@lists.osgeo.org
Cc: Pinner, Luke
Subject: Re: [gdal-dev] Working with NTF files
lpinner wrote:
A workaround to your 2nd question is to set the GDAL_PAM_PROXY_DIR
environment variable, either permanently or on the commandline before you
call gdalinfo.
set
Greetings,
Following on from the GDAL 1.10 JP2000 Problem/Crash thread
(http://osgeo-org.1560.x6.nabble.com/gdal-dev-GDAL-1-10-JP2000-Problem-Crash-td5054876.html),
I'm trying to use the GDAL API Proxy and deregister the JP2ECW driver at
runtime to avoid crashes with those Pleiades JP2s. I'm
-Original Message-
From: Even Rouault [mailto:even.roua...@mines-paris.org]
On which OS did you run the above test ? On Linux (and provided that
GDAL_API_PROXY_SERVER is not set to YES or gdalserver) , I get JP2OpenJPEG on
both cases. However on Windows, I would get the same result
Try gdalwarp (http://www.gdal.org/gdalwarp.html) with the -cutline argument.
gdalwarp -of envi -cutline shapefile.shp multibandenvi.dat croppedoutput.dat
Luke
-Original Message-
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Peter Willis
Perhaps something like
for i in {1..49}; do gdal_rasterize -burn -999 -b $i mask.shp 49bandenvi.dat;
done
Luke
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Peter Willis
Sent: Thursday, 18 October 2012 9:43 AM
To: gdal-dev@lists.osgeo.org
See below for Ubuntu instructions (for other distros you could probably grab
the libgdal-ecw-src deb unpack manually and compile).
#Get libecwj 3.3 (the old SDK), it's available from a number of sources.
# If the link below doesn't work, google for libecwj2-3.3
wget -nd
Something like:
gdal_translate –of xyz ingrid outfile.txt
I don’t think MapInfo grids (*.mig) are supported, I couldn’t see that format
listed in http://www.gdal.org/formats_list.html
Luke
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of
newFeature.SetField('name', uCalle Garbí, 2.encode('utf-8'))
Luke
-Original Message-
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Iván Sánchez Ortega
Sent: Monday, 18 April 2011 9:17 AM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev]
You are running into a python gotcha -
http://trac.osgeo.org/gdal/wiki/PythonGotchas
Your reference to the feature is going out of scope when you use the
firstgeom = layer.GetFeature(0).GetGeometryRef() syntax. The
following works syntax fine:
feat = layer.GetFeature(0)
firstgeom =
To: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] ogr.UseExceptions() doesn't raise an exception
ona non-existant dataset
On 10/21/2010 04:58 AM, Pinner, Luke wrote:
OGR doesn't raise an exception on attempting to open a non-existant
dataset even if ogr.UseExceptions() has been called, GDAL
OGR doesn't raise an exception on attempting to open a non-existant
dataset even if ogr.UseExceptions() has been called, GDAL does though.
Is this intentional or a bug?
GDAL version = 1.7.2
from osgeo import gdal,ogr
gdal.UseExceptions()
ogr.UseExceptions()
ds=ogr.Open('foo')
#No exception
The datasource ds is still going out of scope as it is local to your
getLayer2 function.
Lots of ways to avoid this. Try not wrapping it up in a function, or
return a tuple of datasource and layer e.g.
def getDSandLayer(shape_fullname):
ds = ogr.Open(shape_fullname, 0)
layer =
Well elevation, particularly bathymetry, is an obvious application for
colourmaps for negative data.
Marco, I deal with colourmaps with negative values using the LUT vrt
element instead of the ColorTable element.
See below, (note the data is a single band raster, but the VRT exands
this to 3
It's the output from the ArcGIS Write Features to Text File (Samples)
tool. The format is documented here:
http://help.arcgis.com/EN/ArcGISDesktop/10.0/help/index.html#//00pv0
00z00.htm
Even ESRI use Python to read/write it :)
Apparently it's deprecated though...
Luke
-Original
The NetCDF driver computes the pixel centre from lat/lon variables (see
http://trac.osgeo.org/gdal/ticket/1506).
Is this correct or should it compute pixel upper-left?
Using the example NetCDF dataset attached to the above ticket
(http://trac.osgeo.org/gdal/attachment/ticket/1506/out.nc),
The following module might help, use the mapToPixel() function.
#---Imports
try:
from osgeo import gdal
except ImportError:
import gdal
def mapToPixel(mx,my,gt):
''' Convert map to pixel coordinates
@param mxInput map x coordinate (double)
@param myInput map
Hi all,
Not strictly a GDAL issue as such, I'm just posting this to publish a
workaround (as I couldn't find much info about this issue) so apologies
in advance.
Using GDAL 1.6.3 (OSGeo4W).
The standard ERDAS ECW/JPEG2000 SDK redistributables (NCSEcw.dll
etc...) crash when opening ECW/JP2
Something like the following perhaps?
gdal_translate -projwin 0 90 180 -90 g0-360.tif g0-180.tif
gdal_translate -projwin 180 90 360 -90 -a_ullr -180 90 0 -90 g0-360.tif
g-180-0.tif
gdal_merge[.py] -o g-180-180.tif g0-180.tif g-180-0.tif
Regards
Luke
From:
You could easily roll your own.
from osgeo import gdal
class GdalDataType(object):
def __init__(self, nbits, Float, Complex):
for i in range(0,gdal.GDT_TypeCount):
self.DataType=None
DataType=i
DataTypeName=gdal.GetDataTypeName(i)
if self.DataType is None: raise TypeError, 'No matching DataType
found'
gdt=GdalDataType(nbits=32, Float=True, Complex=False)
print gdt.DataTypeName
-Original Message-
From: Pinner, Luke
Sent: Thursday, 29 October 2009 10:21 AM
To: 'Luca Fasano'; gdal-dev@lists.osgeo.org
Subject: RE: [gdal-dev
Hi all,
Opening ALOS AVNIR-2 PRISM (CEOS format) images using GDAL is really
slow and uses loads of memory on Windows XP. This includes things like
gdalinfo and opening via the python bindings (gdal.Open()).
I've tried (on WinXP) with various gdal installs (fwtools, osgeo4w,
basic binaries) and
Something like the following might get you started (note: limited testing and
I'm no programmer :)
#buffer.py
import sys,os
from osgeo import ogr
def buffer(infile,outfile,buffdist):
try:
ds=ogr.Open(infile)
drv=ds.GetDriver()
if os.path.exists(outfile):
22 matches
Mail list logo