Ticket #1594 (closed defect: fixed)
Memory allocation error during SPATIAL INDEX creation for Shapefile
|Reported by:||mloskot||Owned by:||mloskot|
|Severity:||normal||Keywords:||index shapefile spatial|
Description (last modified by mloskot) (diff)
Yesterday, user with nickname Kredik reported following problem with creating spatial index for his Shapefile. Here is the story:
I am trying to index a point shapefile. I use:
ogrinfo -sql "CREATE SPATIAL INDEX ON temp" temp.shp
ogrinfo uses more than 1.5Go of VM and the process failed with a memory allocation error. If i use shptree temp.shp the index creation is done in less than 15 seconds...
The shptree.exe binary is taken from fwtools 1.1.4 (i can't find the source of this application)
It's a point shapefile, 1136000 features (PointZ)
I have tried to specify the depth in the CREATE SPATIAL INDEX statement. I think the default depth used is 19. I have tried with 8, 7,... but the memory footprint is always very large.
Kredik, sent me his file and I confirm the problem occurs. I also tested index creation with other big files I have (ie. from Mass GIS) and here everything works. I suppose the problem is with Kredik's file (he is going to confirm if the file is valid or not).
Although, Frank suggests to investigate the problem with Kredik's file, so we will know what's the reason of the problem.