[GRASSLIST:9403] Reading and converting VMAP0

I am trying to import vmap0 files into GRASS using the very useful article by Marks Neteler in GRASS Newsletter 3, with Lorenzo Moretti's binaries on Mac OSX (Grass 6.1cvs of Nov. 22). I removed all the trailing periods, lowercased the filenames, but I can't get anything to read the files. When I run ogrinfo

[Nick:local/grasslib/bin] nick% ./ogrinfo -ro -summary gltp:/vrf/Users/nick/v0eur/vmaplv0/eurnasia 'polbnda@bnd(*)_area'
FAILURE:
Unable to open datasource `gltp:/vrf/Users/nick/v0eur/vmaplv0/eurnasia' with the following drivers.
   -> ESRI Shapefile
   -> UK .NTF
   -> SDTS
   -> TIGER
   -> S57
   -> MapInfo File
   -> DGN
   -> VRT
   -> AVCBin
   -> REC
   -> Memory
   -> CSV
   -> GML
   -> ODBC
   -> OGDI
   -> PostgreSQL
   -> MySQL

Nothing I've tried seems to work. Has anybody had success with this? Is it possible that there is something wrong with the binaries? ogrinfo works fine with shapefiles, but doesn't seem to like VPFs.

Thanks for any help you can offer,

Nick Cahill

Unless OGDI is hacked to behave like the examples (my GIS Libs package is, but Lorenzo uses his own build), that 'vrf' part must be spelled out so it can find the library. Normally the OGDI format code looks for the standard unix .so extension for libraries. Try using libvrf.dylib instead of vrf. If that doesn't work, it needs a location to find the library: set DYLD_LIBRARY_PATH in your shell to wherever Lorenzo has his libraries (I think it's /usr/local/grasslib/lib). For the tcsh shell:

setenv DYLD_LIBRARY_PATH /usr/local/grasslib/lib

On Dec 9, 2005, at 3:11 PM, Nick Cahill wrote:

I am trying to import vmap0 files into GRASS using the very useful article by Marks Neteler in GRASS Newsletter 3, with Lorenzo Moretti's binaries on Mac OSX (Grass 6.1cvs of Nov. 22). I removed all the trailing periods, lowercased the filenames, but I can't get anything to read the files. When I run ogrinfo

[Nick:local/grasslib/bin] nick% ./ogrinfo -ro -summary gltp:/vrf/Users/nick/v0eur/vmaplv0/eurnasia 'polbnda@bnd(*)_area'
FAILURE:
Unable to open datasource `gltp:/vrf/Users/nick/v0eur/vmaplv0/eurnasia' with the following drivers.
  -> ESRI Shapefile
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> MapInfo File
  -> DGN
  -> VRT
  -> AVCBin
  -> REC
  -> Memory
  -> CSV
  -> GML
  -> ODBC
  -> OGDI
  -> PostgreSQL
  -> MySQL

Nothing I've tried seems to work. Has anybody had success with this? Is it possible that there is something wrong with the binaries? ogrinfo works fine with shapefiles, but doesn't seem to like VPFs.

Thanks for any help you can offer,

Nick Cahill

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

Just in case anyone else is in the same boat, I installed William Kyngesburye's gis libraries for Mac OSX, and these were able to convert vmap0 files to shapefiles successfully. I don't know why this didn't work with the library files installed by Lorenzo Moretti's installation of GRASS - but in any event, I'm happy.

It would be a big service for someone to convert all that data to shapefiles and make it available on the web. Is there an advantage to keeping it in the original VMAP0 format?

Nick Cahill

On Dec 10, 2005, at 12:31 AM, William Kyngesburye wrote:

Unless OGDI is hacked to behave like the examples (my GIS Libs package is, but Lorenzo uses his own build), that 'vrf' part must be spelled out so it can find the library. Normally the OGDI format code looks for the standard unix .so extension for libraries. Try using libvrf.dylib instead of vrf. If that doesn't work, it needs a location to find the library: set DYLD_LIBRARY_PATH in your shell to wherever Lorenzo has his libraries (I think it's /usr/local/grasslib/lib). For the tcsh shell:

setenv DYLD_LIBRARY_PATH /usr/local/grasslib/lib

On Dec 9, 2005, at 3:11 PM, Nick Cahill wrote:

I am trying to import vmap0 files into GRASS using the very useful article by Marks Neteler in GRASS Newsletter 3, with Lorenzo Moretti's binaries on Mac OSX (Grass 6.1cvs of Nov. 22). I removed all the trailing periods, lowercased the filenames, but I can't get anything to read the files. When I run ogrinfo

[Nick:local/grasslib/bin] nick% ./ogrinfo -ro -summary gltp:/vrf/Users/nick/v0eur/vmaplv0/eurnasia 'polbnda@bnd(*)_area'
FAILURE:
Unable to open datasource `gltp:/vrf/Users/nick/v0eur/vmaplv0/eurnasia' with the following drivers.
  -> ESRI Shapefile
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> MapInfo File
  -> DGN
  -> VRT
  -> AVCBin
  -> REC
  -> Memory
  -> CSV
  -> GML
  -> ODBC
  -> OGDI
  -> PostgreSQL
  -> MySQL

Nothing I've tried seems to work. Has anybody had success with this? Is it possible that there is something wrong with the binaries? ogrinfo works fine with shapefiles, but doesn't seem to like VPFs.

Thanks for any help you can offer,

Nick Cahill

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

>> I am trying to import vmap0 files into GRASS using the very useful
>> article by Marks Neteler in GRASS Newsletter 3, with Lorenzo
>> Moretti's binaries on Mac OSX (Grass 6.1cvs of Nov. 22). I removed
>> all the trailing periods, lowercased the filenames, but I can't
>> get anything to read the files. When I run ogrinfo
>>
>> [Nick:local/grasslib/bin] nick% ./ogrinfo -ro -summary gltp:/vrf/
>> Users/nick/v0eur/vmaplv0/eurnasia 'polbnda@bnd(*)_area'
>> FAILURE:
>> Unable to open datasource `gltp:/vrf/Users/nick/v0eur/vmaplv0/
>> eurnasia' with the following drivers.

...

>> -> OGDI

...

"Users" is not lower case?

>> Nothing I've tried seems to work. Has anybody had success with
>> this? Is it possible that there is something wrong with the
>> binaries? ogrinfo works fine with shapefiles, but doesn't seem to
>> like VPFs.

Ok on linux, haven't tried on a mac. OGDI lib missing? you might need
to ask on the GDAL mailing list.

$ locate libvrf

Just in case anyone else is in the same boat, I installed William
Kyngesburye's gis libraries for Mac OSX, and these were able to
convert vmap0 files to shapefiles successfully. I don't know why this
didn't work with the library files installed by Lorenzo Moretti's
installation of GRASS - but in any event, I'm happy.

It would be a big service for someone to convert all that data to
shapefiles and make it available on the web. Is there an advantage to
keeping it in the original VMAP0 format?

a) who can host 2GB data for popular download? (bit torrent tracker?)
b) the license is public domain, but some ambiguous language has been
snuck in there. (some parts (c) Australian gov't; ERSI?)

Hamish

On Dec 10, 2005, at 7:20 PM, Hamish wrote:

Nothing I've tried seems to work. Has anybody had success with
this? Is it possible that there is something wrong with the
binaries? ogrinfo works fine with shapefiles, but doesn't seem to
like VPFs.

Ok on linux, haven't tried on a mac. OGDI lib missing? you might need
to ask on the GDAL mailing list.

$ locate libvrf

It's there in Lorenzo's distribution - /usr/local/grasslib/lib. A non-standard location, but I would have thought that setting DYLD_LIBRARY_PATH would have done it, yet it didn't.

Looking back at the details of the hack I put in my distribution, I see that the standard OGDI makes 2 attempts to locate the vrf library (or whatever other gltp library) - first as specified, then as 'lib' + [libname] + '.so'. Both times use dlopen, which should use DYLD_LIBRARY_PATH. Nick - I wonder, did you try both setting DYLD_LIBRARY_PATH = /usr/local/grasslib/lib AND gltp:/libvrf.dylib/... together? (just to make sure, it wasn't clear in your offlist reply that you did them together)

% setenv DYLD_LIBRARY_PATH /usr/local/grasslib/lib
% ./ogrinfo -ro -summary gltp:/libvrf.dylib/Users/nick/v0eur/vmaplv0/eurnasia 'polbnda@bnd(*)_area'

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy