class ShapeRecord

ShapeFile record class.

Properties

$recordNumber
$shapeType
$lastError
$SHPData
$DBFData

Methods

__construct(int $shapeType)

No description

loadFromFile(ShapeFile $ShapeFile, file $SHPFile, file $DBFFile)

Loads record from files.

saveToFile(file $SHPFile, file $DBFFile, int $recordNumber)

Saves record to files.

updateDBFInfo(array $header)

Updates DBF data to match header.

addPoint(array $point, int $partIndex = 0)

Adds point to a record.

deletePoint(int $pointIndex = 0, int $partIndex = 0)

Deletes point from a record.

int
getContentLength()

Returns length of content.

setError(string $error)

Sets error message.

string
getShapeName()

Returns shape name.

Details

at line 49
__construct(int $shapeType)

Parameters

int $shapeType

at line 61
loadFromFile(ShapeFile $ShapeFile, file $SHPFile, file $DBFFile)

Loads record from files.

Parameters

ShapeFile $ShapeFile
file $SHPFile &$SHPFile Opened SHP file
file $DBFFile &$DBFFile Opened DBF file

at line 140
saveToFile(file $SHPFile, file $DBFFile, int $recordNumber)

Saves record to files.

Parameters

file $SHPFile &$SHPFile Opened SHP file
file $DBFFile &$DBFFile Opened DBF file
int $recordNumber Record number

at line 201
updateDBFInfo(array $header)

Updates DBF data to match header.

Parameters

array $header DBF structure header

at line 647
addPoint(array $point, int $partIndex = 0)

Adds point to a record.

Parameters

array $point Point data
int $partIndex Part index

at line 692
deletePoint(int $pointIndex = 0, int $partIndex = 0)

Deletes point from a record.

Parameters

int $pointIndex Point index
int $partIndex Part index

at line 754
int getContentLength()

Returns length of content.

Return Value

int

at line 841
setError(string $error)

Sets error message.

Parameters

string $error

at line 851
string getShapeName()

Returns shape name.

Return Value

string