Ticket #1332 (closed defect: fixed)
Faulty DBF for shapefile produced by SHPTREEVIS
| Reported by: | richard.roger@… | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Command Line Utilties | Version: | 4.4 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Mapserver 4.4.2 distribution running on Sun Solaris 2.8 using gcc 3.4.2 for building. SHPTREEVIS does not produce shapefiles that ESRI's Arcview 3.2 (for Unix) would open. This appears to be a problem with the DBF file that shptreevis.c writes, in that the DBF and SHP are inconsistent. I traced it down to the statement on line 187 in shptreevis.c just after a "#ifdef MAPSERVER". This is currently " this_rec = hDBF->nRecords - 1;" but needs to be " this_rec = hDBF->nRecords ;" if the shapefiles (incl. DBF) are to be OK for Arcview 3.2 . Given the nature of the comment at the "#ifdef", I am not confident that this "fix" would be fully correct. I inserted a 'print this_rec' statement after this assignment. When the current version is run, it just prints out "-1" each time. With my modification, it prints out a sensible sequence of integers starting with 0, and the shapefile (and its DBF) is read by Arcview 3.2 OK.
Change History
Note: See
TracTickets for help on using
tickets.
