Error using siteviewer with Application Compiler

조회 수: 6 (최근 30일)
constantine pappas
constantine pappas 2024년 8월 7일
편집: Walter Roberson 2024년 8월 13일
When attempting to use siteviewer, in a standalone application created with the Application Compiler, the following error occurs:
Error using siteviewer
Expected Basemap to match one of these values:
'darkwater', 'grayland', 'bluegreen', 'grayterrain', 'colorterrain', 'landcover', 'streets', 'streets-light', 'streets-dark', 'satellite', 'topographic', 'none'
The input, 'usgsimagery', did not match any of the valid values.
Error in siteViewTestwcomp (line 44)
MATLAB:graphics:maps:unrecognizedStringChoice
*****
Please note, the code executes as expected when run from the Matlab command prompt.
The error only manifests itself when attempting to run the executable generated from the App. Compiler.
Minimal code to create error:
% siteviewer
rtxTerrainMap_GLB = siteviewer('Basemap','satellite','Terrain','gmted2010','Name','Globe-Terrain Map');
%%{
% longley rice initial parameters
propModel_ITM = propagationModel(...
"longley-rice",...
"AntennaPolarization","horizontal",...
"AtmosphericRefractivity",301,...
"ClimateZone","continental-temperate",...
"GroundConductivity",0.005,...
"GroundPermittivity",15,...
"SituationVariabilityTolerance",0.5,...
"TimeVariabilityTolerance",0.5...
);
% free space
propModel_FREESPACE = propagationModel('freespace');
% rain atten
propModel_RAIN = propagationModel('rain','rainrate',0);
% ref. ellipsoid
wgs84 = wgs84Ellipsoid("m");
%}
*****
Curiously, if I simply compile only the siteviewer, the executable runs correctly, and the siteveiwer globe opens.
% siteviewer
rtxTerrainMap_GLB = siteviewer('Basemap','satellite','Terrain','gmted2010','Name','Globe-Terrain Map');
*****
Given that in all case the specified basemap is in the list of expected values, is there something I'm missing for the deployed version, why are the additional prop model definitions causing executable issue?
thank you in advance. Please let me know if any additional information is needed.
cp

채택된 답변

Garmit Pant
Garmit Pant 2024년 8월 8일
Hello Constantine Pappas,
The error you have encountered suggests that the “siteviewer” function is receiving an invalid input argument.
I compiled the code you provided in MATLAB R2023b but could not reproduce the error, even when using the code for the propagation model. The application ran without any issues, displaying the Global Terrain Map.
The error suggests that ‘usgsimagery’ was passed as the input argument. Please ensure that the input argument to the “Basemap” parameter matches one of the permissible values ('darkwater', 'grayland', 'bluegreen', 'grayterrain', 'colorterrain', 'landcover', 'streets', 'streets-light', 'streets-dark', 'satellite', 'topographic', 'none').
Also, ensure that the MATLAB Runtime used to run the application matches the version of your MATLAB.
For further understanding, kindly refer to the following MathWorks documentation:
I hope you find the above explanation and suggestions useful!
  댓글 수: 1
constantine pappas
constantine pappas 2024년 8월 13일
Solved!
Thanks you very much for your reply, specifically your comment, "The error suggests that ‘usgsimagery’ was passed as the input argument."
usgsimagery was not a variable name used by me.
Upon further searching I found usgsimagry.png in my R2023b prferences folder.
Following the advice given in:
In breif:
*****
Locate my MATLAB Preference directory by running the following command in the MATLAB Command Window:
>> prefdir
Make sure MATLAB is closed and rename the directory from R2023b to R2023b_old (in case you want to revert back).
Then create a new empty folder with the name R2023b
Then restart MATLAB and it will create the preferences file in the new folder
*****
So I simply renamed my folder and created an empty R2023b folder, and everything is working as expected.
thank you again for the insight.
cp

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Propagation and Channel Models에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by