How do I display a particular section of a map using Latitude and Longitude values in MATLAB 7.4 (R2007a) ?

4 views (last 30 days)
I have a map which is in a geostruct format and I would like to display a particular region based on the Latitude and Longitude of the area.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The VIEWMAP0DATA function returns a structure or an array of a structure which contains information about different values pertaining to geographical data.
To view only a particular region of this map do the following:
1) Use the UPDATEGEOSTRUCT to save the output of VMAP0DATA function
land = viewmap0data('...');
st = updategeostruct(land);
VIEWMAP0DATA returns a geostruct. The updategeostruct function changes this structure to geostructure v2.
2) Use The SHAPEWRITE function to store the data in a shape file format on the disk
3 ) Use the SHAPEREAD function to read only the part of the map that you need to view. The SHAPEREAD function allows you to specify a bounding box to limit the data that you want to read, this bounding box can be in terms of Latitude and Longitude values.
Now use the GEOSHOW function to display the map.
The MAPEXGSHHS which is a built in example in the mapping toolbox shows how to use the above functions.

More Answers (0)

Products


Release

R2007a

Community Treasure Hunt

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

Start Hunting!