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

Home » Public Forums » archive » Adding a structure inside a previous one
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: Adding a structure inside a previous one [message #71323 is a reply to message #71271] Wed, 16 June 2010 00:27 Go to previous messageGo to previous message
titan is currently offline  titan
Messages: 59
Registered: March 2006
Member
On Jun 10, 5:13 pm, titan <thunder...@inwind.it> wrote:
> Hy everybody,
> I'm trying to define a my new projection using IDL.
> Using the ENVI routines "ENVI_GET_PROJECTION" and
> "ENVI_GET_MAP_INFO", respectively, I can get all the info I need:
>
> ** Structure ENVI_PROJ_STRUCT, 9 tags, length=184, data length=174:
>    NAME            STRING    'MAP Global'
>    TYPE            INT             99
>    PARAMS          DOUBLE    Array[15]
>    UNITS           INT              0
>    DATUM           STRING    'WGS-84'
>    USER_DEFINED    INT              0
>    PE_COORD_SYS_OBJ
>                    ULONG64                        0
>    PE_COORD_SYS_STR
>                    STRING    ''
>    PE_COORD_SYS_CODE
>                    ULONG                0
>
> ENVI> help,/st,ENVI_map_info
> ** Structure ENVI_MAP_INFO_STRUCT, 11 tags, length=328, data
> length=310:
>    PROJ            STRUCT    -> ENVI_PROJ_STRUCT Array[1]
>    MC              DOUBLE    Array[4]
>    PS              DOUBLE    Array[2]
>    ROTATION        DOUBLE          0.00000000
>    PSEUDO          INT              0
>    KX              DOUBLE    Array[2, 2]
>    KY              DOUBLE    Array[2, 2]
>    BEST_ROOT       INT              0
>    O_RPC           OBJREF    <NullObject>
>    NS              LONG                 0
>    NL              LONG                 0
>
> So I write the following lines in order to obtain the same output:
> ;;
> ************************************************************ ***************­*******************
> my_map_info_proj=CREATE_STRUCT('NAME','MAP Global','TYPE',
> 99,'PARAMS',DBLARR(15),'UNITS',0,'DATUM','WGS-84','USER_DEFI NED',
> 0,'PE_COORD_SYS_OBJ',ULONG64(0)$
>                               ,'PE_COORD_SYS_STR','','PE_COORD_SYS_CODE',ULONG(0),NAME='MY _PROJ_INFO_STRU­CT')
>
> my_map_info_proj.params(0)=6371228.0
> my_map_info_proj.params(1)=6371228.0
> my_map_info_proj.params(6)=30
> my_img_pixel_size=[25067.525,25067.525]
>
> my_map_units=ENVI_TRANSLATE_PROJECTION_UNITS('meters')
>
> ;; *****************Create the total MAP_INFO STRUCTURE***************
>
> map_info=CREATE_STRUCT('MC',DBLARR(4),'PS',DBLARR(2),'ROTATI ON',
> 0.00000000,'PSEUDO',0,'KX',DBLARR(2,2),'KY',DBLARR(2,2),$
>                               'BEST_ROOT',0,'O_RPC',OBJ_NEW(),'NS',
> 0L,'NL',0L,NAME='MY_MAP_INFO_STRUCT')
>
> my_map_info.PTRARR(0)=AMSRE_map_info_proj_ptr
> my_map_info.mc(0)=(1.50000000)
> my_map_info.mc(1)=(1.50000000)
> my_map_info.mc(2)=(-1732159.7750)
> my_map_info.mc(3)=(7332251.0625)
> my_map_info.ps(0)=(25067.525)
> my_map_info.ps(1)=(25067.525)
> ;;
> ------------------------------------------------------------ ---------------­----------------------------
>
> Looking at the help information on the structures I create I get:
>
> ** Structure MY_PROJ_INFO_STRUCT, 9 tags, length=184, data length=174:
>    NAME            STRING    'MAP Global'
>    TYPE            INT             99
>    PARAMS          DOUBLE    Array[15]
>    UNITS           INT              0
>    DATUM           STRING    'WGS-84'
>    USER_DEFINED    INT              0
>    PE_COORD_SYS_OBJ
>                    ULONG64                        0
>    PE_COORD_SYS_STR
>                    STRING    ''
>    PE_COORD_SYS_CODE
>                    ULONG                0
>
> which corresponds to the output of ENVI_GET_PROJECTION;
>
> ** Structure MY_MAP_INFO_STRUCT, 10 tags, length=136, data length=132:
>    MC              DOUBLE    Array[4]
>    PS              DOUBLE    Array[2]
>    ROTATION        FLOAT          0.000000
>    PSEUDO          INT              0
>    KX              DOUBLE    Array[2, 2]
>    KY              DOUBLE    Array[2, 2]
>    BEST_ROOT       INT              0
>    O_RPC           OBJREF    <NullObject>
>    NS              LONG                 0
>    NL              LONG                 0
>
> My question is: how can I pass to the  MY_MAP_INFO_STRUCT the
> structure MY_PROJ_INFO_STRUCT in order to get the same result as in
> ENVI_MAP_INFO_STRUCT (i.e. the presence of the tag:PROJ
> STRUCT    -> ENVI_PROJ_STRUCT Array[1])??
>
> thank you very much

Could anyone help me??

thank you
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Working with the recall buffer in idlde
Next Topic: Continuous colorbar

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

Current Time: Fri Oct 10 17:04:56 PDT 2025

Total time taken to generate the page: 0.32410 seconds