Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ingeoquad

True for points inside or on lat-lon quadrangle

Syntax

tf = ingeoquad(lat, lon, latlim, lonlim)

Description

tf = ingeoquad(lat, lon, latlim, lonlim) returns an array tf that has the same size as lat and lon. tf(k) is true if and only if the point lat(k), lon(k) falls within or on the edge of the geographic quadrangle defined by latlim and lonlim. latlim is a vector of the form [southern-limit northern-limit], and lonlim is a vector of the form [western-limit eastern-limit]. All angles are in units of degrees.

Examples

  1. Load and display a digital elevation model (DEM) including the Korean Peninsula:

    korea = load('korea');
    R = refvecToGeoRasterReference(korea.refvec, size(korea.map));
    figure('Color','white')
    worldmap([20 50],[90 150])
    geoshow(korea.map, R, 'DisplayType', 'texturemap');
    demcmap(korea.map)
    

  2. Outline the quadrangle containing the DEM:

    [outlineLat, outlineLon] = outlinegeoquad(R.Latlim, ...
       R.Lonlim, 90, 5); 
    geoshow(outlineLat,outlineLon,'DisplayType','line', ...
       'Color','black') 
    
  3. Generate a track that crosses the DEM:

    [lat, lon] = track2(23, 110, 48, 149, [1 0], 'degrees', 20);
    geoshow(lat, lon, 'DisplayType', 'line')

  4. Identify and mark points on the track that fall within the quadrangle outlining the DEM:

    tf = ingeoquad(lat, lon, R.Latlim, R.Lonlim);
    geoshow(lat(tf), lon(tf), 'DisplayType', 'point')

Introduced in R2008a

Was this topic helpful?