Map pixel areas [message #88540] |
Fri, 09 May 2014 09:12  |
khyde
Messages: 21 Registered: November 2013
|
Junior Member |
|
|
Hello,
I was hoping someone could help me figure out how to calculate the size of a pixel from a given map projection. For example, I use the following MAP_SET command to create a global 4096x2048 equidistant map. In theory (if I understand it correctly), the pixel sizes should all be the same since it is an equidistant map.
MAP_SET, /CYLINDRICAL, 0, 0, ISOTROPIC = 1, POSITION=[0.0, 0.0, 1.0, 1.0],/NOBORDER
Conversely, this map should have pixel areas of varying sizes.
MAP_SET, /MOLLWEIDE, 0, 0, ISOTROPIC = 1, POSITION=[0.0, 0.0, 1.0, 1.0],/NOBORDER
So, what I would like to do is determine the area of each pixel based on the given map projection. I have tried MAP_2POINTS, but I think this gives me the actual distance from point A to point B based on the coordinates on a globe and not the projected pixel, which has been distorted because of the map projection.
I apologize if I am not explaining my question very well, but hopefully someone understands mapping well enough to help me figure this out.
Thank you,
Kim
|
|
|
Re: Map pixel areas [message #88541 is a reply to message #88540] |
Fri, 09 May 2014 09:44   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
kjwh writes:
> I was hoping someone could help me figure out how to calculate the size of a pixel from a given map projection. For example, I use the following MAP_SET command to create a global 4096x2048 equidistant map. In theory (if I understand it correctly), the pixel sizes should all be the same since it is an equidistant map.
> MAP_SET, /CYLINDRICAL, 0, 0, ISOTROPIC = 1, POSITION=[0.0, 0.0, 1.0, 1.0],/NOBORDER
>
> Conversely, this map should have pixel areas of varying sizes.
> MAP_SET, /MOLLWEIDE, 0, 0, ISOTROPIC = 1, POSITION=[0.0, 0.0, 1.0, 1.0],/NOBORDER
>
> So, what I would like to do is determine the area of each pixel based on the given map projection. I have tried MAP_2POINTS, but I think this gives me the actual distance from point A to point B based on the coordinates on a globe and not the projected pixel, which has been distorted because of the map projection.
>
> I apologize if I am not explaining my question very well, but hopefully someone understands mapping well enough to help me figure this out.
I understand map projections well enough to understand that if you want
a projected XY grid of known resolution (which is what I *think* you
want), Map_Set is about the *last* IDL routine you want to be fooling
around with. :-)
I would seriously investigate Map_Proj_Init. (Or, if you want something
easier to use, the cgMap object from the Coyote Library.)
Do you have a map projected image you are trying to establish a map
projection for? I think it is odd (and probably not that useful) to want
to know the area of a pixel.
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: Map pixel areas [message #88566 is a reply to message #88541] |
Tue, 13 May 2014 07:14   |
khyde
Messages: 21 Registered: November 2013
|
Junior Member |
|
|
On Friday, May 9, 2014 12:44:12 PM UTC-4, David Fanning wrote:
> kjwh writes:
>
>
>
>> I was hoping someone could help me figure out how to calculate the size of a pixel from a given map projection. For example, I use the following MAP_SET command to create a global 4096x2048 equidistant map. In theory (if I understand it correctly), the pixel sizes should all be the same since it is an equidistant map.
>
>> MAP_SET, /CYLINDRICAL, 0, 0, ISOTROPIC = 1, POSITION=[0.0, 0.0, 1.0, 1.0],/NOBORDER
>
>>
>
>> Conversely, this map should have pixel areas of varying sizes.
>
>> MAP_SET, /MOLLWEIDE, 0, 0, ISOTROPIC = 1, POSITION=[0.0, 0.0, 1.0, 1.0],/NOBORDER
>
>>
>
>> So, what I would like to do is determine the area of each pixel based on the given map projection. I have tried MAP_2POINTS, but I think this gives me the actual distance from point A to point B based on the coordinates on a globe and not the projected pixel, which has been distorted because of the map projection.
>
>>
>
>> I apologize if I am not explaining my question very well, but hopefully someone understands mapping well enough to help me figure this out.
>
>
>
> I understand map projections well enough to understand that if you want
>
> a projected XY grid of known resolution (which is what I *think* you
>
> want), Map_Set is about the *last* IDL routine you want to be fooling
>
> around with. :-)
>
>
>
> I would seriously investigate Map_Proj_Init. (Or, if you want something
>
> easier to use, the cgMap object from the Coyote Library.)
>
>
>
> Do you have a map projected image you are trying to establish a map
>
> projection for? I think it is odd (and probably not that useful) to want
>
> to know the area of a pixel.
>
>
>
> 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.")
Hello David,
The reason I am trying to figure out the pixel areas is I need to know the difference between a the "projected" area of a specified region of interest and the "true" area of the ROI. I have several dozen maps that have been created using MAP_SET and are used to remap satellite derived data. I have never used MAP_PROJ_INIT and will look into it more, but if I can figure out how to do this with the maps I already have that would be great.
The main thing I am trying to do is determine the areal production within a subsetted area of the map. Because we are using the sum of the pixels in the ROI, I need to know both the "projected" size and the "actual" size (which I already know), to get an accurate areal estimate. Again, I am not sure I am explaining this very well, but I do appreciate any suggestions.
Thank you,
Kim
|
|
|
Re: Map pixel areas [message #88567 is a reply to message #88566] |
Tue, 13 May 2014 07:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
kimberly.hyde@noaa.gov writes:
> The reason I am trying to figure out the pixel areas is I need to know the difference between a the "projected" area of a specified region of interest and the "true" area of the ROI. I have several dozen maps that have been created using MAP_SET and are used to remap satellite derived data. I have never used MAP_PROJ_INIT and will look into it more, but if I can figure out how to do this with the maps I already have that would be great.
>
> The main thing I am trying to do is determine the areal production within a subsetted area of the map. Because we are using the sum of the pixels in the ROI, I need to know both the "projected" size and the "actual" size (which I already know), to get an accurate areal estimate. Again, I am not sure I am explaining this very well, but I do appreciate any suggestions.
Why would you be concerned with the "projected" area if you know the
actual area? Isn't one a visualization, a figment of the imagination,
and the other a real, actual, physically meaningful quantity?
In any case, I really don't have a clue how this could be done with
Map_Set. Sorry. :-(
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.")
|
|
|