Mapping Toolbox: Using a map created by geoshow(Z,R),

betty bowles · Mar 3, 2022 · 2.4K views
Question
Mapping Toolbox: Using a map created by geoshow(Z,R), how do I find the new map geocoordinate limits after the Zoom tool is used to rubberband and zoom in to a new area on map? So I have gridded geospatial data in a figure created with geoshow(Z,R). This figure has latLim and lonLim associated with axesm. These do not change after the zoom event. Axis has properties xmin xmax ymin ymax that do change, but these values are in pixels? normalized? Are these axis limits the values that have to be converted to lat/lon coordinates? If so, How? If not, what is the appropriate approach?( FYI:using MATLAB 2011ra but 2014 will be made available to me soon if the answer makes a difference) Thanks! example: some values recorded in process:   >> figure   >> worldmap(MTX,REF)   >> h=geoshow(MTX,REF);   >> getm(gca,'MapLonLimit')   ans =   -210.1333 -120.8000 >> getm(gca,'MapLatLimit')   ans =   49.8000 80.1333 >> axis   ans =  -0.4716 0.4716 0.8680 1.4465 >> % USED Toolbar zoom tool to ZOOM in NOW. New values below...   >> getm(gca,'MapLonLimit')   ans =  -210.1333 -120.8000 >> getm(gca,'MapLatLimit')   ans =  49.8000  80.1333 >> axis   ans =      -0.1522    0.0675    1.0562    1.1910   >> get(gca,'Units')   ans =   normalized
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 19, 2026

The axis values when using geoshow are usually in the range of roughly -0.5 to 0.5. You can convert them to lat/lon coordinates with minvtran. For example, here are the four corners of a map in projected map coordinates, counterclockwise from the lower left:

 

ax = axis; 
x = [ax(1) ax(2) ax(2) ax(1); 
y = [ax(3) ax(3) ax(4) ax(4);

Now you can convert those x,y coordinates to lat,lon coordinate like this:

[lat,lon] = minvtran(x,y);

And those are the geo coordinates of the four corners of your map. You could go the other way with mfwdtran if you want to set axis limits to known geo coordinates.

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!