Ticket #590 (closed defect: fixed)

Opened 10 years ago

Last modified 6 years ago

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

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

Change History

Changed 10 years ago by sdlime

  • status changed from new to assigned
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

Changed 10 years ago by ujunge@…

Audit and data directory listing

Changed 10 years ago by bartvde@…

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.

Changed 10 years ago by bartvde@…

  • cc bartvde@… added

Changed 9 years ago by ummmmm@…

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.

Changed 9 years ago by ummmmm@…

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.

Changed 7 years ago by jmckenna

  • cc jmckenna added
  • version changed from 4.0 to 5.0
  • summary changed from Shape Index-Files (*.qix) not used to Shape Index-Files (*.qix) not used when .shp extension is specified in mapfile

Changed 7 years ago by jmckenna

  • milestone set to 5.2 release

Changed 6 years ago by pramsey

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

Changed 6 years ago by pramsey

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

Changed 6 years ago by pramsey

  • status changed from assigned to closed
  • resolution set to fixed

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

Changed 6 years ago by jmckenna

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.