[GRASSLIST:5908] loading VMAP0 data with v.in.ogr?

Hi,

I'm trying to load some VMAP0 data (Digital Chart of the World) into
GRASS 6.0beta2 with v.in.ogr .. can't quite seem to get it to work.

VMAP0:
  http://www.mapability.com/info/vmap0_index.html

going back to ogrinfo, it finds the datasource but gives an "Illegal
instruction" error:

$ ogrinfo gltp:/vrf/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus 'watrcrsl@hydro(*)_line'
Illegal instruction

I have batch renamed everything ending with a '.' in the v0sas/ tree, as
per http://article.gmane.org/gmane.comp.gis.freegis/315 but still the
error. File system is local, system is Debian/testing with self compiled
OGDI driver and GDAL/OGR.

$ ls /var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.*
/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.lft
/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.lfx

$ ogrinfo --formats | grep OGDI
  -> "OGDI" (readonly)

any ideas? also tried 'ogrinfo -ro' with no luck.

thanks,
Hamish

On Fri, Feb 25, 2005 at 06:52:20PM +1300, Hamish wrote:

Hi,

I'm trying to load some VMAP0 data (Digital Chart of the World) into
GRASS 6.0beta2 with v.in.ogr .. can't quite seem to get it to work.

VMAP0:
  http://www.mapability.com/info/vmap0_index.html

going back to ogrinfo, it finds the datasource but gives an "Illegal
instruction" error:

$ ogrinfo gltp:/vrf/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus 'watrcrsl@hydro(*)_line'
Illegal instruction

I have batch renamed everything ending with a '.' in the v0sas/ tree, as
per http://article.gmane.org/gmane.comp.gis.freegis/315 but still the
error. File system is local, system is Debian/testing with self compiled
OGDI driver and GDAL/OGR.

Is it a recent OGDI driver? I tried a few months ago, successfully.

$ ls /var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.*
/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.lft
/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.lfx

AFAIK it dislikes the caps in the path (bad luck).

I was also cleaning the trailing dots, such as:

mv ./view/viewsas/env. ./view/viewsas/env
mv ./view/viewsas/themes. ./view/viewsas/themes
mv ./vmaplv0/dht. ./vmaplv0/dht
mv ./vmaplv0/lat. ./vmaplv0/lat
mv ./vmaplv0/rference/cat. ./vmaplv0/rference/cat
mv ./vmaplv0/rference/dbref/cnd. ./vmaplv0/rference/dbref/cnd
mv ./vmaplv0/rference/dbref/csi. ./vmaplv0/rference/dbref/csi
mv ./vmaplv0/rference/dbref/ebr. ./vmaplv0/rference/dbref/ebr
mv ./vmaplv0/rference/dbref/edg. ./vmaplv0/rference/dbref/edg
mv ./vmaplv0/rference/dbref/edx. ./vmaplv0/rference/dbref/edx

...

Then it should work...

Good luck

Markus

[cc GDAL list]

> I'm trying to load some VMAP0 data (Digital Chart of the World) into
> GRASS 6.0beta2 with v.in.ogr .. can't quite seem to get it to work.
>
> VMAP0:
> http://www.mapability.com/info/vmap0_index.html
>
> going back to ogrinfo, it finds the datasource but gives an "Illegal
> instruction" error:
>
> $ ogrinfo gltp:/vrf/var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus 'watrcrsl@hydro(*)_line'
> Illegal instruction
>
>
> I have batch renamed everything ending with a '.' in the v0sas/
> tree, as per http://article.gmane.org/gmane.comp.gis.freegis/315
> but still the error. File system is local, system is Debian/testing
> with self compiled OGDI driver and GDAL/OGR.

Is it a recent OGDI driver? I tried a few months ago, successfully.

All newest official releases, AFAIK. ogdi-3.1.4, gdal 1.2.5 from source.
Debian/testing on intel P4.

> $ ls /var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.*
> /var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.lft
> /var/local/TopoData/VMAP0/v0sas/vmaplv0/sasaus/hydro/watrcrsl.lfx

AFAIK it dislikes the caps in the path (bad luck).

renamed to /var/local/topodata/vmap0/, same error.

I was also cleaning the trailing dots, such as:

mv ./view/viewsas/env. ./view/viewsas/env
mv ./view/viewsas/themes. ./view/viewsas/themes
mv ./vmaplv0/dht. ./vmaplv0/dht
mv ./vmaplv0/lat. ./vmaplv0/lat
mv ./vmaplv0/rference/cat. ./vmaplv0/rference/cat
mv ./vmaplv0/rference/dbref/cnd. ./vmaplv0/rference/dbref/cnd
mv ./vmaplv0/rference/dbref/csi. ./vmaplv0/rference/dbref/csi
mv ./vmaplv0/rference/dbref/ebr. ./vmaplv0/rference/dbref/ebr
mv ./vmaplv0/rference/dbref/edg. ./vmaplv0/rference/dbref/edg
mv ./vmaplv0/rference/dbref/edx. ./vmaplv0/rference/dbref/edx

...

did that. All files have the execute flag set, I don't think that's the
trouble.

Then it should work...

not yet...

$ grep -rI "Illegal instruction" *
in both GDAL and OGDI source dirs gives nothing..

Running it through the debugger shows this is as a SIGILL:

$ gdb `which ogrinfo`
GNU gdb 6.3-debian
[...]
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run gltp:/vrf/var/local/topodata/vmap0/v0sas/vmaplv0/sasaus 'watrcrsl@hydro(*)_line'
Starting program: /usr/local/bin/ogrinfo gltp:/vrf/var/local/topodata/vmap0/v0sas/vmaplv0/sasaus 'watrcrsl@hydro(*)_line'
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 25147)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 16384 (LWP 25147)]
0x40441aa7 in cln_ConvRegion (ClientID=0, gr=0x804b9bc, direction=1) at mathinline.h:494
494 __inline_mathcodeNP (floor, __x, \

(gdb) bt
#0 0x40441aa7 in cln_ConvRegion (ClientID=0, gr=0x804b9bc, direction=1) at mathinline.h:494
#1 0x4044076a in cln_GetGlobalBound (ClientID=0) at ../client.c:1490
#2 0x40440ff2 in cln_SetClientProjection (ClientID=0, projection=0x804d9e8 "+proj=longlat +datum=nad83")
    at ../client.c:2053
#3 0x4043f627 in cln_CreateClient (ReturnedID=0x804b7d4, URL=0x804b998 "") at ../client.c:432
#4 0x401efcb7 in OGROGDIDataSource::Open () from /usr/local/lib/libgdal.so.1
#5 0x401f022a in OGROGDIDriver::Open () from /usr/local/lib/libgdal.so.1
#6 0x401fc3f2 in OGRSFDriverRegistrar::Open () from /usr/local/lib/libgdal.so.1
#7 0x08049079 in main ()

(gdb) l
432 res = cln_SetClientProjection(*ReturnedID,projection);
433 free(projection);
434 } else {
435 res = &cln_dummy_result;
436 ecs_SetError(res,1,cln_messages[1]);
437 cln_FreeClient(&cln);
438 soc[*ReturnedID] = NULL;
439 *ReturnedID = -1;
440 }
441 }

(that source is in ogdi-3.1.4/ogdi/c-api/client.c)

?,
Hamish

> Running it through the debugger shows this is as a SIGILL:
>
> $ gdb `which ogrinfo`
> GNU gdb 6.3-debian
> [...]
> This GDB was configured as "i386-linux"...Using host libthread_db
> library "/lib/libthread_db.so.1".
>
> (gdb) run gltp:/vrf/var/local/topodata/vmap0/v0sas/vmaplv0/sasaus
> 'watrcrsl@hydro(*)_line' Starting program: /usr/local/bin/ogrinfo
> gltp:/vrf/var/local/topodata/vmap0/v0sas/vmaplv0/sasaus
> 'watrcrsl@hydro(*)_line' [Thread debugging using libthread_db
> enabled] [New Thread 16384 (LWP 25147)]

Hamish,

There have been a number of bug fixes since 3.1.4 but no new
formal release.

I'm recompiling OGDI and GDAL now.. bonehead mistake by me. The test
system I am running it on is AMD not Intel and I used
CFLAGS="-march=pentium4".

I'm pretty sure that will be it..

[time passes]

..yup, ogrinfo works now.

I'll prepare a 3.1.5 tonight and then hopefully you can try with that
tomorrow.

Having support for uppercase letters in the path name and dealing with
files that end with a "." would be nice in a new release. :slight_smile:

thanks & sorry for the inconvenience,

Hamish

On Tue, Mar 01, 2005 at 02:18:07PM +1300, Hamish wrote:

> > Running it through the debugger shows this is as a SIGILL:
> >
> > $ gdb `which ogrinfo`
> > GNU gdb 6.3-debian
> > [...]
> > This GDB was configured as "i386-linux"...Using host libthread_db
> > library "/lib/libthread_db.so.1".
> >
> > (gdb) run gltp:/vrf/var/local/topodata/vmap0/v0sas/vmaplv0/sasaus
> > 'watrcrsl@hydro(*)_line' Starting program: /usr/local/bin/ogrinfo
> > gltp:/vrf/var/local/topodata/vmap0/v0sas/vmaplv0/sasaus
> > 'watrcrsl@hydro(*)_line' [Thread debugging using libthread_db
> > enabled] [New Thread 16384 (LWP 25147)]
>
> Hamish,
>
> There have been a number of bug fixes since 3.1.4 but no new
> formal release.

I'm recompiling OGDI and GDAL now.. bonehead mistake by me. The test
system I am running it on is AMD not Intel and I used
CFLAGS="-march=pentium4".

I'm pretty sure that will be it..

[time passes]

..yup, ogrinfo works now.

> I'll prepare a 3.1.5 tonight and then hopefully you can try with that
> tomorrow.

Having support for uppercase letters in the path name and dealing with
files that end with a "." would be nice in a new release. :slight_smile:

It took me three years to convert the VMAP0 data (trying again and again),
you are way faster :slight_smile:

In fact, the code now works well thanks to Frank.
And we found all the tricks...

Markus