ElevationReader
Introduction
The vtkElevationReader aims to read a text file formatted as below and create a bumpy plane based on the elevation defined in that file. If a line has 10 elevation values, that means the plane will have 10 points along the X axis. If the file has 5 lines, that means the plane will have 5 points along the Y axis.
1 2 3 4 5
5 4 3 2 1
1 2 3 4 5
5 4 3 2 1
1 2 3 4 5Each number represents an elevation on a uniform grid where a line (horizontal) define the elevations along the X axis. With that in mind, new lines (vertical) define the elevations along the Y axis and the actual number is the elevation along Z.
In order to properly represent that in world coordinates, you can provide an origin which will define the coordinate of the first point without its elevation. Then you need to describe how much you should move along X and Y between two elevations definition. For that we use xSpacing and ySpacing. Since the elevation is given to us as a number, we can scale it via zScaling. Finally you may decide that your grid should move along positive X and negative Y while reading the file. The xDirection and yDirection are meant to give you control on that end.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkElevationReader characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IElevationReaderInitialValues | No | (default: {}) |
getDataAccessHelper
getUrl
Get the url of the object to load.
getXDirection
getXSpacing
getYDirection
getYSpacing
getZScaling
invokeBusy
| Argument | Type | Required | Description |
|---|---|---|---|
busy | Boolean | Yes |
isBusy
loadData
Load the object data.
| Argument | Type | Required | Description |
|---|---|---|---|
options | IElevationReaderOptions | No |
newInstance
Method used to create a new instance of vtkElevationReader
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IElevationReaderInitialValues | No | for pre-setting some of its content |
onBusy
| Argument | Type | Required | Description |
|---|---|---|---|
callback | Yes |
parseAsText
Parse data as text.
| Argument | Type | Required | Description |
|---|---|---|---|
content | String | Yes | The content to parse. |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setDataAccessHelper
| Argument | Type | Required | Description |
|---|---|---|---|
dataAccessHelper | Yes |
setUrl
Set the url of the object to load.
| Argument | Type | Required | Description |
|---|---|---|---|
url | String | Yes | the url of the object to load. |
option | IElevationReaderOptions | No | The Elevation reader options. |
setXDirection
| Argument | Type | Required | Description |
|---|---|---|---|
xDirection | Number | Yes |
setXSpacing
| Argument | Type | Required | Description |
|---|---|---|---|
xSpacing | Number | Yes |
setYDirection
| Argument | Type | Required | Description |
|---|---|---|---|
yDirection | Number | Yes |
setYSpacing
| Argument | Type | Required | Description |
|---|---|---|---|
ySpacing | Number | Yes |
setZScaling
| Argument | Type | Required | Description |
|---|---|---|---|
zScaling | Number | Yes |