Hi Even, I'm not sure why I shouldn't use --format. If I can't use it why is it provided? Can I use --formats? Perhaps I should not handle this in my C#/WinForms but do this in our C++ core. I think we can make a method that would return what I need based on gcore/gdal_misc.cpp but that would rely on hard-coded strings. I don't like that either ;)
For the formats for ogr2ogr I understand I need to use a workaround so I could do that for the gdal formats as well. The whole idea is/was that when we upgrade to a newer version of GDAL/ORG or recompile it with some different settings our tools would automagically use the correct file formats. This needs some more pondering from our side ;) Thanks, Paul 2013/1/2 Even Rouault <[email protected]> > You don't parse the output of gdalinfo --format, do you ? Please don't do > this : > this is really fragile. Imagine what will happen if the output format of > the > utility change in some later version ? (We wouldn't do that just for fun, > but > relying on that is fragile). Rather look at the source code of gdalinfo (or > actually at GDALGeneralCmdLineProcessor() in gcore/gdal_misc.cpp to C > which API > calls are involved. >
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
