The GeoPoint data type is derived from the Geography data type. This means it has a similar functionality to the Geography data type but is specific to represent the Geometry Point.
DBMSs: SQL Server, Oracle, MySQL, SAP Hana, PostgreSQL
Generators: .NET, .NET Framework, Java, Android, Apple
To initialize an attribute or variable based on the GeoPoint data type you must use the New constructor as follows:
Att|Variable = GeoPoint.New(Latitude Number, Longitude Number)
Where:
Att | Variable
Is an attribute or variable based on the GeoPoint data type.
Latitude Number
Is a Latitude Coordinate.
Longitude Number
Is a Longitude Coordinate.
&OfficeLocation = GeoPoint.New(-34.8910275746741, -56.18720064473088)
Specific properties that apply to the GeoPoint data type are as follows:
Property |
Type |
Description |
Srid |
int |
Spatial Reference System Identifier (SRID), identifies the reference system for the represented Geographic object. See https://en.wikipedia.org/wiki/SRID. |
Longitude |
int(12,8) |
Value of the Longitude (horizontal) coordinate for the point. |
Latitude |
int(12.8) |
Value of the Latitude (vertical) coordinate for the point. |
Although the following methods specifically apply to the GeoPoint data type, all the methods that apply to the Geography data type can also be applied to the GeoPoint data type:
Method |
Type Returned |
Description |
FromWKT(Character) |
GeoPoint |
The format of the Character parameter should be: 'POINT(LongitudeNumber LatitudeNumber)' |
FromString(Character) |
GeoPoint |
Analogous to the FromWkt method. In addition to using the FromWkt method (that receives a Wkt format as an input parameter), the FromString method can be applied to a GeoPoint data type (receiving a string based on the Geolocation domain as an input parameter). This is only available for Android.
Sample: &GeoPointVariable.FromString("-34.92478600243492, -56.163740158081055") |
FromGeoJson (Character) |
GeoPoint |
The format of the Character parameter should be: '{"type":"Point","coordinates":[LongitudeNumber, LatitudeNumber]}' |
ToGeography(GeoPoint) |
Geography |
Converts the Point to a Geography type. |
Note: There is also a static version of these methods.