comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problem: Opening a 20-30MB sized ShapeFile
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problem: Opening a 20-30MB sized ShapeFile [message #45948] Mon, 24 October 2005 11:36
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Chirag Modh wrote:
> Hi All,
>
> I am opening ShapeFile (.shp) in IDL by using IDLffShape class.
> My code run nicely for small ShapeFile, but when I am loading 5MB sized
> ShapeFile it takes 2-3 Minuts and for 30MB sized ShapeFile it takes too
> much time to open some time it's hangs up .
> For same file ENVI not takes too much time it opens it very quickly.
> My programme is written bellow
> what I am doing.
>
> oWin= obj_new('IDLgrWindow')
> oView=obj_new('IDLgrView')
> oModel=obj_new('IDLgrModel')
> oView->Add,oModel
>
> entity=self->IDLffShape::GetEntity(/ALL)
> for i=0, self.nRecord-1 do begin ; self.nRecord = 1,00,000
>
> DATA= (*entity[i].vertices)
> oPolygon=OBJ_NEW('IDLgrPolygon')
> oPolygon->SetProperty,DATA=temporary(data)
>
> oModel->Add, oPolygon
> self->IDLffShape::DestroyEntity, entity[i]
> endfor
> oWin->Draw,oView



I trust that while your title leads me to believe that you can't open a
large shapefile your problem is that you can't display the data within
the shapefile.

I don't work with shape files but right away I see that you are most
likely creating a 100,000 (or did you mean 1,000,000) polygon objects
and that can be an issue. Since you aren't providing any connectivity
data, these must be individual points? Why aren't you just combining
all of the vertices into a single polygon object? What exactly is
(*entity[i].vertices)? Why are you using IDLgrPolygon vs IDLgrPolyline?

Just guessing, but I would try to limit the number of polygon objects by
combining vertices and providing connectivity data. I would guess IDL
can draw 1000, 1000 vertex lines a lot faster than 1,000,000 individual
objects representing points. Without knowing what your data is, it is
hard to be more specific.

-Rick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: help on creating a mean array of data
Next Topic: Re: random integers between 0 and 1,000,000

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:04:28 PDT 2025

Total time taken to generate the page: 0.00534 seconds