<div dir="ltr"><div>I want to figure out how to calculate or obtain the coordinates defined in the generated KML file from the 'set kml' command.</div><div>Simply using the defined coordinates of the 'set lat / set lon' commands do not match up exactly with what's in the KML file, and I can't figure out the logic to skew those numbers manually.</div><div>Because of the way my system is set up, it's inconvenient to use the KML option and parse the kml file.</div><div>I'm also generating the PNG myself with the following code. I'm not sure if that matters, but I just want to make sure that my edge coordinates are exact.</div><div>Ideas?</div><div><br></div><div>Here is my abbreviated code.</div><div><br></div><div>* define my map bounds</div><div>'set lon -129 -64'<br>'set lat 23.5 52'<br></div><div><br></div><div>* generate the base PNG layer instead of using the KML's TIF</div>'set parea 0 11 0 8.5'<br>'set grid off'<br>'set mproj scaled'<br>'set mpdraw off'<br>'set grads off'<br>'set gxout shaded'<br>'display var'<br>'printim myimg.png x2048 y1024 -t 0'<br><br>* KML file providing coordinates I want to obtain without having to produce this KML<br>'set mproj latlon'<br>'set gxout kml'<br>'set kml -img mykml'<br>'display var'<div><br></div><div>Resulting coordinates in KML say:</div><div>    <LatLonBox><br>      <west>   -129.02</west><br>      <east>   -63.975</east><br>      <south>    23.485</south><br>      <north>    52.015</north><br>      <rotation>0.0</rotation><br>    </LatLonBox></div><div>Which are not the same as my 'set lon/set lat' definitions.<br><div><br></div><div>These scripts run for different domains and maps that I can't simply write this down once and use those values. They are modified on the fly so I need to figure it out on the fly.</div><div><br></div><div>Thanks in advance!</div></div></div>