net.corda.finance.utils

## Class WorldCoordinate

• net.corda.finance.utils.WorldCoordinate

• `public class WorldCoordinate`

A latitude/longitude pair.

• ### Constructor Summary

Constructors
Constructor and Description
```WorldCoordinate(double latitude, double longitude)```
A latitude/longitude pair.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`double` `component1()`
`double` `component2()`
`WorldCoordinate` ```copy(double latitude, double longitude)```
A latitude/longitude pair.
`boolean` `equals(java.lang.Object p)`
`double` `getLatitude()`
`double` `getLongitude()`
`int` `hashCode()`
`ScreenCoordinate` ```project(double screenWidth, double screenHeight, double topLatitude, double bottomLatitude, double leftLongitude, double rightLongitude)```
Convert to screen coordinates using the Mercator projection. You should have a world map image that you know the precise extents of for this function to work.
`java.lang.String` `toString()`
• ### Constructor Detail

• #### WorldCoordinate

```public WorldCoordinate(double latitude,
double longitude)```

A latitude/longitude pair.

• ### Method Detail

• #### project

```public ScreenCoordinate project(double screenWidth,
double screenHeight,
double topLatitude,
double bottomLatitude,
double leftLongitude,
double rightLongitude)```

Convert to screen coordinates using the Mercator projection. You should have a world map image that you know the precise extents of for this function to work.

Note that no world map ever has latitude extents of -90 to 90 because at these extremes the mapping tends to infinity. Google Maps, for example, uses a square map image, and square maps yield latitude extents of 85.0511 to -85.0511 = arctan(sinh(π)).

• #### getLatitude

`public double getLatitude()`
• #### getLongitude

`public double getLongitude()`
• #### component1

`public double component1()`
• #### component2

`public double component2()`
• #### copy

```public WorldCoordinate copy(double latitude,
double longitude)```

A latitude/longitude pair.

• #### toString

`public java.lang.String toString()`
• #### hashCode

`public int hashCode()`
• #### equals

`public boolean equals(java.lang.Object p)`