2

I'm trying to open a .tar file using /vsitar/

The file to be opened is located at: //my_network_drive/scratch/my_file.tar

In Python I have the following snippet:

driver = ogr.GetDriverByName('ESRI Shapefile')
driver.Open(/vsitar//my_network_drive/scratch/my_file.tar/my_file.shp`

This does not seem to work even though the file exists.

However, if I were to map the network drive say to Z

driver = ogr.GetDriverByName('ESRI Shapefile')
driver.Open(/vsitar/Z:/scratch/my_file.tar/my_file.shp`)

This does work.

The documentation seems to show that what I want to achieve is possible /vsitar//home/even/my.tar/subdir/my.tif # (absolute path to the .tar) https://gdal.org/user/virtual_file_systems.html#vsis3

Does anyone know a way to fix this without having to specifically map a drive?

3

The following path seems to work now: /vsitar///my_network_drive/scratch/my_file.tar/my_file.shp

1
  • +1 `'/vsitar/' + '//my_network_drive' is three slashes, not two. – user2856 Apr 3 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.