Knowledge Base Article
KB10679 - How can I get shape WKT geometry in a given projection?
Implement this function:
function MyExportToWKT( const _shp : TGIS_Shape ) : String ;
var
; tmp : TGIS_Shape ;
; i,j : Integer ;
begin
; tmp := _shp.CreateCopy ;
; try
; ; tmp.Lock( gisLockInternal );
; ; try
; ; ; tmp.Reset ;
; ; ; for j := 0 to _shp.GetNumParts - 1 do begin
; ; ; ; tmp.AddPart ;
; ; ; ; for i:= 0 to _shp.GetPartSize( j ) - 1 do begin
; ; ; ; ; tmp.AddPoint( _shp.GetPoint( j, i ) ) ;
; ; ; ; end ;
; ; ; end ;
; ; finally
; ; ; tmp.Unlock;
; ; end ;
; ; Result := tmp.ExportToWKT ;
; finally
; ; tmp.Free ;
; end ;
end ;
Created: 2006-02-08, Modified: 2006-02-08
|