2.6 MtkMapInfo

class MtkMapInfo
Contains map information, and supports map queries.

>>> map_info = MtkRegion(37, 35, 36).snap_to_grid(37, 1100)

create_latlon( )
Create a latitude array and a longitude array in decimal degrees.

>>> map_info.create_latlon()
(array([[ 69.84396725,  69.84125375,  69.83853597, ...,  67.95214383,
         67.94751056,  67.94287408],
       [ 69.83449667,  69.83178431,  69.82906768, ...,  67.94344755,
         67.93881609,  67.9341814 ],
       [ 69.82502575,  69.82231453,  69.81959905, ...,  67.93475031,
         67.93012064,  67.92548775],
       ..., 
       [ 67.43810121,  67.43564618,  67.43318732, ...,  65.72400133,
         65.71978632,  65.71556829],
       [ 67.42855667,  67.42610255,  67.4236446 , ...,  65.71509301,
         65.71087952,  65.70666301],
       [ 67.41901189,  67.41655868,  67.41410164, ...,  65.70618396,
         65.701972  ,  65.697757  ]]),
         
 array([[ -99.94798275,  -99.92052402,  -99.89307216, ...,  -87.01432073,
         -86.9911815 ,  -86.96805169],
       [ -99.95583948,  -99.92839213,  -99.90095165, ...,  -87.0266458 ,
         -87.00351269,  -86.98038898],
       [ -99.96368936,  -99.93625339,  -99.90882428, ...,  -87.03896147,
         -87.01583448,  -86.99271687],
       ..., 
       [-101.7397708 , -101.71492204, -101.69007822, ...,  -89.85775933,
         -89.83612005,  -89.81448799],
       [-101.74615355, -101.72131411, -101.69647961, ...,  -89.86799566,
         -89.84636208,  -89.82473572],
       [-101.75253136, -101.72770125, -101.70287606, ...,  -89.87822477,
         -89.85659689,  -89.83497623]]))

end_block
End block number.

>>> map_info.end_block
36

geo
MtkGeoRegion object.

>>> map_info.geo
<MisrToolkit.MtkGeoRegion object at 0xe458>
>>> map_info.geo.ctr
(67.848508,-94.442838)

latlon_to_ls( lat, lon)
Lat and Lon to Line Sample.

>>> map_info.latlon_to_ls(68.36,-97.74)             
(120.52, 120.55)

ls_to_latlon( line, sample)
Line and Sample To Lat and Lon.

>>> map_info.ls_to_latlon(120,120)
(68.36, -97.74)

ls_to_somxy( line, sample)
Convert Line and Sample values to Som X and Som Y coordinates. line and sample can be either scalar values or numarrays.

>>> map_info.ls_to_somxy(120,120) 
(12380500.0, 677600.0)

nline
Number of lines.

>>> map_info.nline                            
256

nsample
Number of samples.

>>> map_info.nsample
512

path
Path number.

>>> map_info.path   
37

pixelcenter
Pixel Center.

>>> map_info.pixelcenter
True

pp
MtkProjParam object.

>>> map_info.pp         
<MisrToolkit.MtkProjParam object at 0x18ade00>

resfactor
Resfactor.

>>> map_info.resfactor
4

resolution
Resolution.

>>> map_info.resolution
1100

som
MtkSomRegion object.

>>> map_info.som       
<MisrToolkit.MtkSomRegion object at 0xe338>
>>> map_info.som.ctr
(12388750.0,826650.0)

somxy_to_ls( somx, somy)
Som X and Som Y To Line and Sample.

>>> map_info.somxy_to_ls(12380500.0, 677600.0)
(120.0, 120.0)

start_block
Start block number.

>>> map_info.start_block
35