Index: ../trunk-jpl/src/m/shp/shpread.m =================================================================== --- ../trunk-jpl/src/m/shp/shpread.m (revision 17203) +++ ../trunk-jpl/src/m/shp/shpread.m (revision 17204) @@ -5,6 +5,8 @@ % fields x and y corresponding to the coordinates, one for the filename of % the shp file, for the density, for the nodes, and a field closed to % indicate if the domain is closed. +% If this initial shapefile is point only, the fields closed and +% points are ommited % The first argument is the .shp file to be read and the second one (optional) % indicates if the last point shall be read (1 to read it, 0 not to). % @@ -52,6 +54,27 @@ end end end + + if strcmpi(shp(i).Geometry,'Point'), + x=shp(i).X'; y=shp(i).Y'; + ids=find(isnan(x)); + x(ids)=[]; y(ids)=[]; + + Struct(end+1).x=x; + Struct(end).y=y; + Struct(end).density=1; + if isfield(shp,'id'), + Struct(end).name=num2str(shp(i).id); + else + Struct(end).name=''; + end + for j=1:length(fields), + field=fields{j}; + if ~(strcmpi(field,'X') | strcmpi(field,'Y') | strcmpi(field,'id')), + Struct(end).(field)=shp(i).(field); + end + end + end end end Index: ../trunk-jpl/src/m/shp/shpdisp.m =================================================================== --- ../trunk-jpl/src/m/shp/shpdisp.m (revision 17203) +++ ../trunk-jpl/src/m/shp/shpdisp.m (revision 17204) @@ -44,9 +44,14 @@ figure(figurenumber),hold on for i=1:length(domain), - if (isnumeric(linestyle)) - plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth); + if(isfield(domain,'nods')) + if (isnumeric(linestyle)) + plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth); + else + plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle,'linewidth',linewidth); + end else - plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle,'linewidth',linewidth); + plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'ro','MarkerSize',5); end + end