<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>Re: [Gdal-dev] ogrinfo / ogr2ogr and vmap under windows?</TITLE>
</HEAD>
<BODY>
<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>