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

Home » Public Forums » archive » Re: write array 2 *.shp file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: write array 2 *.shp file [message #61692 is a reply to message #61691] Mon, 28 July 2008 06:52 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
d.poreh@gmail.com writes:

> Here is my code but I have got just one point in the attribute table:
> =2E.......
> =2E........
> mynewshape=3DOBJ_NEW('IDLffShape',file,/UPDATE, ENTITY_TYPE=3D1)
>
> mynewshape->AddAttribute, 'lat', 7, 25, $
> PRECISION=3D0
> mynewshape->AddAttribute, 'lon', 7, 25, $
> PRECISION=3D0
>
> entNew =3D{IDL_SHAPE_ENTITY}
> for J=3D0,N-1 do begin
> entNew.SHAPE_TYPE =3D 1
> entNew.ISHAPE =3D fix(randomu(10)*10000)
> entNew.BOUNDS[0]=3D(A[0,j])
> entNew.BOUNDS[1]=3D( A [1,j])
> entNew.BOUNDS[2]=3D0.00000000
> entNew.BOUNDS[3]=3D0.00000000
> entNew.BOUNDS[4]=3D( A [0,j])
> entNew.BOUNDS[5]=3D( A [1,j])
> entNew.BOUNDS[6]=3D0.00000000
> entNew.BOUNDS[7]=3D0.00000000
> entNew.N_VERTICES =3D 1
> endfor
>
> attrNew =3D mynewshape ->GetAttributes(/ATTRIBUTE_STRUCTURE)
>
> mynewshape -> PutEntity,entNew
> mynewshape -> SetAttributes, 0, attrNew
>
> OBJ_DESTROY, mynewshape

I'm not surprised. I would try adding a loop if
you wanted to add others. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Finding the Top Two Most Common Coordinates in a Multi-Dimensional Array
Next Topic: Software Package Free! ... about our Free Software

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

Current Time: Sun Oct 12 17:06:27 PDT 2025

Total time taken to generate the page: 1.83860 seconds