hi, i have a shapefile (.shp) to be display in 2 different ways.Before and after simplification process.Therefore i applied reducem and bounding function.However the error is 'Reference to non-existent field 'BoundingBox''.Does anyone have an idea?

1 view (last 30 days)
%c = my shp location.
dc = shaperead(c,'UseGeoCoords', true,...
'Selector',{@(name) ...
strcmpi(name,c), 'Name'});
lat = extractfield(dc, 'Lat')';
lon = extractfield(dc, 'Lon')';
[latreduced, lonreduced] = reducem(lat, lon);
lonlim = dc.BoundingBox(:,1)' + [2.08 9.11];
latlim = dc.BoundingBox(:,2)' + [2.08 9.11];
  4 Comments
Walter Roberson
Walter Roberson on 31 Jan 2016
Resizing will not help if your shape is point structures; the documentation indicates that bounding box will not be created for point structures. You could possibly calculate a bounding box by taking max() and min() of the values.

Sign in to comment.

Answers (0)

Categories

Find more on Biomedical Imaging in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!