Opened 20 years ago

Closed 16 years ago

Last modified 16 years ago

#590 closed defect (fixed)

Shape Index-Files (*.qix) not used when .shp extension is specified in mapfile

Reported by: ujunge@… Owned by: sdlime
Priority: high Milestone: 5.2 release
Component: MapScript Version: 5.0
Severity: normal Keywords:
Cc: bartvde@…, jmckenna

Description

The Index-files (*.qix) of ESRI-Shape-Files are never used.

This behaviour has been verified using File-Auditing in W2000 
and has been observed for the builds  
  php_mapscript_40.dll from 8/5/2003
 and  
  php_mapscript_41.dll from 3/3/2004
(other builds have not been checked)

The only file-types accessed are the 3 standard-files (*.shx, *.shp, *.dbf)

I was wondering, why it maked never a difference (with respect to map-rendering 
time) wether qix-files are present or not.

Attachments (3)

audit and directory listing.zip (2.5 KB ) - added by ujunge@… 20 years ago.
Audit and data directory listing
qixshp.patch (1.4 KB ) - added by pramsey 16 years ago.
Check for the .shp case and null terminate it prior to building filename
qixshp.2.patch (1.5 KB ) - added by pramsey 16 years ago.
Check for the .shp case and null terminate it prior to building filename

Download all attachments as: .zip

Change History (12)

comment:1 by sdlime, 20 years ago

Status: newassigned
I'd be really suprised if this is a real bug. The code in question is years old
and known to work. Let's start with the obvious. Are the filenames for the .qix
files correct, that is the same case as the shapefile with a lower-case extension?

Steve

by ujunge@…, 20 years ago

Audit and data directory listing

comment:2 by bartvde@…, 20 years ago

Maybe slightly related, if you use the following DATA statement in a LAYER
definition:

DATA "myshapefile.shp"

Mapserver looks for myshapefile.shp.qix instead of myshapefile.qix.

So you should use DATA "myshapefile" instead to get it to use the index.

comment:3 by bartvde@…, 20 years ago

Cc: bartvde@… added

comment:4 by ummmmm@…, 19 years ago

I recently posted to the mailing list about severe performance problems that
turned out to be this same issue.  i.e. MapServer wasn't using our QIX files
because they were named incorrectly.  The documentation states that the .map
file DATA element can either specify or not specify the .shp extension, but
shptree creates .shp.qix if you use the extension, which MapServer doesn't find.

I suggested that at the least the documentation should warn of this problem
since we're not the first to make the mistake.  Mark Warmerdam suggested I open
a bug for the "qix name generator ought to deal with this more gracefully".  It
seems that this existing bug is a reasonable place to add the comment instead.

comment:5 by ummmmm@…, 19 years ago

Oops - I specified the current behaviour backwards.  I guess shptree created
.qix, but MapServer was *looking* for .shp.qix because we had the .shp extension
specified in the .map file.

comment:6 by jmckenna, 17 years ago

Cc: jmckenna added
Summary: Shape Index-Files (*.qix) not usedShape Index-Files (*.qix) not used when .shp extension is specified in mapfile
Version: 4.05.0

comment:7 by jmckenna, 17 years ago

Milestone: 5.2 release

by pramsey, 16 years ago

Attachment: qixshp.patch added

Check for the .shp case and null terminate it prior to building filename

by pramsey, 16 years ago

Attachment: qixshp.2.patch added

Check for the .shp case and null terminate it prior to building filename

comment:8 by pramsey, 16 years ago

Resolution: fixed
Status: assignedclosed

Patched in trunk as of r7565. Patched in branch-5-0 as of r7566.

comment:9 by jmckenna, 16 years ago

verified!

man I've been waiting for this one a long time...i can't imagine how many users didn't know about this one.

i've also updated the doc with this note (http://mapserver.gis.umn.edu/docs/reference/utilityreference/shptree/)

Note: See TracTickets for help on using tickets.