Mapping toolbox functions missing in installation

조회 수: 22 (최근 30일)
Rachel
Rachel 2025년 10월 11일
이동: Walter Roberson 2025년 10월 11일
Hi,
I am missing some mapping toolbox functions in R2023b, R2025a and R2025b.
Unrecognized function include 'worldGrid', 'geographicGrid', 'intrinsicToGeographic', 'geographicToDiscrete' and maybe more. I came across the issue when looking for replacement functions for the former function 'pixcenters'.
I cannot find any of these m-files anywhere in the Matlab root under either one of the three versions on any of my two computers, so I suspect that they were not included in the installation files?
The Matlab path includes the mapping toolbox and I have otherwise a fully functioning Mapping toolbox (license checkout 'MAP_Toolbox' = 1) with most other functions working properly: e.g., georefcells, readgeoraster, etc.
Does anybody experienced the same problem or knows how to fix this?
  댓글 수: 1
xingxingcui
xingxingcui 2025년 10월 11일
what's your output information using 'ver' in command window? Having see 'Mapping Toolbox'?

댓글을 달려면 로그인하십시오.

채택된 답변

Steve Eddins
Steve Eddins 2025년 10월 11일
These functions are implemented as methods of certain classes, such as MapCellsReference or GeographicCellsReference. As methods, they don't appear on the global search path, and you can't call them directly unless you use the correct calling syntax with the right kind of object. For example:
try
% This will error because worldGrid hasn't been called with the right
% kind of object.
worldGrid
catch e
% Show the error message.
disp(e.message)
end
Unrecognized function or variable 'worldGrid'.
But if you call it with a MapCellsReference object, it works:
% Doc example:
R = maprefcells([7000 7400],[2700 3300],[3 4]);
[X,Y] = worldGrid(R)
X = 3×4
7050 7150 7250 7350 7050 7150 7250 7350 7050 7150 7250 7350
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
Y = 3×4
2800 2800 2800 2800 3000 3000 3000 3000 3200 3200 3200 3200
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
After the method has been called, and therefore loaded into MATLAB, the which function will know about it and show you the location of the code file:
which worldGrid
/MATLAB/toolbox/map/map/+map/+rasterref/MapRasterReference.m % map.rasterref.MapCellsReference method
Here is another example, for one of the other functions you mentioned.
try
% This will error because worldGrid hasn't been called with the right
% kind of object.
geographicGrid
catch e
% Show the error message.
disp(e.message)
end
Unrecognized function or variable 'geographicGrid'.
% Doc example
R = georefcells([0 30],[-20 20],[3 4]);
[lat,lon] = geographicGrid(R)
lat = 3×4
5 5 5 5 15 15 15 15 25 25 25 25
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
lon = 3×4
-15 -5 5 15 -15 -5 5 15 -15 -5 5 15
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
which geographicGrid
/MATLAB/toolbox/map/map/+map/+rasterref/GeographicRasterReference.m % map.rasterref.GeographicCellsReference method
  댓글 수: 1
Rachel
Rachel 2025년 10월 11일
이동: Walter Roberson 2025년 10월 11일
Ok! That makes sense! Thanks for your answer!
I tested worldGrid on a GeographicCellsReference object, which obviously does not work.
I am trying to read a subsection of a huge GeoTIFF (12800 x 9600 pixels), which is georeferenced because I need to extract geographic latitudes and longitudes of objects in the image. Instead of needing to load the entire image and then crop it, I hope to find a way to read part of the image (image divided by 8) into memory. So far, I haven't found any simple way to do this apart from reading part of the GeoTIFF image with imread and then georeference the new image again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by