Re: shifted .kml created with IDL [message #80951] |
Mon, 30 July 2012 06:13  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I haven't made KML files, but when I work with Google Maps,
> they always come back in a Mercator projection. I presume
> that is what they are using.
To navigate the Google Static Maps that I get from Google,
I use a Mercator projection with a WGS84 datum:
mapCoord = Obj_New('cgMap', 105, Datum=8)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: shifted .kml created with IDL [message #80953 is a reply to message #80952] |
Mon, 30 July 2012 05:55   |
titan
Messages: 59 Registered: March 2006
|
Member |
|
|
On Monday, July 30, 2012 2:36:49 PM UTC+2, David Fanning wrote:
> titan writes:
>
>
>
>> My problem is that when I open the .kml file it is shifted and is not correctly overlaying with the features likes lake or border lines.
>
>> Even if I inserted the coordinates taken from google earth:
>
>>
>
>> ul_lat_GE=47.750684
>
>> ul_lon_GE=9.015974
>
>> ;
>
>> lr_lat_GE=45.222022
>
>> lr_lon_GE=13.612157
>
>>
>
>> I'm still not able to correctly overlay my image :(
>
>>
>
>>
>
>> Could someone tell me what I'm doing wrong?
>
>
>
> I would guess the map projection in your GeoTiff
>
> file is different from the map projection Google
>
> Earth uses. You will probably have to convert
>
> your GeoTiff coordinates to the proper map
>
> projection.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Hi David,
first of all thanks for your answer!
this is how I calculated the coordinates
utmMap = MAP_PROJ_INIT('UTM', DATUM=12, ZONE=32)
lonlat = MAP_PROJ_INVERSE([xLL,yLL,xUR,yUR], MAP_STRUCTURE=utmMap)
lon_range=[lonlat[0,0],lonlat[0,1]]
lat_range=[lonlat[1,0],lonlat[1,1]]
; Set the center of the projection
c_lat = (lat_range(0) + lat_range(1)) * 0.5
c_lon = (lon_range(0) + lon_range(1)) * 0.5
UL_lat=lonlat[1,1]
UL_lon=lonlat[0,0]
LR_lat=lonlat[1,0]
LR_lon=lonlat[0,1]
I'm using the DATUM=12 as you suggest here
http://www.idlcoyote.com/map_tips/utmwrong.php
I thought google earth projection was UTM.
If I'm wrong could you please tell me which kind of projection is google earth using?is it a particular one?
thanks
|
|
|
|
Re: shifted .kml created with IDL [message #81050 is a reply to message #80951] |
Mon, 30 July 2012 07:23  |
titan
Messages: 59 Registered: March 2006
|
Member |
|
|
On Monday, July 30, 2012 3:13:24 PM UTC+2, David Fanning wrote:
> David Fanning writes:
>
>
>
>> I haven't made KML files, but when I work with Google Maps,
>
>> they always come back in a Mercator projection. I presume
>
>> that is what they are using.
>
>
>
> To navigate the Google Static Maps that I get from Google,
>
> I use a Mercator projection with a WGS84 datum:
>
>
>
> mapCoord = Obj_New('cgMap', 105, Datum=8)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Thanks a lot David,
Tomorrow I will try using it as structure in the MAP_PROJ_INVERSE function and I will let you know as soon as possible
cheers
|
|
|