If the path to a VRF dataset on Unix contains any upper
case characters the VRF driver is unable to find any
vectors (even though it can find the metadata).
This works fine:
ogdi_info -u gltp:/vrf/usr4/mpp1/v1174/soamafr/lib_174a
-cap -f Line -l 'roadl@trans(*)' -dl
This does not (even though v1174 was renamed V1174):
ogdi_info -u gltp:/vrf/usr4/mpp1/V1174/soamafr/lib_174a
-cap -f Line -l 'roadl@trans(*)' -dl
Note that the second call still returns metadata and
bounds,
and field names but an object count of zero for the
layer.
Reported originally by Reiner Beck
<R.K.Beck@t-online.de>
Logged In: NO
Digging into it, I found that this is due to the name
mangling scheme of
the vrf driver, which does not separate the library base
name from the
dataset folders and file name handling. While the name
mangling seems to be to complex (for me in the vrf library,
there's an easy workaround possible in the vrf driver: The
reason why the dataset is not opened in the second case, is
because the LAT file (which is in the same directory as
H1316010) is not found. Simply trying to open the "LAT" file
after the open of the "lat" failed works for me (see diff
below (150,156d144 / 158,159c146 / 169d155)).
In addition, I found it annyoing that a trailing "/" at the
end of the
dataset name did not work (I like to use the shell expansion
for
pathnames ...). The simple check for the trailing '/' (diff
119,123d118)
resolves this glitch.
Cheers
Reiner
> diff ogdi-3.1.4/ogdi/driver/vrf/vrf.c
orig/ogdi-3.1.4/ogdi/driver/vrf/vrf.c
119,123d118
<
< /* If the library name ends with a '/', truncate it.
Thus, we don't
try to open the wrong lat table */
< if (spriv->library[strlen(spriv->library) - 1] == '/') {
< spriv->library[strlen(spriv->library) - 1] = '\0';
< }
150,156d144
<
< sprintf(buffer,"%s/lat",spriv->database);
< #ifdef TESTOPENTABLE
< printf("open spriv->latTable:%s\n",buffer);
< #endif
<
< spriv->latTable = vpf_open_table(buffer, disk, "rb", NULL);
158,159c146
< if (spriv->latTable.fp == NULL) {
< sprintf(buffer,"%s/LAT",spriv->database);
---
> sprintf(buffer,"%s/lat",spriv->database);
169d155
< }
Logged In: NO
Just to clarify the first comment:
The commands I used were:
> ogdi_info -u gltp:/vrf/dnc13/H1316010
this works, while
> ogdi_info -u gltp:/vrf/data/Vector/dnc13/H1316010
will produce the error message: "ECSERROR: Unable to open
the LAT
table". The dataset is exactly the same, no links etc.