[mapserver-users] Ack! shptree bug????
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Apr 22 18:29:11 PDT 2002
That is a possibility, but when I ran shptreevis on the bad index it had
a depth of over 150,000,000 which is a problem. when I ran shptree
tileindex 13 NM I get a good file.
[woodbri at linus mdata]$ shptree tgrindex
creating index of old native format
[woodbri at linus mdata]$ shptreevis tgrindex tgrindex-new
This old MSB index supports a shapefile with 524288 shapes, 150994944
depth
[woodbri at linus mdata]$ shptree tgrindex
13
creating index of old native format
[woodbri at linus mdata]$ shptreevis tgrindex tgrindex-new
This old MSB index supports a shapefile with 524288 shapes, 218103808
depth
[woodbri at linus mdata]$ shptree tgrindex 13
NM
creating index of new MSB format
[woodbri at linus mdata]$ shptreevis tgrindex tgrindex-new
This old LSB index supports a shapefile with 2048 shapes, 13 depth
This looks more and more like shptree bug. It is possible that I have
created a bad record with my compression utility. I'll check on that,
but if that is the case, it would be nice if shptree did some basic data
checking.
BTW, the compression utility just reads successive records and
accumulates the extents until the LOCATION field changes and then writes
out the record, clears the accumulators and repeats. At the end of the
file it writes the data in the accumulators as the final record and that
record is good data. Could it be that I have exactly 2048 records which
is a power of 2?
-Steve
Ed McNierney wrote:
>
> Steve -
>
> That's an odd one! You didn't say much about your "compression" step - is it possible that you're creating a superficially valid but odd shapefile? Not closing that last polygon?
>
> - Ed
>
> Ed McNierney
> Chief Mapmaker
> TopoZone.com
>
> -----Original Message-----
> From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
> Sent: Monday, April 22, 2002 8:37 PM
> To: MapServer List
> Subject: [mapserver-users] Ack! shptree bug????
>
> Help Steve, Carl, anyone,
>
> I have run into a bizzare situation that might be a bug (probably mine),
> but you never know!
>
> Here is the scenario:
>
> 1) I build a tile4ms of my tiger data files.
> 2) I wrote a C program to read the tileindex and compress the entries so
> I only have one entry per directory. (I'll come back to this)
> 3) I create a shptree of the tileindex.
>
> This was working fine except, I had a minor bug in my utility and did
> not write the last directory info to the new tileindex so I had a county
> that never showed up on the map. So a add a few lines of code, to add
> the last entry before closing the files. Reprocess the tileindex and
> create the shptree index and NOTHING shows up on my map!
>
> Comment out the new code and repeat the process and the map works minus
> the missing last directory. OK, scrates head, checks the code, the
> process, tries again and gets the same results. I check the new
> tileindex using shapechk it says it fine and dandy. dbfdump and shpdump
> looks great.
>
> Ok, I use the new tileindex but delete the tileindex.qix file and every
> thing works great. The map shows up along with the previously missing
> county. Make a new shptree index and everything in the tileindex
> vanishes again! Seems like a shptree problem. mapserver 3.5 and I do get
> an image back with other layers that are not in this tileindex.
>
> Is this the a variation on the hanging bug that a patch was released
> for? I will go find patch and try that.
>
> Any other ideas.
>
> -Steve W.
More information about the MapServer-users
mailing list