| Platform: | MapWindow |
| Task: | Loop through a shapefile and serialize the shapes to strings |
| Discussion: | One of the most basic things you might want to do is open a shapefile and loop through each of the shapes. This example converts the shapes to string and Debug.Prints them. |
| Example: | 'open a shapefile
Dim WaypointsShapefile As New MapWinGIS.Shapefile
WaypointsShapefile.Open("C:\temp\Projects\ARCN-VS18 Brown Bears\2010-05-25 2387S\2010-05-25_2387S_GPS76_Waypoints.shp")
'loop through the shapes and output the contents of the first field for each shape
For i = 0 To WaypointsShapefile.NumShapes - 1
Debug.Print(WaypointsShapefile.CellValue(1, i))
Next
'close the shapefile
WaypointsShapefile.Close() |