I am trying to accomplish something similar to the below post, namely prevent my data from wrapping at the meridians. So far, no luck:
If I set the lonLim to [-360 360] and call geolimits(latlim,lonlim), the longitude limits do NOT change to [-360 360] but to [-180.3914 181.1743]. Why is this? Is there a bult-in max limit in geolimits? It's possible that the function is confused by the [-360 360] values, which are effectively equivalent.
But back to the wraparound issue. I am plotting NetCDF-type satellite observation data.
geobasemap(gx,'usgsimagery');
geolimits(gx, latLim, lonLim);
lat = ncread(filepath, 'Latitude');
lon = ncread(filepath, 'Longitude');
lat1 = double(lat(:,:,1)) ;
lon1 = double(lon(:,:,1));
k = boundary(lat1(:),lon1(:));
pgon = geopolyshape(lat1(k),lon1(k));
I am able to plot the satellite observation patches on the Mercator projection geoaxes display. However, when a patch crosses the International Date Line, it does not straddle the line but whangs all the way to the right, to the Prime Meridian.
If I use geoplot instead of geopolyshape I get the same effect, only with vectors instead of shapes.When the longitude data reaches -180, the vectors jump all the way to the right instead of straddling the dateline.
geoplot(gx,lat1(k),lon1(k));
How can I massage my NetCDF data to prevent this?
My goal is to collect all the patches and merge them into a single surface as described here: