Filter löschen
Filter löschen

How do I rescale a map picture so the axes are lat and lon

1 Ansicht (letzte 30 Tage)
Shachar Givon
Shachar Givon am 3 Mai 2018
Bearbeitet: dpb am 4 Mai 2018
I have a satallite picture of an area and when I look at it in matlab the axis are set as the pixel numbers. Instead I want the axes to show the lat and lon coordinates. I know the exact lat lon coordinates of two points in the image and using ginput I also know their pixel coords. Is there a way to tell matlab what their lat lon coords are and have it redo the axes based on that information?

Antworten (1)

dpb
dpb am 3 Mai 2018
Bearbeitet: dpb am 4 Mai 2018
Presuming the two points are not on EW or NS line and have sufficient resolution, you can solve for the linear conversion of pixel position to lat/lon as linear equation for lat and lon independently.(*)
If you leave the plot in pixels then to display the lat/lon will require writing values to the ticklabel property for each axis which will not update with zoom, etc.
I don't have it and have never used it, but I would presume the Mapping TB would have such features built in that would have to "roll your own" with just the basic image routines in base product.
(*) Of course, you've got to go through some machinations for lat/lon or use a linear scale since normal degrees/minutes/seconds isn't directly usable in that manner. There are routines for the purpose I see in the Mapping TB as presumed must be {long/lat}itudeToIntrinsic{X/Y} but there's nothing specific for either in the base ML product according to lookfor

Kategorien

Mehr zu 3-D Scene Control finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by