[FWTools] ogr2ogr and asterisks in Windows XP
Frank Warmerdam
warmerdam at pobox.com
Thu Sep 28 14:06:24 EDT 2006
Simon Taylor wrote:
> Hi,
>
> I'm trying to convert VMAP0 data to ESRI shapefiles using ogr2ogr. The
> problem is that all the files it has to create from the VMAP0 data
> have asterisks in their name, eg:
>
> 1: libref at libref(*)_line (Line String)
> 2: libreft at libref(*)_text (Point)
> 3: tileref at tileref(*)_area (Polygon)
> 4: tilereft at tileref(*)_text (Point)
> 5: polbndp at bnd(*)_point (Point)
>
> The Windows file system doesn't allow the creation of files with
> asterisks in their name, so as soon as I run the following command:
>
> ogr2ogr -spat -3 52 0 55 -f "ESRI Shapefile" C:\vmap
> gltp:/vrf/P:/vmap/v0eur/vmaplv0/eurnasia
>
> I immediately get the error:
>
> ERROR 1: Failed to create file C:\vmap\libref at libref(*)_line.shp.
>
> Is there any way I can tell ogr2ogr to omit the asterisk?
Simon,
You can use the -nln switch to override the layer name in the output
datasource.
eg.
ogr2ogr -spat -3 52 0 55 -f "ESRI Shapefile" C:\vmap \
gltp:/vrf/P:/vmap/v0eur/vmaplv0/eurnasia \
-nln libref "libref at libref(*)_line"
Note that you will need to convert things one layer at a time to accomplish
this.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the FWTools
mailing list