|
Hi,
I have a matrix (5541*2) containing longitude and latitude coordinates. I am trying to write an ESRI shapefile using the shapewrite function. My script is:
x = a(:,1); %longitude
y = a(:,2); %latitude
id=['test'];
%create a 1*1 empty structure that can be written using shapewrite
shp=repmat(struct('X',[],'Y',[],'Geometry','MultiPoint','ID',[]),1,1);
%add data to structure
[shp(1).X]=x; %x is your eastings column
[shp(1).Y]=y; %y is your northings column
[shp(1).ID]=id;
% name and create file path
dname='C:\temp\';
name=['test'];
%write the shapefile
shapewrite(shp,[dname,name])
The problem I'm having is that when you bring the newly created shapefile into ArcGIS, the attributes (i.e. lat, lon values) associated with each point are not displayed (you can only see these values in matlab). Does anyone know how to get the actual point values to be be also available in ArcGIS?
Thanks
Jon
|