AddSection |
Top Previous Next |
Call this method to add the actual coordinates in SegList:
Syntax: AddSection(Index: integer; var SegList: TFloatPointArrayEx)
For polyline datasets, the index parameter has no effect and you can just set it to 0.
For region / polygon objects it is important to store information about outer / inner rings (holes) correctly and different file formats has different requirements:
GML, KML, MITAB Direction of coordinates: No requirements Should be stored as first 1 outer and then N inner polygons. This can be followed by further outer/inner sequences. Index should be 0, 1, 2, 3 .... Change sign, if it is an outer polygon.
SHP Direction of coordinates for outer polygons: Clockwise. Direction of coordinates for inner polygons: Anti-clockwise. Order of polygons and index parameter doesn't matter.
MIF and Array No requirements
Common set of rules for all file formats Direction of coordinates for outer polygons: Clockwise. Direction of coordinates for inner polygons: Anti-clockwise. Should be stored as first 1 outer and then N inner polygons. This can be followed by further outer/inner sequences. Index should be 0, 1, 2, 3 .... Change sign, if it is an outer polygon. First and last coordinate should be the same for polygons or an error is raised.
|