How to add a point in a empty vetorLayer creadted in memory

المشرف العام

Administrator
طاقم الإدارة
I am working in c++/qt 4.5 and qgis api c++ 2.8.2 I had to create and empty vectorLayer and add Point I saw in the qgis cookbook that it is possible to create a vector layer in memory ,I did that, and export to a file I did that too and It Works.

Here is , in detailled step , what I want to do :

a- create a vectorlayer in memory

b- add attributes to it

c- add features to it

d- save it in a shp file to be imported in QGIS

I don't know how to add attribute and set value .

is there a specific procedure ?

do you have somme link or some sample ?



أكثر...
 
أعلى