答复: [gdal-dev] different result of ogrinfo between GDAL/OGR and FWTools
Randy
randyqiuxy at hotmail.com
Mon Oct 12 07:23:15 EDT 2009
Hi Yilmaz,
Thank you very much!!
Now, my application and ogrinfo from GDAL/OGR works well after setting GDAL_DATA environment variable and changing the version.
Frank is right, the question should be needed in FAQ. I think this is my fault and I'm sorry to disturb everyone.
And I want to say "Thank you!" to Frank、Mateusz、Chaitanya and Jukka.
-----邮件原件-----
发件人: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] 代表 Yilmaz Arslanoglu
发送时间: 2009年10月11日 21:59
收件人: gdal-dev at lists.osgeo.org
主题: [?? Probable Spam] [gdal-dev] different result of ogrinfo between GDAL/OGR and FWTools
Hi Randy;
Did you check that you set the GDAL_DATA configuration correctly?
If it is the case, then here is the previous answer from Frank:
"This might be accomplished by setting the GDAL_DATA configuration
variable either via the environment or the CPLSetConfigOption()
function. Were you using ogrinfo from an environment like
OSGeo4W or FWTools that sets up the environment carefully?"
And my question was:
---------------------------------
Hello everybody;
First of all, I would like to say that I am quite new in S-57 format
and GDAL/OGR libraries.
As a starting point, I downloaded the source codes and built the whole
GDAL library on my computer,
using the "nmake" of Visual Studio 2008.
Now:
poDS = OGRSFDriverRegistrar::Open( "US5LA24M.000", FALSE );
for (int i = 0; i < poDS->GetLayerCount(); i++)
printf("layer %d: %s\n", i, poDS->GetLayer(i)->GetLayerDefn()->GetName());
When I try to list the layer names of a datasource with the code snippet above,
I get the following result:
layer 0: DSID
layer 1: Point
layer 2: Line
layer 3: Area
layer 4: Meta
However, the utility application "ogrinfo" gives a quite different
result as follows:
(when run with command "ogrinfo US5LA24M.000" )
1: DSID (None)
2: ACHARE
3: BCNLAT (Point)
4: BCNSPP (Point)
5: BUISGL
...
...
...
49: M_QUAL (Polygon)
50: C_ASSO (None)
I examined the source code of "ogrinfo" under the "gdal-1.6.2\apps\"
directory, however,
I could not find a difference in terms of listing the layers in the dataset.
What could be the problem, is there a point that I'm missing?
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list