I have a problem with GEOSHOW. My code works in Mapping Toolbox versions R14SP3 through R2008a but errors out in R2008b and later. Here is the error:
??? Error using ==> trimPolygonToQuadrangle>mergeEndToEndPairs at 221 Inconsistent polygon topology: Encountered a chain of more than two connecting pairs. Error in ==> trimPolygonToQuadrangle>trimLongitudes at 111 [lon, lat] = mergeEndToEndPairs(lon, lat, lonlim, tolSnap); Error in ==> trimPolygonToQuadrangle at 45 [lat, lon] = trimLongitudes(lat, lon, lonlim, tolSnap); Error in ==> applyProjection>applyForward at 62 [lat, lon] = trimPolygonToQuadrangle( ... Error in ==> doApplyProj at 31 [x, y, savepts] = mproj.applyForward(mproj, mstruct, in1, in2, objectType); Error in ==> applyProjection at 14 outputs = doApplyProj(mproj, varargin{:}); Error in ==> lambert at 30 varargout = applyProjection(mproj, varargin{:}); Error in ==> geovec at 21 [x, y] = feval(projName, mstruct, lat, lon, objectType, 'forward'); Error in ==> geostructshow>@(s,varargin)geovec(mstruct,s.Lat,s.Lon,objectType,fcn,varargin{:}) at 143 h = symbolizeMapVectors(S, symspec, @(s, varargin) ... Error in ==> symbolizeMapVectors>plotMapFeature at 128 h = plotfcn(s, props{:}); Error in ==> symbolizeMapVectors at 116 hg = plotMapFeature(S(k), hg, props, plotfcn); Error in ==> geostructshow at 143 h = symbolizeMapVectors(S, symspec, @(s, varargin) ... Error in ==> geoshow at 256 h = showFcn(varargin{:}); Error in ==> snake_shp_bug at 21 geoshow(ax,snake,'EdgeColor','r','FaceColor','n');
Here is the relevant part of my code:
snake = shaperead(... 'integrate.shp',... 'UseGeoCoords', true, 'BoundingBox',[lonlim', latlim']);geoshow(ax,snake,'EdgeColor','r','FaceColor','n');
Best Answer