# Class: Proj4::Point

Inherits:
Object
• Object
show all
Defined in:
lib/proj4rb.rb

## Overview

This class represents a point in either lon/lat or projected x/y coordinates.

## Instance Attribute Summary collapse

• X coordinate or longitude.

• Y coordinate or latitude.

• Z coordinate (height).

## Instance Method Summary collapse

• constructor

Create new Proj4::Point object from coordinates.

• Get latitude/y coordinate.

• Set latitude/y coordinate.

• Get longitude/x coordinate.

• Set longitude/x coordinate.

## Constructor Details

### #initialize(x, y, z = 0) ⇒ Point

Create new Proj4::Point object from coordinates.

 ``` 328 329 330 331 332``` ```# File 'lib/proj4rb.rb', line 328 def initialize(x, y, z=0) @x = x @y = y @z = z end```

## Instance Attribute Details

### #x ⇒ Object

X coordinate or longitude

 ``` 319 320 321``` ```# File 'lib/proj4rb.rb', line 319 def x @x end```

### #y ⇒ Object

Y coordinate or latitude

 ``` 322 323 324``` ```# File 'lib/proj4rb.rb', line 322 def y @y end```

### #z ⇒ Object

Z coordinate (height)

 ``` 325 326 327``` ```# File 'lib/proj4rb.rb', line 325 def z @z end```

## Instance Method Details

### #lat ⇒ Object

Get latitude/y coordinate.

 ``` 340 341 342``` ```# File 'lib/proj4rb.rb', line 340 def lat y end```

### #lat=(lat) ⇒ Object

Set latitude/y coordinate.

 ``` 350 351 352``` ```# File 'lib/proj4rb.rb', line 350 def lat=(lat) @y = lat end```

### #lon ⇒ Object

Get longitude/x coordinate.

 ``` 335 336 337``` ```# File 'lib/proj4rb.rb', line 335 def lon x end```

### #lon=(lon) ⇒ Object

Set longitude/x coordinate.

 ``` 345 346 347``` ```# File 'lib/proj4rb.rb', line 345 def lon=(lon) @x = lon end```