Opened 6 years ago

Closed 6 years ago

#6019 closed defect (invalid)

Shapefile name with nore than one point "my_shape.2015-07-03.shp" can not be opened by GDAL/OGR 1.11.1

Reported by: marisa Owned by: warmerdam
Priority: normal Milestone: 2.0.1
Component: default Version: 1.11.1
Severity: normal Keywords: OGR shapefile name
Cc:

Description

When running an old version of our application - using gdal 1.10.0 the shape were opened without problems.

Trying to use GDAL 2.0 the same problem occur. We found a ticket #5379 related with that, however it correct field names and not filenames.

Attachments (1)

dados-shp.zip (243.5 KB) - added by marisa 6 years ago.
Shapefile used

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by marisa

Attachment: dados-shp.zip added

Shapefile used

comment:1 Changed 6 years ago by Jukka Rahkonen

We can support such filenames if we wish but they are not valid according to the shapefile specification http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf. I am sure we do not want to follow the spec literally when it comes to 8.3 naming convention. Perhaps somebody could check what current ArcGIS versions accept and what not.

Naming Conventions

"All file names adhere to the 8.3 naming convention. The main file, the index file, and the dBASE file have the same prefix. The prefix must start with an alphanumeric character (a–Z, 0–9), followed by zero or up to seven characters (a–Z, 0–9, _, -). The suffix for the main file is .shp. The suffix for the index file is .shx. The suffix for the dBASE table is .dbf. All letters in a file name are in lower case on operating systems with case sensitive file names."

comment:2 Changed 6 years ago by Even Rouault

marisa, I don't reproduce any problem in opening this file neither with GDAL 1.11 nor 2.0 :

$ ogrinfo 221_067_2015-01-24_QMENC_0.30_0.80_pol_.shp 

INFO: Open of `221_067_2015-01-24_QMENC_0.30_0.80_pol_.shp'
      using driver `ESRI Shapefile' successful.
1: 221_067_2015-01-24_QMENC_0.30_0.80_pol_ (Polygon)

You'll have to provide more information on how to reproduce.

comment:3 Changed 6 years ago by marisa

The problem seems to be related with SQL.

Try to do "Select FID, * FROM "221_067_2015-01-24_QMENC_0.30_0.80_pol_.shp"

comment:4 Changed 6 years ago by Even Rouault

The layer name is "221_067_2015-01-24_QMENC_0.30_0.80_pol_", without .shp. Works for me without the .shp:

ogrinfo 221_067_2015-01-24_QMENC_0.30_0.80_pol_.shp -sql 'Select FID, * FROM "221_067_2015-01-24_QMENC_0.30_0.80_pol_"

comment:5 Changed 6 years ago by Even Rouault

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.