Re: Shapefile Woes [message #77823 is a reply to message #77822] |
Thu, 06 October 2011 09:52   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> If I use the very lowest resolution shape file in the
> distribution (gsshs_l_L1.shp), then I can draw the
> shapes correctly and IDL has no problems. If I use
> any other resolution file (e.g., gsshs_i_L1.shp), then
> the shapes get drawn in the window, but IDL seems to go
> into an infinite loop after drawing the shapes. Several
> minutes pass before IDL crashes.
>
> Has anyone else experienced problems with these GSHHS
> shapefiles?
OK, something is seriously wrong here, I think. :-)
My tests are with the gsshs_i_L1.shp file, an intermediate
resolution file. The Draw Shapes file has loop in which each
polygon shape in the file is rendered, and then it destroys
the shapefile object is was using (IDLffShape), and then
it destroys the entities from the shapefile (these are
pointers), using Heap_Free. There are 33441 individual
entities (polygons) in this file.
IDL Print, N_Elements(*entities)
33441
IDL> Heap_Free, entities
I have timed the process in IDL 7.2 and in IDL 8.1.
Here are the numbers:
IDL 7.2
loop: 0.177 seconds
destroy object: 0 seconds
destroy entities: 63.852 seconds
IDL 8.1
loop: 0.193 seconds
destroy object: 0 seconds
destroy entities: 90.604 seconds
That is a LONG time to be freeing up pointers!
Interestingly, in several trials in IDL 8.1 the freeing of the
entities took from a minimum of 65 seconds to a maximum of 102
seconds. The recorded time was from the first trial.
Does this seem slow to you, or reasonable?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|