Attachments (1)
Change History (7)
by , 9 years ago
Attachment: | invisible_shp.zip added |
---|
comment:1 by , 9 years ago
trunk r27879 "Shape: GetExtent(): don't trust extent in header if it contains Not-A-Number values (#5702)"
I've fixed GetExtent(), but that shapefile is broken in many other ways. Line geometries contain NaN values as coordinates too ! And ogr2ogr unfortunately doesn't sanitize this.
See:
OGRFeature(CONTOUR):0 ID (Real) = 0 Ouptutraste (Real) = 0.0000000000 LINESTRING (nan nan,nan nan,nan nan....nan nan) OGRFeature(CONTOUR):1 ID (Real) = 1 Ouptutraste (Real) = 0.0000000000 LINESTRING (nan nan) OGRFeature(CONTOUR):2 ID (Real) = 2 Ouptutraste (Real) = 1.0000000000 LINESTRING (nan nan,nan nan,nan nan,nan nan,nan nan,... 1694591.583145826822147 4698073.881762228906155,1694340.230359232518822 4698214.610078467987478,1693840.692357746884227 4698529.708806237205863,1693779.789891807362437 4698573.419763714075089,1693341.154356261249632 4698885.806227066554129,...1568456.653984861215577 4777344.220494321547449)
comment:3 by , 9 years ago
Apparently that shp has other issues as well: the length of the column name in the DBF file is not valid. The maximal length of column name is 10 chars in the DBF, "Ouptutraste" is 11 chars long. Thanks Siki for pointing this out. Should I open different ticket as feature request for OGR being able to handle these malformed characteristics?
comment:4 by , 9 years ago
Regarding field name width, I'm not sure if something has to be done. http://ulisse.elettra.trieste.it/services/doc/dbase/DBFstruct.htm mentions a possible length of 11 bytes, that OGR can deal with when reading. However when writing shapefiles, OGR limit itselfs to 10 characters (perhaps an historical limit of ESRI products?) and puts a null byte at the 11th byte in the field description structure, accordingly to http://en.wikipedia.org/wiki/Shapefile#Data_storage (but the information there is perhaps derived from shapelib implementation!).
Regarding invalid geometries, that could be a -sanitize option of ogr2ogr, or something like that. But we likely wouldn't want to do that by default for use cases where maximum performance is sought.
comment:5 by , 9 years ago
Milestone: | → 2.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Closing that ticket. Issue raised has been fixed.
Invisible shapefile