Opened 17 years ago

Last modified 17 years ago

#1594 closed defect

Memory allocation error during SPATIAL INDEX creation for Shapefile — at Version 1

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: normal Milestone: 1.4.3
Component: OGR_SF Version: unspecified
Severity: normal Keywords: index shapefile spatial
Cc: ftrastour, warmerdam

Description (last modified by Mateusz Łoskot)

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.

Change History (1)

comment:1 by Mateusz Łoskot, 17 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.