Best routines for mapping satellite images [message #89352] |
Mon, 25 August 2014 12:13  |
Steve Super
Messages: 13 Registered: August 2014
|
Junior Member |
|
|
Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
Thanks,
Steve
|
|
|
Re: Best routines for mapping satellite images [message #89353 is a reply to message #89352] |
Mon, 25 August 2014 16:15   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Monday, August 25, 2014 1:13:01 PM UTC-6, Steve Super wrote:
> Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
>
>
>
> I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
>
>
>
> Thanks,
>
> Steve
I think it depends upon what you are trying to achieve. You could take the quick approach, and use IDL function graphics and see if that is what you want:
Assuming that your image coordinates are in "degrees" (since you said unprojected):
m = MAP( "Mollweide", LIMIT=[latmin, lonmin, latmax, lonmax] )
im = IMAGE(mydata, IMAGE_LOCATION=[lon0, lat0], $
IMAGE_DIMENSIONS=[widthLon, heightLat], $
GRID_UNITS="degrees", /OVERPLOT)
c = MAPCONTINENTS( )
m.Save, "map.pdf"
You will need to fill in appropriate values for latmin, etc.
Hope this helps.
-Chris
ExelisVIS
|
|
|
Re: Best routines for mapping satellite images [message #89356 is a reply to message #89352] |
Tue, 26 August 2014 18:14   |
Chris Anderson
Messages: 3 Registered: August 2014
|
Junior Member |
|
|
On Monday, August 25, 2014 12:13:01 PM UTC-7, Steve Super wrote:
> Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
>
>
>
> I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
>
>
>
> Thanks,
>
> Steve
What are the lat/lon arrays you have? Are the the extent of the iage? Or are they the location for each element in your un-projected image array?
|
|
|
|
Re: Best routines for mapping satellite images [message #89577 is a reply to message #89352] |
Wed, 29 October 2014 14:08   |
Steve Super
Messages: 13 Registered: August 2014
|
Junior Member |
|
|
On Monday, August 25, 2014 3:13:01 PM UTC-4, Steve Super wrote:
> Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
>
> I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
>
> Thanks,
> Steve
Sorry I missed all these replies, I put this problem aside for while and forgot to check back.
To answer some of the questions:
-Yes the coordinates are in degrees and are not evenly spaced (non-gridded data).
-The lat/lon arrays have the same dimensions as the image data.
The data I am working with is NPP VIIRS M-band data, which I am attempting to use to create a true-color image. My desired outcome is to have a warped image that retains the original dimensions of the data. I want to then focus on a subset of the image and highlight pixels of interest, as well as plot the path of CALIPSO overpass, which is based on lat/lon as well.
So far the closest I have come to what I believe is a good result was done using the 'map_set' and 'map_patch' procedures. However, in this case boundaries and coastlines do not quite match up, and there is no way to specify that the image dimensions remain the same as the input array.
Thanks for the comments and help.
-Steve
|
|
|
Re: Best routines for mapping satellite images [message #89580 is a reply to message #89577] |
Wed, 29 October 2014 14:45   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Steve Super writes:
> Sorry I missed all these replies, I put this problem aside for while and forgot to check back.
>
> To answer some of the questions:
>
> -Yes the coordinates are in degrees and are not evenly spaced (non-gridded data).
> -The lat/lon arrays have the same dimensions as the image data.
>
> The data I am working with is NPP VIIRS M-band data, which I am attempting to use to create a true-color image. My desired outcome is to have a warped image that retains the original dimensions of the data. I want to then focus on a subset of the image and highlight pixels of interest, as well as plot the path of CALIPSO overpass, which is based on lat/lon as well.
>
> So far the closest I have come to what I believe is a good result was done using the 'map_set' and 'map_patch' procedures. However, in this case boundaries and coastlines do not quite match up, and there is no way to specify that the image dimensions remain the same as the input array.
>
> Thanks for the comments and help.
I've had reasonably good luck using cgWarpToMap using data like this. It
uses either GridData or Interpolation (much faster!) to grid the data,
depending upon the input data.
http://www.idlcoyote.com/idldoc/cg/cgwarptomap.html
http://www.idlcoyote.com/code_tips/usegriddata.html
http://www.idlcoyote.com/code_tips/griddata.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: Best routines for mapping satellite images [message #89590 is a reply to message #89580] |
Thu, 30 October 2014 07:07   |
Steve Super
Messages: 13 Registered: August 2014
|
Junior Member |
|
|
On Wednesday, October 29, 2014 5:45:19 PM UTC-4, David Fanning wrote:
> Steve Super writes:
>
>> Sorry I missed all these replies, I put this problem aside for while and forgot to check back.
>>
>> To answer some of the questions:
>>
>> -Yes the coordinates are in degrees and are not evenly spaced (non-gridded data).
>> -The lat/lon arrays have the same dimensions as the image data.
>>
>> The data I am working with is NPP VIIRS M-band data, which I am attempting to use to create a true-color image. My desired outcome is to have a warped image that retains the original dimensions of the data. I want to then focus on a subset of the image and highlight pixels of interest, as well as plot the path of CALIPSO overpass, which is based on lat/lon as well.
>>
>> So far the closest I have come to what I believe is a good result was done using the 'map_set' and 'map_patch' procedures. However, in this case boundaries and coastlines do not quite match up, and there is no way to specify that the image dimensions remain the same as the input array.
>>
>> Thanks for the comments and help.
>
> I've had reasonably good luck using cgWarpToMap using data like this. It
> uses either GridData or Interpolation (much faster!) to grid the data,
> depending upon the input data.
>
> http://www.idlcoyote.com/idldoc/cg/cgwarptomap.html
> http://www.idlcoyote.com/code_tips/usegriddata.html
> http://www.idlcoyote.com/code_tips/griddata.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
David,
Thanks for the reply. I have attempted to use cgWarptoMap previously, but while the dimensions are the same as the original image, for some reason the result is a zeroed array.
|
|
|
|
Re: Best routines for mapping satellite images [message #89592 is a reply to message #89591] |
Thu, 30 October 2014 07:45   |
Steve Super
Messages: 13 Registered: August 2014
|
Junior Member |
|
|
On Thursday, October 30, 2014 10:16:36 AM UTC-4, David Fanning wrote:
> Steve Super writes:
>
>> Thanks for the reply. I have attempted to use cgWarptoMap previously, but while the dimensions are the same as the original image, for some reason the result is a zeroed array.
>
> Ah, well, you must be doing something wrong. ;-)
>
> Any missing data in those arrays?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
There is missing data in the data arrays which I initially set to 'NAN', however I replaced those values (set to 0) before attempting to warp the image which gives the same result. The lat/lon arrays have no missing values.
|
|
|
Re: Best routines for mapping satellite images [message #89593 is a reply to message #89577] |
Thu, 30 October 2014 09:20   |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
On Wednesday, October 29, 2014 4:08:27 PM UTC-5, Steve Super wrote:
> On Monday, August 25, 2014 3:13:01 PM UTC-4, Steve Super wrote:
>> Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
>>
>> I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
>>
>> Thanks,
>> Steve
>
> Sorry I missed all these replies, I put this problem aside for while and forgot to check back.
>
> To answer some of the questions:
>
> -Yes the coordinates are in degrees and are not evenly spaced (non-gridded data).
> -The lat/lon arrays have the same dimensions as the image data.
>
> The data I am working with is NPP VIIRS M-band data, which I am attempting to use to create a true-color image. My desired outcome is to have a warped image that retains the original dimensions of the data. I want to then focus on a subset of the image and highlight pixels of interest, as well as plot the path of CALIPSO overpass, which is based on lat/lon as well.
>
> So far the closest I have come to what I believe is a good result was done using the 'map_set' and 'map_patch' procedures. However, in this case boundaries and coastlines do not quite match up, and there is no way to specify that the image dimensions remain the same as the input array.
>
> Thanks for the comments and help.
> -Steve
Steve,
The POLAR2GRID package will ingest VIIRS M-band SDR HDF5 files (image and geolocation) and create high quality true color images in GeoTIFF format. Several different map projections are available, including Google Earth. Once you have the imagery in GeoTIFF format, it should be straightforward to load and georeference the image in IDL. POLAR2GRID provides similar features for MODIS Level 1B HDF4 files.
POLAR2GRID is freely available here:
http://cimss.ssec.wisc.edu/cspp/npp_polar2grid_v1.2.shtml
You will need a 64-bit Linux system to run the software.
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
|
|
|
|
Re: Best routines for mapping satellite images [message #89596 is a reply to message #89593] |
Thu, 30 October 2014 11:40   |
Steve Super
Messages: 13 Registered: August 2014
|
Junior Member |
|
|
On Thursday, October 30, 2014 12:20:44 PM UTC-4, liam....@ssec.wisc.edu wrote:
> On Wednesday, October 29, 2014 4:08:27 PM UTC-5, Steve Super wrote:
>> On Monday, August 25, 2014 3:13:01 PM UTC-4, Steve Super wrote:
>>> Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
>>>
>>> I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
>>>
>>> Thanks,
>>> Steve
>>
>> Sorry I missed all these replies, I put this problem aside for while and forgot to check back.
>>
>> To answer some of the questions:
>>
>> -Yes the coordinates are in degrees and are not evenly spaced (non-gridded data).
>> -The lat/lon arrays have the same dimensions as the image data.
>>
>> The data I am working with is NPP VIIRS M-band data, which I am attempting to use to create a true-color image. My desired outcome is to have a warped image that retains the original dimensions of the data. I want to then focus on a subset of the image and highlight pixels of interest, as well as plot the path of CALIPSO overpass, which is based on lat/lon as well.
>>
>> So far the closest I have come to what I believe is a good result was done using the 'map_set' and 'map_patch' procedures. However, in this case boundaries and coastlines do not quite match up, and there is no way to specify that the image dimensions remain the same as the input array.
>>
>> Thanks for the comments and help.
>> -Steve
>
> Steve,
>
> The POLAR2GRID package will ingest VIIRS M-band SDR HDF5 files (image and geolocation) and create high quality true color images in GeoTIFF format. Several different map projections are available, including Google Earth. Once you have the imagery in GeoTIFF format, it should be straightforward to load and georeference the image in IDL. POLAR2GRID provides similar features for MODIS Level 1B HDF4 files.
>
> POLAR2GRID is freely available here:
>
> http://cimss.ssec.wisc.edu/cspp/npp_polar2grid_v1.2.shtml
>
> You will need a 64-bit Linux system to run the software.
>
> Cheers,
> Liam.
> Practical IDL Programming
> http://www.gumley.com/
Thanks Liam, I downloaded the software and gave it a shot. I was able to create reprojected images without any trouble, however when I tried to use the crefl2gtiff script for creating a True Color GeoTIFF file I received the following errors:
"Cannot read fill value of SDS "Reflectance_Mod_M5".
SDS "Reflectance_Mod_M5": 3200x768 scale factor: 2.44174e-05 offset: 0
Cannot find SDS Reflectance_Mod_M7 in file NPP_VMAE_L1.hdf.
band 2
Cannot read fill value of SDS "Reflectance_Mod_M3".
SDS "Reflectance_Mod_M3": 3200x768 scale factor: 2.44174e-05 offset: 0
band 3
Cannot read fill value of SDS "Reflectance_Mod_M4".
SDS "Reflectance_Mod_M4": 3200x768 scale factor: 2.44174e-05 offset: 0
Cannot find SDS Reflectance_Mod_M8 in file NPP_VMAE_L1.hdf.
Cannot find SDS Reflectance_Mod_M10 in file NPP_VMAE_L1.hdf.
Cannot find SDS Reflectance_Mod_M11 in file NPP_VMAE_L1.hdf.
band 16
Cannot read fill value of SDS "SolZenAng_Mod".
SDS "SolZenAng_Mod": 3200x768 scale factor: 1 offset: 0
band 17
Cannot read fill value of SDS "SenZenAng_Mod".
SDS "SenZenAng_Mod": 3200x768 scale factor: 1 offset: 0
band 18
Cannot read fill value of SDS "SolAziAng_Mod".
SDS "SolAziAng_Mod": 3200x768 scale factor: 1 offset: 0
band 19
Cannot read fill value of SDS "SenAziAng_Mod".
SDS "SenAziAng_Mod": 3200x768 scale factor: 1 offset: 0
band 20
Cannot read fill value of SDS "Longitude".
SDS "Longitude": 3200x768 scale factor: 1 offset: 0
band 21
Cannot read fill value of SDS "Latitude".
SDS "Latitude": 3200x768 scale factor: 1 offset: 0
Creating SDS CorrRefl_01: 3200x768
(lines_1km x samples_1km)
Creating SDS CorrRefl_02: 0x0
Cannot create SDS CorrRefl_02
Error running VIIRS M-band corrected reflectance on input file NPP_VMAE_L1.hdf
OOPS: Could not create CREFL output for file /data/home001/stephens/polar2grid/data//SVM05_npp_d20130915_ t2038180_e 2039422_b09768_c20130916030531344011_noaa_ops.h5
FAILURE"
I did this by calling the script with the -d flag along with path to the directory containing the 3 matching SVM(band3-5) files and GMTCO geolocation file. Is there something else I'm missing here?
|
|
|
|
|
|
Re: Best routines for mapping satellite images [message #89608 is a reply to message #89596] |
Fri, 31 October 2014 06:48  |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
On Thursday, October 30, 2014 1:40:26 PM UTC-5, Steve Super wrote:
> On Thursday, October 30, 2014 12:20:44 PM UTC-4, liam....@ssec.wisc.edu wrote:
>> On Wednesday, October 29, 2014 4:08:27 PM UTC-5, Steve Super wrote:
>>> On Monday, August 25, 2014 3:13:01 PM UTC-4, Steve Super wrote:
>>>> Does anyone have any suggestions for which routines are best for projecting satellite images? I have an un-projected image array, along with associated lat/lon arrays that I would like to map and then add some other layers/annotations.
>>>>
>>>> I have tried many different approaches (i.e., old IDL procedures, new IDL graphics functions, CG) with varying, but insufficient results.
>>>>
>>>> Thanks,
>>>> Steve
>>>
>>> Sorry I missed all these replies, I put this problem aside for while and forgot to check back.
>>>
>>> To answer some of the questions:
>>>
>>> -Yes the coordinates are in degrees and are not evenly spaced (non-gridded data).
>>> -The lat/lon arrays have the same dimensions as the image data.
>>>
>>> The data I am working with is NPP VIIRS M-band data, which I am attempting to use to create a true-color image. My desired outcome is to have a warped image that retains the original dimensions of the data. I want to then focus on a subset of the image and highlight pixels of interest, as well as plot the path of CALIPSO overpass, which is based on lat/lon as well.
>>>
>>> So far the closest I have come to what I believe is a good result was done using the 'map_set' and 'map_patch' procedures. However, in this case boundaries and coastlines do not quite match up, and there is no way to specify that the image dimensions remain the same as the input array.
>>>
>>> Thanks for the comments and help.
>>> -Steve
>>
>> Steve,
>>
>> The POLAR2GRID package will ingest VIIRS M-band SDR HDF5 files (image and geolocation) and create high quality true color images in GeoTIFF format. Several different map projections are available, including Google Earth. Once you have the imagery in GeoTIFF format, it should be straightforward to load and georeference the image in IDL. POLAR2GRID provides similar features for MODIS Level 1B HDF4 files.
>>
>> POLAR2GRID is freely available here:
>>
>> http://cimss.ssec.wisc.edu/cspp/npp_polar2grid_v1.2.shtml
>>
>> You will need a 64-bit Linux system to run the software.
>>
>> Cheers,
>> Liam.
>> Practical IDL Programming
>> http://www.gumley.com/
>
> Thanks Liam, I downloaded the software and gave it a shot. I was able to create reprojected images without any trouble, however when I tried to use the crefl2gtiff script for creating a True Color GeoTIFF file I received the following errors:
>
> "Cannot read fill value of SDS "Reflectance_Mod_M5".
> SDS "Reflectance_Mod_M5": 3200x768 scale factor: 2.44174e-05 offset: 0
> Cannot find SDS Reflectance_Mod_M7 in file NPP_VMAE_L1.hdf.
> band 2
> Cannot read fill value of SDS "Reflectance_Mod_M3".
> SDS "Reflectance_Mod_M3": 3200x768 scale factor: 2.44174e-05 offset: 0
> band 3
> Cannot read fill value of SDS "Reflectance_Mod_M4".
> SDS "Reflectance_Mod_M4": 3200x768 scale factor: 2.44174e-05 offset: 0
> Cannot find SDS Reflectance_Mod_M8 in file NPP_VMAE_L1.hdf.
> Cannot find SDS Reflectance_Mod_M10 in file NPP_VMAE_L1.hdf.
> Cannot find SDS Reflectance_Mod_M11 in file NPP_VMAE_L1.hdf.
> band 16
> Cannot read fill value of SDS "SolZenAng_Mod".
> SDS "SolZenAng_Mod": 3200x768 scale factor: 1 offset: 0
> band 17
> Cannot read fill value of SDS "SenZenAng_Mod".
> SDS "SenZenAng_Mod": 3200x768 scale factor: 1 offset: 0
> band 18
> Cannot read fill value of SDS "SolAziAng_Mod".
> SDS "SolAziAng_Mod": 3200x768 scale factor: 1 offset: 0
> band 19
> Cannot read fill value of SDS "SenAziAng_Mod".
> SDS "SenAziAng_Mod": 3200x768 scale factor: 1 offset: 0
> band 20
> Cannot read fill value of SDS "Longitude".
> SDS "Longitude": 3200x768 scale factor: 1 offset: 0
> band 21
> Cannot read fill value of SDS "Latitude".
> SDS "Latitude": 3200x768 scale factor: 1 offset: 0
> Creating SDS CorrRefl_01: 3200x768
> (lines_1km x samples_1km)
> Creating SDS CorrRefl_02: 0x0
> Cannot create SDS CorrRefl_02
> Error running VIIRS M-band corrected reflectance on input file NPP_VMAE_L1.hdf
> OOPS: Could not create CREFL output for file /data/home001/stephens/polar2grid/data//SVM05_npp_d20130915_ t2038180_e 2039422_b09768_c20130916030531344011_noaa_ops.h5
> FAILURE"
>
>
> I did this by calling the script with the -d flag along with path to the directory containing the 3 matching SVM(band3-5) files and GMTCO geolocation file. Is there something else I'm missing here?
Steve, email me and I'll put you in touch with the developer.
liam.gumley at ssec.wisc.edu
|
|
|