Divooka Reference

Geography

5 nodes

On this page 5

Cell At

Function

The painting grid's cell under a place: column 0 at longitude −180°, row 0 at the north pole.

Signature
CellAt -> Integer Array
    world: World
    latitude: Number
    longitude: Number
int[] CellAt(World world, double latitude, double longitude)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudeNumber—Degrees north.
longitudeNumber—Degrees east.

Returns

CellInteger Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geography
Package
Fantasy Planet Painter

Cell Centre

Function

The place at the centre of a cell of the painting grid.

Signature
CellCentre -> Geo Point
    world: World
    column: Integer
    row: Integer
GeoPoint CellCentre(World world, int column, int row)

Parameters

nametypedefaultdescription
worldWorld—The world.
columnInteger—From 0 at longitude −180°.
rowInteger—From 0 at the north pole.

Returns

PlaceGeo Point
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geography
Package
Fantasy Planet Painter

Distance

Function

The distance between two places along the planet's surface.

Signature
Distance -> Number
    world: World
    fromLatitude: Number
    fromLongitude: Number
    toLatitude: Number
    toLongitude: Number
double Distance(
    World world,
    double fromLatitude,
    double fromLongitude,
    double toLatitude,
    double toLongitude)

Parameters

nametypedefaultdescription
worldWorld—The world, whose radius sets the distance.
fromLatitudeNumber—Degrees north.
fromLongitudeNumber—Degrees east.
toLatitudeNumber—Degrees north.
toLongitudeNumber—Degrees east.

Returns

KilometresNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geography
Package
Fantasy Planet Painter

Project

Function

Where a place falls on an image of a view.

Signature
Project -> Map Point
    world: World
    view: View
    width: Integer
    height: Integer
    latitude: Number
    longitude: Number
MapPoint Project(
    World world,
    View view,
    int width,
    int height,
    double latitude,
    double longitude)

Parameters

nametypedefaultdescription
worldWorld—The world.
viewView—The view.
widthInteger—The image's width, in pixels.
heightInteger—The image's height, in pixels.
latitudeNumber—Degrees north.
longitudeNumber—Degrees east.

Returns

PointMap Point
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geography
Package
Fantasy Planet Painter

Unproject

Function

Which place a pixel of an image of a view shows.

Signature
Unproject -> Geo Point
    world: World
    view: View
    width: Integer
    height: Integer
    x: Number
    y: Number
GeoPoint Unproject(
    World world,
    View view,
    int width,
    int height,
    double x,
    double y)

Parameters

nametypedefaultdescription
worldWorld—The world.
viewView—The view.
widthInteger—The image's width, in pixels.
heightInteger—The image's height, in pixels.
xNumber—Pixels from the left edge.
yNumber—Pixels from the top edge.

Returns

PlaceGeo Point
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geography
Package
Fantasy Planet Painter