Re: GeoTiff- grid [message #58123] |
Tue, 22 January 2008 14:40  |
robinson.inj
Messages: 32 Registered: August 2007
|
Member |
|
|
On Jan 22, 4:23 pm, David Fanning <n...@dfanning.com> wrote:
> robinson....@gmail.com writes:
>> David, I followed your examples but still have problems. In the uv
>> space my corners IDL and ENVI aggred
>> UpperLeftCoordinate:(-167346.0185E, 3677892.5566N)
>> LowerRightCoordinate:(1222128.8184E,2983386.7945N)
>> However in the lon/lat space i got:
>> IDL: UpperLeftCoordinate: (-98.555279E, 45.411655N)
>> LowerRightCoordinate: ( -81.568627E,51.346972N)
>> ENVI: UpperLeftCoordinate: (-98.09914722E, 33.30501389N)
>> LowerRightCoordinate:(-84.82142500E, 27.55810278N)
>> My image has 3000 col x 1500 lin. The pix resolution is 463.3127
>> meters.
>
>> mercatorMap =3D MAP_PROJ_INIT('Mercator', $
>> DATUM=3D8, $ ; WGS84
>> CENTER_LATITUDE=3D20.000, $
>> CENTER_LONGITUDE=3D-96.5000)
>
>> I tried different things but in all cases idl and envi did not match,
>> and I do not have any clue where is my error.
>
>> Any suggestion is welcome.
>
> Why don't you post the listgeo output, so we can see what it
> thinks the map projection is suppose to be.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- Hide quoted text -
>
> - Show quoted text -
I hope it helps
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-167346.019 3677892.56 0
ModelPixelScaleTag (1,3):
463.312717 463.312717 0
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeProjected
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GeographicTypeGeoKey (Short,1): GCS_WGS_84
GeogLinearUnitsGeoKey (Short,1): Linear_Meter
GeogAngularUnitsGeoKey (Short,1): Angular_Degree
ProjectedCSTypeGeoKey (Short,1): User-Defined
ProjectionGeoKey (Short,1): User-Defined
ProjCoordTransGeoKey (Short,1): CT_Mercator
ProjLinearUnitsGeoKey (Short,1): Linear_Meter
ProjFalseEastingGeoKey (Double,1): 0
ProjFalseNorthingGeoKey (Double,1): 0
ProjCenterLongGeoKey (Double,1): -96.5
ProjCenterLatGeoKey (Double,1): 20
End_Of_Keys.
End_Of_Geotiff.
Projection Method: CT_Mercator
ProjNatOriginLatGeoKey: 20.000000 ( 20d 0' 0.00"N)
ProjNatOriginLongGeoKey: -96.500000 ( 96d30' 0.00"W)
ProjScaleAtNatOriginGeoKey: 1.000000
ProjFalseEastingGeoKey: 0.000000 m
ProjFalseNorthingGeoKey: 0.000000 m
GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
Projection Linear Units: 9001/metre (1.000000m)
Corner Coordinates:
Upper Left ( -167346.019, 3677892.557)
Lower Left ( -167346.019, 2982923.482)
Upper Right ( 1222592.131, 3677892.557)
Lower Right ( 1222592.131, 2982923.482)
Center ( 527623.056, 3330408.019)
|
|
|
Re: GeoTiff- grid [message #58124 is a reply to message #58123] |
Tue, 22 January 2008 14:23   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
robinson.inj@gmail.com writes:
> David, I followed your examples but still have problems. In the uv
> space my corners IDL and ENVI aggred
> UpperLeftCoordinate:(-167346.0185E, 3677892.5566N)
> LowerRightCoordinate:(1222128.8184E,2983386.7945N)
> However in the lon/lat space i got:
> IDL: UpperLeftCoordinate: (-98.555279E, 45.411655N)
> LowerRightCoordinate: ( -81.568627E,51.346972N)
> ENVI: UpperLeftCoordinate: (-98.09914722E, 33.30501389N)
> LowerRightCoordinate:(-84.82142500E, 27.55810278N)
> My image has 3000 col x 1500 lin. The pix resolution is 463.3127
> meters.
>
> mercatorMap =3D MAP_PROJ_INIT('Mercator', $
> DATUM=3D8, $ ; WGS84
> CENTER_LATITUDE=3D20.000, $
> CENTER_LONGITUDE=3D-96.5000)
>
> I tried different things but in all cases idl and envi did not match,
> and I do not have any clue where is my error.
>
> Any suggestion is welcome.
Why don't you post the listgeo output, so we can see what it
thinks the map projection is suppose to be.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: GeoTiff- grid [message #58125 is a reply to message #58124] |
Tue, 22 January 2008 14:03   |
robinson.inj
Messages: 32 Registered: August 2007
|
Member |
|
|
On Jan 22, 3:12 pm, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> Humm, well, OK, here is an article that spells it out:
>
>> http://www.dfanning.com/map_tips/pixel_to_ll.html
>
>> Be aware, however, that there is an error either in this
>> article, or in the previous one. But the two articles
>> can't *both* be right. ;-)
>
> Well, after thinking about this overnight, I think by
> some miraculous twist of fate, both of these articles
> ARE right. I'm convinced of it. At least for the time
> being. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
David, I followed your examples but still have problems. In the uv
space my corners IDL and ENVI aggred
UpperLeftCoordinate:(-167346.0185E, 3677892.5566N)
LowerRightCoordinate:(1222128.8184E,2983386.7945N)
However in the lon/lat space i got:
IDL: UpperLeftCoordinate: (-98.555279E, 45.411655N)
LowerRightCoordinate: ( -81.568627E,51.346972N)
ENVI: UpperLeftCoordinate: (-98.09914722E, 33.30501389N)
LowerRightCoordinate:(-84.82142500E, 27.55810278N)
My image has 3000 col x 1500 lin. The pix resolution is 463.3127
meters.
mercatorMap = MAP_PROJ_INIT('Mercator', $
DATUM=8, $ ; WGS84
CENTER_LATITUDE=20.000, $
CENTER_LONGITUDE=-96.5000)
I tried different things but in all cases idl and envi did not match,
and I do not have any clue where is my error.
Any suggestion is welcome.
Robinson
|
|
|
Re: GeoTiff- grid [message #58127 is a reply to message #58125] |
Tue, 22 January 2008 13:12   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Humm, well, OK, here is an article that spells it out:
>
> http://www.dfanning.com/map_tips/pixel_to_ll.html
>
> Be aware, however, that there is an error either in this
> article, or in the previous one. But the two articles
> can't *both* be right. ;-)
Well, after thinking about this overnight, I think by
some miraculous twist of fate, both of these articles
ARE right. I'm convinced of it. At least for the time
being. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: GeoTiff- grid [message #58157 is a reply to message #58127] |
Mon, 21 January 2008 17:48   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Robinson writes:
> Hi David, today I was following http://www.dfanning.com/map_tips/tiffoverlay=
> .html
> ALL day. Probably I missed something. Let s se what happen tomorrow.
Humm, well, OK, here is an article that spells it out:
http://www.dfanning.com/map_tips/pixel_to_ll.html
Be aware, however, that there is an error either in this
article, or in the previous one. But the two articles
can't *both* be right. ;-)
Here is my problem, perhaps someone can help. Do the
corner values printed out by a program like GeoTiff dump
program like listgeo list the values in the *center* of
the corner pixels in the image, or values on the *edge*
of the image?
If the former, then the new article is correct and the
old article is incorrect. If the latter, then five days
of struggling with this leaves me no further ahead then
I was before. :-(
Have I mentioned that I *hate* map projections?
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.")
|
|
|
|
|
Re: GeoTiff- grid [message #58271 is a reply to message #58125] |
Tue, 22 January 2008 14:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
robinson.inj@gmail.com writes:
> David, I followed your examples but still have problems. In the uv
> space my corners IDL and ENVI aggred
> UpperLeftCoordinate:(-167346.0185E, 3677892.5566N)
> LowerRightCoordinate:(1222128.8184E,2983386.7945N)
> My image has 3000 col x 1500 lin. The pix resolution is 463.3127
> meters.
I get an image resolution of 2999 x 1499 when I take
the corner coordinates, subtract them, and divide
by the pixel resolution. The fact that ENVI and IDL
agree is a good thing, but in all of the GeoTIFF
files I've been working, with doing this arithmetic
gives me the image size exactly. So, that concerns
me.
> However in the lon/lat space i got:
> IDL: UpperLeftCoordinate: (-98.555279E, 45.411655N)
> LowerRightCoordinate: ( -81.568627E,51.346972N)
> ENVI: UpperLeftCoordinate: (-98.09914722E, 33.30501389N)
> LowerRightCoordinate:(-84.82142500E, 27.55810278N)
Unless you are using the *completely* wrong map projection
(how did you determine what this is?), then it looks to me
like you didn't convert the corners you thought you were
converting.
But I would like to see the listgeo output to know
what I am dealing with here.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|