<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: [Gdal-dev] ogrinfo / ogr2ogr and vmap under windows?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=149254708-08082006><FONT face=Arial
color=#0000ff size=2>hello holger,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=149254708-08082006><FONT face=Arial
color=#0000ff size=2>i thinks its a windows matter, for windows you have to use
double quotes. here are a few examples i have noted for
myself</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=149254708-08082006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=149254708-08082006><FONT face=Arial
color=#0000ff size=2>#OGR and vpf (datapath:
D:/user/Data/NGA/v0eur/vmaplv0/eurnasia, "gltp:/vrf/" has to be
added)<BR>ogrinfo -ro
gltp:/vrf/D:/user/Data/NGA/v0eur/vmaplv0/eurnasia<BR>#important:: double quotes
"" at "<A
href="mailto:watrcrsl@hydro(*)_line">watrcrsl@hydro(*)_line</A>"<BR>ogrinfo -so
-al gltp:/vrf/D:/user/Data/NGA/v0eur/vmaplv0/eurnasia "<A
href="mailto:watrcrsl@hydro(*)_line">watrcrsl@hydro(*)_line</A>"<BR>ogr2ogr
watrcrsl.shp gltp:/vrf/D:/user/Data/NGA/v0eur/vmaplv0/eurnasia "<A
href="mailto:watrcrsl@hydro(*)_line">watrcrsl@hydro(*)_line</A>"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>greetings from munich</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>christian</FONT><BR></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> gdal-dev-bounces@lists.maptools.org
[mailto:gdal-dev-bounces@lists.maptools.org] <B>Im Auftrag von </B>Putler,
Dan<BR><B>Gesendet:</B> Montag, 7. August 2006 17:07<BR><B>An:</B>
wilken@ohb-system.de<BR><B>Cc:</B>
gdal-dev@lists.maptools.org<BR><B>Betreff:</B> Re: [Gdal-dev] ogrinfo / ogr2ogr
and vmap under windows?<BR></FONT><BR></DIV>
<DIV></DIV>
<P><FONT size=2>Hi Holger,</FONT> </P>
<P><FONT size=2>The following link could be of use to you. It describes how to
load </FONT><BR><FONT size=2>VMAP0 layers into PostGIS, but an
intermediate step in the process is </FONT><BR><FONT size=2>to convert the
layers into shapefiles using ogr2ogr. A Windows batch </FONT><BR><FONT
size=2>script is provided as an attachment that does the VMAP0 to
shapefile </FONT><BR><FONT size=2>transformation.</FONT> </P>
<P><FONT size=2>The link is:</FONT> </P>
<P><FONT size=2><A
href="http://docs.codehaus.org/display/GEOSDOC/Loading+VMAP0+data"
target=_blank>http://docs.codehaus.org/display/GEOSDOC/Loading+VMAP0+data</A></FONT>
</P>
<P><FONT size=2>Dan</FONT> </P>
<P><FONT size=2>On 4-Aug-06, at 1:10 AM, Holger Wilken wrote:</FONT> </P>
<P><FONT size=2>> Hi,</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>> my problem:</FONT> <BR><FONT size=2>> I want to convert VMAP
layer to shapefiles under Windows,</FONT> <BR><FONT size=2>> but neither the
conversion nor layer info with ogrinfo works.</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>> What I have tried so far:</FONT>
<BR><FONT size=2>></FONT> <BR><FONT size=2>> I use FWtools 1.0.5 under
Windows 2k (CommandLine)</FONT> <BR><FONT size=2>> My VMAP layers are located
at D:\data\vmap0\v0eur\vmaplv0\eurnasia,</FONT> <BR><FONT size=2>>
(downloaded directly from geoengine.nima.mil),</FONT> <BR><FONT size=2>>
ogrinfo.exe and ogr2ogr.exe are in C:\Programme\FWtools\bin</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>> I start ogrinfo from
C:\Programme\FWtools\bin, for example:</FONT> <BR><FONT size=2>> ogrinfo.exe
-ro gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia</FONT> <BR><FONT size=2>>
'oceansea@bnd(*)_area'</FONT> <BR><FONT size=2>> which returns only</FONT>
<BR><FONT size=2>> INFO: Open of
`gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia'</FONT> <BR><FONT
size=2>> using driver `OGDI'
successful.</FONT> <BR><FONT size=2>> but no further information is
displayed. Syntax seems to be correct </FONT><BR><FONT size=2>>
though.</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> next try -
start with debug info:</FONT> <BR><FONT size=2>> ogrinfo.exe --debug on -ro
gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/ </FONT><BR><FONT size=2>>
eurnasia</FONT> <BR><FONT size=2>> 'oceansea@bnd(*)_area'</FONT> <BR><FONT
size=2>> gets me a little more output:</FONT> <BR><FONT size=2>> KML:
Attempt to open: gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia</FONT> <BR><FONT
size=2>> OGR:
OGROpen(gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia/00D37018)</FONT>
<BR><FONT size=2>> succeeded</FONT> <BR><FONT size=2>> as OGDI.</FONT>
<BR><FONT size=2>> INFO: Open of
`gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia'</FONT> <BR><FONT
size=2>> using driver `OGDI'
successful.</FONT> <BR><FONT size=2>> OGR: GetLayerCount() = 59</FONT>
<BR><FONT size=2>></FONT> <BR><FONT size=2>> Shouldn't there be more
info?</FONT> <BR><FONT size=2>> I don't know where the 00D37018 at the end of
the gltp path comes </FONT><BR><FONT size=2>> from, it's</FONT>
<BR><FONT size=2>> not in the vmap directory structure.</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>> The ogr2ogr call to create a Shapefile
out of the VMAP Layer:</FONT> <BR><FONT size=2>> ogr2ogr.exe oceansea.shp
gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/ </FONT><BR><FONT size=2>>
eurnasia</FONT> <BR><FONT size=2>> 'oceansea@bnd(*)_area'</FONT> <BR><FONT
size=2>> does not give any errors/warnings, but no output shapefile
either.</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> I have
Administrator rights, so the directory (C:\Programme\FWtools </FONT><BR><FONT
size=2>> \bin) is</FONT> <BR><FONT size=2>> not read-only.</FONT>
<BR><FONT size=2>></FONT> <BR><FONT size=2>> Here as well, add the debug
option:</FONT> <BR><FONT size=2>> ogr2ogr.exe --debug on oceansea.shp</FONT>
<BR><FONT size=2>> gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia
'oceansea@bnd(*)_area'</FONT> <BR><FONT size=2>> gives me:</FONT> <BR><FONT
size=2>> KML: Attempt to open:
gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia</FONT> <BR><FONT size=2>> OGR:
OGROpen(gltp:/vrf/d:/data/vmap0/v0eur/vmaplv0/eurnasia/00D37028)</FONT>
<BR><FONT size=2>> succeeded</FONT> <BR><FONT size=2>> as OGDI.</FONT>
<BR><FONT size=2>> More output, but still no Shapefile.</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>> According to the OGR 1.1.6 change list,
the OGDI driver should work </FONT><BR><FONT size=2>> properly</FONT>
<BR><FONT size=2>> with drive letters under windows. All other samples I have
found </FONT><BR><FONT size=2>> were using</FONT> <BR><FONT size=2>>
unix style paths.</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> Do
other people have the same problem?</FONT> <BR><FONT size=2>> Please give me
a hint what I am missing or if it's a bug.</FONT> <BR><FONT size=2>></FONT>
<BR><FONT size=2>> thanks in advance</FONT> <BR><FONT size=2>></FONT>
<BR><FONT size=2>> Holger</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>>
_______________________________________________</FONT> <BR><FONT size=2>>
Gdal-dev mailing list</FONT> <BR><FONT size=2>>
Gdal-dev@lists.maptools.org</FONT> <BR><FONT size=2>> <A
href="http://lists.maptools.org/mailman/listinfo/gdal-dev"
target=_blank>http://lists.maptools.org/mailman/listinfo/gdal-dev</A></FONT>
</P></BODY></HTML>