Opened 21 years ago
Closed 21 years ago
#273 closed defect (fixed)
Disable support for old .qix (shptree) files in MapServer 3.7
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Shapefile Utilities | Version: | 4.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
Subject: Re: [Mapserver-dev] Change in maptree.c Date: Thu, 23 Jan 2003 19:32:45 -0600 From: "Steve Lime" <steve.lime@dnr.state.mn.us> To: <lacroix@dmsolutions.ca>, <warmerdam@pobox.com> CC: <Mapserver-dev@lists.gis.umn.edu> I think we could safely ditch the old format. If we could simply caugh up an error message to re-index that would be enough. Shptree is way old and could use that change in addition to the one Julien committed. Feel free to do that, or to at least file the bug. Steve >>> Frank Warmerdam <warmerdam@pobox.com> 01/23/03 12:15PM >>> Julien-Samuel Lacroix wrote: > /* --------------------------------------------------------------- */ > /* must check if the 2 first bytes equal 0 of max depth that cannot*/ > /* be more than 65535. If yes, we must swap all value. The problem */ > /* here is if there's no Depth (bite 5,6,7,8 in the file) all bytes*/ > /* will be set to 0. So, we will test with the number of shapes (byte*/ > /* 1,2,3,4) that cannot be more than 65535 too. */ > /* --------------------------------------------------------------- */ > if((pabyBuf[4] == 0 && pabyBuf[5] == 0 && > pabyBuf[6] == 0 && pabyBuf[7] == 0)) > { > psTree->LSB_order = !(pabyBuf[0] == 0 && pabyBuf[1] == 0); > } > else > { > psTree->LSB_order = !(pabyBuf[4] == 0 && pabyBuf[5] == 0); > } > psTree->needswap = ((psTree->LSB_order) != (!bBigEndian)); > > > My questions are, Is this fix is compatible with other format of .qix > files? Is this fix okay with you? Frank? Steve? > > I saw the parser check for a SQT signature, must we apply it there too? Julien, Your fix looks good, but it should not be required for the SQT case. The SQT version of the format explicitly stores the byte order information so it does not have to be guessed. What isn't the new (SQT) format used all the time now for indexes? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent
Change History (3)
comment:2 by , 21 years ago
I think the server code should emit a warning about old files via the debug mechanism if map->debug is non-zero.
comment:3 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in V4.0. I added a msDebug message if an old index file is used and layer->debug is set.
Note:
See TracTickets
for help on using tickets.