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 #61681 is a reply to message #61677] Mon, 28 July 2008 10:25 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:

> ;Create structure for new entity
>
> entnew=3Dreplicate({IDL_SHAPE_ENTITY},N[2])
>
> for J=3D0,N[2]-1 do begin
>
>
> ; Define the values for the new entity
> entnew[j].SHAPE_TYPE =3D 1
> entnew[j].ISHAPE =3D 1470
> entnew[j].BOUNDS[0]=3D(A[0,j])
> entnew[j].BOUNDS[1]=3D(A[1,j])
> entnew[j].BOUNDS[2]=3D0.00000000
> entnew[j].BOUNDS[4]=3D(A[0,j])
> entnew[j].BOUNDS[5]=3D(A[1,j])
> entnew[j].BOUNDS[6]=3D0.00000000
> entnew[j].BOUNDS[7]=3D0.00000000
> entnew[j].N_VERTICES =3D 1
>
>
> attrNew =3D mynewshape ->GetAttributes(/ATTRIBUTE_STRUCTURE)
> mynewshape -> PutEntity,entnew[j]
>
> mynewshape -> SetAttributes, 0, attrNew
> endfor
> ;;;;;;;;;;;;;;;;;;;;;;;;;;
> But still no result

I don't think you are thinking this through all the way. :-)

I can't tell what A is, but I would expect it to be a
pointer array to polygons of various lengths. In other
words, these are the shapes you are trying to put into
the file. But, in any case, you are not even storing the
vertices of *anything* in this file. In other words, at
the very least you have to set:

entnew[j].VERTICES = a_polygon_of_some_sort

You have nothing like that there. What do you have
in A? Where are your polygons that you are trying
to put into the shapefile? What do you think the
BOUNDS fields should be set to? What values? What
are you putting in there?

Too may open questions here to expect much success yet.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://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: Sat Oct 11 05:58:43 PDT 2025

Total time taken to generate the page: 1.03677 seconds