[gdal-dev] GDAL drivers written in Python

2011-04-06 Thread Knut-Frode Dagestad
Hi, Our group is looking at the possibility to use GDAL with Python bindings for our work with satellite data. One limitation seems however to be missing/incomplete drivers, as we have no capacity to implement new drivers in C. It seems however to me that the Python API allows to create GDAL

Re: [gdal-dev] GDAL drivers written in Python

2011-04-06 Thread Antonio Valentino
Hi Knut-Frode, Il giorno Wed, 06 Apr 2011 09:51:42 +0200 Knut-Frode Dagestad ha scritto: > Hi, > > Our group is looking at the possibility to use GDAL with Python > bindings for our work with satellite data. One limitation seems > however to be missing/incomplete drivers, as we have no capacity

[gdal-dev] Re: GDAL drivers written in Python

2011-04-06 Thread Knut-Frode Dagestad
Thank you for useful comments, Antonio. I agree with you that the ideal thing would be to improve the support of GDAL for our satellite data formats of interest. It would be great if we could combine efforts and get some momentum on this. Several formats (e.g. TerraSAR-X, Envisat ASAR, MERIS

Re: [gdal-dev] Re: GDAL drivers written in Python

2011-04-06 Thread Antonio Valentino
Hi Knut-Frode, Il giorno Wed, 06 Apr 2011 11:58:28 +0200 Knut-Frode Dagestad ha scritto: > Thank you for useful comments, Antonio. > > I agree with you that the ideal thing would be to improve the support > of GDAL for our satellite data formats of interest. It would be great > if we could comb

[gdal-dev] Libgdal Compilation with MinGW

2011-04-06 Thread Rodolfo Bonnin
Hello all, I am trying to compile gdal using CMake with MinGW 4.4, and had the following errors: __ [...]libkml-1.2.0/src/kml/base/file_win32.cc:3 5:19: error: xstring: No such file or directory [...]libkml-1.2.0/src/kml/base/file_win32.cc:4 3:35: error: empty characte

Re: [gdal-dev] help for including category names

2011-04-06 Thread Marcel Derrien
Even, Many thanks for your clear answer that helps the understanding, I will directly associate an .aux.xml instead of using the VRT file for managing category names. I agree that avoiding the .aux.xml would be more convenient. Best regards, --- Marcel Even Rouault a écrit : Marcel, I gues

[gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread canduc17
I have this incorrect code: try { myDataset = (GDALDataset *) GDALOpen( "myimg", GA_ReadOnly ); } catch(int n) { cout << "File not existent!" << endl; return 14; } I would like to catch the exception thrown by GDALOpe

Re: [gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread Howard Butler
On Apr 6, 2011, at 11:04 AM, canduc17 wrote: > I have this incorrect code: > try > { > myDataset = (GDALDataset *) GDALOpen( "myimg", GA_ReadOnly ); > } > catch(int n) > { > cout << "File not existent!" << endl; >return 14; > } >

Re: [gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread Even Rouault
Le mercredi 06 avril 2011 18:09:42, Howard Butler a écrit : > On Apr 6, 2011, at 11:04 AM, canduc17 wrote: > > I have this incorrect code: > > try > > > > { > > myDataset = (GDALDataset *) GDALOpen( "myimg", GA_ReadOnly ); > > } > > catch(int n) > > { > > > > c

Re: [gdal-dev] GDAL drivers written in Python

2011-04-06 Thread Even Rouault
Le mercredi 06 avril 2011 09:51:42, Knut-Frode Dagestad a écrit : > Hi, > > Our group is looking at the possibility to use GDAL with Python bindings > for our work with satellite data. One limitation seems however to be > missing/incomplete drivers, as we have no capacity to implement new > driver

Re: [gdal-dev] Libgdal Compilation with MinGW

2011-04-06 Thread Even Rouault
Looks to me as if it is a problem with libkml compilation, not GDAL... So a libkml mailing list might be a better place to ask advice and/or report bugs. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Libgdal Compilation with MinGW

2011-04-06 Thread Rodolfo Bonnin
I apologize, I've suscribed to many mailing lists the past days, and I confused the destination. Regards. 2011/4/6 Even Rouault : > Looks to me as if it is a problem with libkml compilation, not GDAL... So a > libkml mailing list might be a better place to ask advice and/or report bugs. > --

Re: [gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread Mateusz Loskot
Even Rouault wrote: > Le mercredi 06 avril 2011 18:09:42, Howard Butler a écrit : >> You need to implement your own error handler if you want GDAL to throw >> exceptions when it can open something. > > I would recommand *against* doing that. Throwing exceptions from the GDAL > error handler can lea

Re: [gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread Mateusz Loskot
Even Rouault wrote: > Mateusz Loskot wrote: >> This is interesting. Could you give example? >> How is checking if GDALOpen returned NULL and prematurely exiting >> different to throwing exception? > > The ::Open() method of GDAL drivers is supposed to make all necessary > cleanups, even in case of

Re: [gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread Even Rouault
> This is interesting. Could you give example? > How is checking if GDALOpen returned NULL and prematurely exiting > different to throwing exception? Mateusz, The ::Open() method of GDAL drivers is supposed to make all necessary cleanups, even in case of errors, before returning NULL. But if yo

Re: [gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread Even Rouault
> Even, > > Yes, you are right. I missed you mean the CPLError. In case of custom > throwing handler it will jump out of the context. I do throw exceptions > reacting on GDAL errors, but not from within GDAL internal context, > like the custom handler. Yes, of course you are free to emit C++ exce

[gdal-dev] Geometry.ExportToWKT : numeric precision ?

2011-04-06 Thread Jay Jennings
Hello list, Does anyone know of a way to set the numeric precision on a Geometry.ExportToWKT() call ? For the SRS, we are using EPSG:4326 (WGS-84) so the multipolygon coordinates are in latitude/longitude, and most of the coordinate strings seem to carry 15 digits past the decimal point !! F

Re: [gdal-dev] Geometry.ExportToWKT : numeric precision ?

2011-04-06 Thread Even Rouault
Le mercredi 06 avril 2011 22:51:17, Jay Jennings a écrit : > Hello list, > Does anyone know of a way to set the numeric precision on a > Geometry.ExportToWKT() call ? For the SRS, we are using EPSG:4326 > (WGS-84) so the multipolygon coordinates are in latitude/longitude, and > most of the coordi

RE: [gdal-dev] Geometry.ExportToWKT : numeric precision ?

2011-04-06 Thread Jay Jennings
Even, thanks for the excellent info. I think we may pursue the first option. BTW setting the default precision to (for example) 8 instead of 15 would increase the chance of consecutive identical coordinates in the output string. Do you think ExportToWKT would be smart enough to condense to a si

Re: [gdal-dev] Geometry.ExportToWKT : numeric precision ?

2011-04-06 Thread Even Rouault
Le mercredi 06 avril 2011 23:58:27, Jay Jennings a écrit : > Even, thanks for the excellent info. I think we may pursue the first > option. > > BTW setting the default precision to (for example) 8 instead of 15 would > increase the chance of consecutive identical coordinates in the output > strin

[gdal-dev] ogr2ogr: problems converting from shapefile to kml

2011-04-06 Thread Vishal Mehta
Hi all, I'm having some trouble with a simple conversion from shapefile to kml. Description 1. I need to have a points file in kml that is is EPSG 3857 (the mercator that Google uses) 2. I have a points file in both shapefile as well as kml format, in EPSG 4326 3. Here are the things i tried usin

Re: [gdal-dev] ogr2ogr: problems converting from shapefile to kml

2011-04-06 Thread Even Rouault
Le jeudi 07 avril 2011 00:39:59, Vishal Mehta a écrit : > Hi all, > > I'm having some trouble with a simple conversion from shapefile to kml. > Description > 1. I need to have a points file in kml that is is EPSG 3857 (the mercator > that Google uses) I'm afraid that you are loosing your time. KM

Re: [gdal-dev] ogr2ogr: problems converting from shapefile to kml

2011-04-06 Thread Jeff McKenna
On 11-04-06 8:02 PM, Even Rouault wrote: I'm afraid that you are loosing your time. KML coordinates must be expressed in EPSG:4326 per the spec. See http://code.google.com/intl/fr/apis/kml/documentation/kmlreference.html and specifically : Just for the record, the actual (software-independent)

RE: [gdal-dev] ogr2ogr: problems converting from shapefile to kml

2011-04-06 Thread Vishal Mehta
Thanks Even, I was trying to overlay the kml on top of my crowdmap which uses OpenStreetMaps (which is in EPSG 900913 or 3857) as baselayer. When my kml did not appear, I thought I had to reproject it to the projection of the baselayer.. Looks like the problem lies elsewhere - maybe the ogr2ogr-