Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-18 Thread Jürgen E . Fischer
Hi Even, On Fri, 18. Feb 2011 at 01:02:30 +0100, Even Rouault wrote: This is going to be quite painfull since you have to do this for each GDAL method you bind, and be careful to correctly pair CPLPushErrorHandler() / CPLPopErrorHandler() (the later being the easiest to forget in unsuual

[gdal-dev] Re: GCP list projection

2011-02-18 Thread Vadim Shlyakhov
Frank Warmerdam warmerdam at pobox.com writes: In theory it could make sense to have a dataset with a dataset level SRS and geotransform, and also GCPs with a different SRS. In some cases the GCPs are in a particular SRS (say lat/long) just because it is a convenient coordinate system to

Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-18 Thread Roger Bivand
On Fri, 18 Feb 2011, Even Rouault wrote: Le vendredi 18 février 2011 01:02:30, Even Rouault a écrit : So my suggestion would be not to use a global error handler set when RGDAL is initialized, but rather for each binding of the GDAL API, install a local error handler with

Re: [gdal-dev] Re: GCP list projection

2011-02-18 Thread Chaitanya kumar CH
Vadim, (0,1,0,0,0,1) is the default transform and will be returned even in case of an error. On Fri, Feb 18, 2011 at 2:09 PM, Vadim Shlyakhov vadp.d...@gmail.comwrote: Frank Warmerdam warmerdam at pobox.com writes: In theory it could make sense to have a dataset with a dataset level SRS

Re: [gdal-dev] Segmentation fault using gdal_translate in 1.8.0

2011-02-18 Thread Chaitanya kumar CH
Derrick, I was able to run gdalinfo and gdal_translate on your sample dataset without any error. Can you provide some more details like your platform and the settings you used to compile GDAL? On Fri, Feb 18, 2011 at 9:57 AM, derrick.w...@csiro.au wrote: Hi Kyle, Thanks for the reply.

Re: [gdal-dev] How to reproject a geotiff using osgeo gdal python bindings

2011-02-18 Thread Chaitanya kumar CH
Bill, You can use the -tr option in gdalwarp utility[0] to set the resolution of the target raster. You can look at it's code[1]. [0] http://www.gdal.org/gdalwarp.html [1] http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdalwarp.cpp On Fri, Feb 18, 2011 at 3:51 AM, William Hudspeth

[gdal-dev] open shapefile from server

2011-02-18 Thread Mohammed Rashad
How can I open a shapefile and read the coordinates from it without downloading into client. just as mywebsite.com/shapefiles/myshape.shp and pass this to function as poDS = OGRSFDriverRegistrar::Open( http://mywebsite.com/shapefiles/myshape.shp;, FALSE ); Is it possible in gdal/ogr? I dont

Re: [gdal-dev] open shapefile from server

2011-02-18 Thread Chaitanya kumar CH
Rashad, Read the documentation on VSIInstallCurlFileHandler() in the cpl_vsi.h file documentation. http://www.gdal.org/cpl__vsi_8h.html On Fri, Feb 18, 2011 at 6:38 PM, Mohammed Rashad mohammedrasha...@gmail.com wrote: How can I open a shapefile and read the coordinates from it without

Re: [gdal-dev] open shapefile from server

2011-02-18 Thread Mateusz Loskot
On 18/02/11 14:25, Chaitanya kumar CH wrote: Rashad, Read the documentation on VSIInstallCurlFileHandler() in the cpl_vsi.h file documentation. http://www.gdal.org/cpl__vsi_8h.html Nice features indeedb, but it does not guarantee without downloading the whole file, does it? It depends on what

Re: [gdal-dev] open shapefile from server

2011-02-18 Thread Mateusz Loskot
On 18/02/11 13:08, Mohammed Rashad wrote: How can I open a shapefile and read the coordinates from it without downloading into client. just as mywebsite.com/shapefiles/myshape.shp http://mywebsite.com/shapefiles/myshape.shp and pass this to function as poDS =

Re: [gdal-dev] Re: GCP list projection

2011-02-18 Thread Frank Warmerdam
On 11-02-18 03:39 AM, Vadim Shlyakhov wrote: So, if you have GCP SRS, you don't need SRS set at the dataset level, do you? Vadim, Correct. BTW I've noticed if a dataset doesn't have a geotransform, then ds.GetGeoTransform() returns (0.0, 1.0, 0.0, 0.0, 0.0, 1.0). Is that a feature or a bug?

Re: [gdal-dev] open shapefile from server

2011-02-18 Thread Even Rouault
Le vendredi 18 février 2011 15:53:45, Mateusz Loskot a écrit : On 18/02/11 14:25, Chaitanya kumar CH wrote: Rashad, Read the documentation on VSIInstallCurlFileHandler() in the cpl_vsi.h file documentation. http://www.gdal.org/cpl__vsi_8h.html Nice features indeedb, but it does not

Re: [gdal-dev] Potential dangerous use of CPLSetErrorHandler()

2011-02-18 Thread Roger Bivand
On Fri, 18 Feb 2011, Bob and Deb wrote: Roger, I have only 2 QGIS plugins that uses R. They are Carson Farmer's manageR and Volkan Osman Kepoglu's SDA4P (see http://ggit.metu.edu.tr/~volkan/index.html). Looking at the source code I see they both use rgdal. I was not using these plugins when

Re: [gdal-dev] open shapefile from server

2011-02-18 Thread Mateusz Loskot
On 18/02/11 19:51, Even Rouault wrote: Le vendredi 18 février 2011 15:53:45, Mateusz Loskot a écrit : On 18/02/11 14:25, Chaitanya kumar CH wrote: Rashad, Read the documentation on VSIInstallCurlFileHandler() in the cpl_vsi.h file documentation. http://www.gdal.org/cpl__vsi_8h.html Nice