Re: [gdal-dev] Of errors and their treatment in bindings

2010-09-17 Thread Howard Butler
On Sep 17, 2010, at 7:12 AM, Ari Jolma wrote: > Folks, > > I added binding to VSIStatL (my idea is to start using ReadDir from GDAL and > I need to know if something is a file or a directory). Why not use the more natural (to you the Perl programmer) facilities your language provides for dete

Re: [gdal-dev] OGR C API Help needed

2010-09-17 Thread Stephen Woodbridge
Nevermind, all is good. It helps if you execute the new code and not the one in the path! -Steve On 9/17/2010 7:42 PM, Stephen Woodbridge wrote: Hi all, I am stumped by this. I am trying to copy a shapefile and append a new attribute column to it. The loop below adds all the existing fields

[gdal-dev] OGR C API Help needed

2010-09-17 Thread Stephen Woodbridge
Hi all, I am stumped by this. I am trying to copy a shapefile and append a new attribute column to it. The loop below adds all the existing fields, but the code following does not add the new field. I have been trying to figure this out for hours and I assume it is something really stupid tha

RE: [gdal-dev] With Python bindings, should geometry objects created by ogr.Geometry() be explicitly destroyed?

2010-09-17 Thread Jason Roberts
(Just a side note: Another way that the GDAL Python bindings differ from typical Python libraries is the need to call gdal.UseExceptions() to have exceptions be raised when errors occur, and the need to explicitly call gdal.ErrorReset() in the exception handler, or the same error will keep occurrin

[gdal-dev] With Python bindings, should geometry objects created by ogr.Geometry() be explicitly destroyed?

2010-09-17 Thread Jason Roberts
I have some Python code that uses OGR geometry objects internally, creating them like this: point = ogr.Geometry(ogr.wkbPoint) Does this code need to explicitly destroy these geometries, like the following, to avoid leaks, or can it simply allow them to go out of scope and have Python's ref

Re: [gdal-dev] can't import osgeo or gdal in python

2010-09-17 Thread Christopher Barker
Jeff Hamann wrote: I built gdal-1.7.2 with the following configure options: 1) What version of OS-X, python, etc. are you using -- there are way too many! If nothing else, make sure that the gdal build and your testing are happening with the same python. 2) Can you use the pre-built frame

Re: [gdal-dev] gdal_calc.py

2010-09-17 Thread Howard Butler
On Sep 17, 2010, at 9:29 AM, Chris Yesson wrote: > Hi all, > > I have been playing around with a python/gdalnumeric-based raster calculator > for a while now (http://static.zsl.org/files/gdal-calc-1218.py). > I thought it was time to try to share this properly via GDAL. > > Could this go on

Re: [gdal-dev] gdal_calc.py

2010-09-17 Thread Ivan Lucena
Hi Chris, That sounds good. Is that by any chance based on this idea here: [http://trac.osgeo.org/gdal/wiki/SummerOfCode]? Regards, Ivan > ---Original Message--- > From: Chris Yesson > To: gdal-dev@lists.osgeo.org > Subject: [gdal-dev] gdal_calc.py > Sent: Sep 17 '10 09:29 >

[gdal-dev] Using TMS driver to connect to a WMTS

2010-09-17 Thread Chris Bailey
Has anyone looked into the possibility of configuring the GDAL TMS driver to connect to a WMTS using the REST interface specification? I am interested in supporting WMTS but did not know of any public servers. I just saw this announcement: http://my.opera.com/tastle/blog/2010/07/12/first-public-o

[gdal-dev] can't import osgeo or gdal in python

2010-09-17 Thread Jeff Hamann
Hi list, First, let me say, I'm *not* a python person, so please be gentle with your assumptions. I built gdal-1.7.2 with the following configure options: $ ./configure \ CC="gcc -arch i386" \ CXX="g++ -arch i386" \ OBJC="gcc -arch i386" \ F77="gfortran -arch i386" \ FC="gfortran -arch i3

[gdal-dev] gdal_calc.py

2010-09-17 Thread Chris Yesson
Hi all, I have been playing around with a python/gdalnumeric-based raster calculator for a while now (http://static.zsl.org/files/gdal-calc-1218.py). I thought it was time to try to share this properly via GDAL. Could this go on the sample python scripts directory? Could I get advice on

Re: [gdal-dev] Re: problem with unwanted white space in input file list for gdalbuildvrt

2010-09-17 Thread Fabrice LALLAURET - PSV
Le 09/16/2010 02:51 PM, Jukka Rahkonen a écrit : Fabrice LALLAURET - PSV external.thalesgroup.com> writes: Hi all, I try to use some gdal tools in a batch file on windows and I've a strange side effect. Here is a little batch use with fwtools 2.4.7. @echo off echo "Test 1 with file list

Re: [gdal-dev] gdal_translate distorts PROJCS specification ?

2010-09-17 Thread Frank Warmerdam
Sjur Kolberg wrote: Output of second GDALINFO, note the “-1.#INF” instead of 0 under the SPHEROID label. ... SPHEROID["Sphere",6367470,"-1.#INF"], Sjur, I believe this is a problem with sphere representation in the RST driver. I see a similar problem if I do: gdal_translate -o

[gdal-dev] gdal_translate distorts PROJCS specification ?

2010-09-17 Thread Sjur Kolberg
Dear experts, I have a grib2 file which I try to convert to IDRISI, extracting band 1. Somehow the PROJCS section is distorted, leaving the IDRISI file useless for warping. Windows 7, GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19 I use the following sequence of commands: gdalinfo har04_00_ex

Re: [gdal-dev] gdal_grid from contour

2010-09-17 Thread Frank Warmerdam
ahmet temiz wrote: thank you I am sorry but I am not clear. how shall we integrate elevation data if we burn vectors to all nodata ? Ahmet, You need to create a blank file for the study area - with all pixels set to a nodata value. Then you burn the contours in with gdal_rasterize. The pix

Re: [gdal-dev] gdal_grid from contour

2010-09-17 Thread ahmet temiz
thank you I am sorry but I am not clear. how shall we integrate elevation data if we burn vectors to all nodata ? regards 2010/9/17 Frank Warmerdam > ahmet temiz wrote: > >> hello >> >> Does gdal_grid have a capability of generating dem from elevation contour >> lines ? >> >> > Ahmet, > > The

Re: [gdal-dev] gdal_grid from contour

2010-09-17 Thread Frank Warmerdam
ahmet temiz wrote: hello Does gdal_grid have a capability of generating dem from elevation contour lines ? Ahmet, The normal way of generating a DEM from contour lines with GDAL is to burn the contours into a blank (all nodata) file with gdal_rasterize and then to fill in the areas between

[gdal-dev] Of errors and their treatment in bindings

2010-09-17 Thread Ari Jolma
Folks, I added binding to VSIStatL (my idea is to start using ReadDir from GDAL and I need to know if something is a file or a directory). That requires, in my mind, a new typemap, which I call RETURN_NONE_TRUE_IS_ERROR as the VSIStatL in port returns 0 on success but it does not call CPLErr

[gdal-dev] gdal_grid from contour

2010-09-17 Thread ahmet temiz
hello Does gdal_grid have a capability of generating dem from elevation contour lines ? regards ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev