mapping - How to read in only a subset of polygons from a shapefile in matlab -


i trying read in subset of polygons shapefile have. using 'shaperead' read in shapefile, can't seem pull out polygons want. know should using 'selector' pair value arguments, exampl online doesn't make sense me:

s = shaperead('concord_roads.shp','selector',...        {@(v1,v2) (v1 >= 4) && (v2 >= 200),'class','length'}) 

there 'station number' attribute in shapefile identifies each of polygons. want able specify polygons map (based on previous clustering analysis).

wanted_stations = [...]; % defined  [s,c] = shaperead(filename,'selector',{@(v1) any(ismember(wanted_stations,v1)) ,'station_number'}); % assuming attribute name 'station_number' 

basically, each polygon, shaperead assigns value of attribute 'station_number' v1, evaluates anonymous function. values of wanted_stations vector incorporated function defined.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -