The ProjectDataFile method reprojects coordinates in data files.
Syntax
object.ProjectDataFile( InputDataFilePath, xCol, yCol, OutputDataFilePath, pInputProjection, pOutputProjection, ApplyDatum )
Parameter |
Type |
Description |
InputDataFilePath |
String |
required; input path |
xCol |
Integer |
required; column containing X coordinates, column A equals 1 |
yCol |
Integer |
required; column containing Y coordinates, column A equals 1 |
OutputDataFilePath |
String |
required; output path |
pInputProjection |
Projection |
required; input Projection object |
pOutputProjection |
Projection |
required; output Projection object |
ApplyDatum |
Boolean |
required; true to apply datum conversion |
Example
'ProjectDataFile
Set source = Plot.CreateProjectionObject
source.DatumType = mvDatum_World_Geodetic_System_1984
source.ProjectionType = mvProjNone
Set destination = Plot.CreateProjectionObject
destination.ProjectionType = mvProjUTM
'Reproject the USCity.dat file (in WGS 1984) to something else
Plot.ProjectDataFile(InputDataFilePath:=mvApp.ModuleFolder + "\Samples\uscity.dat", _
XCol:=3, YCol:=4, _
OutputDataFilePath:=mvApp.ModuleFolder + "\Samples\uscity_reprojected.dat", _
pInputProjection:= source, _
pOutputProjection:= destination, _
ApplyDatum:= True)
'Delete projections when finished
source.Delete
destination.Delete
Used by: PlotDocument object