[Mapserver-dev] Change in maptree.c

Steve Lime steve.lime at dnr.state.mn.us
Thu Jan 23 20:32:45 EST 2003


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 at 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 at pobox.com 
light and sound - activate the windows | http://pobox.com/~warmerdam 
and watch the world go round - Rush    | Geospatial Programmer for
Rent


_______________________________________________
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list