Geography data type

Official Content
This documentation is valid for:

We can formally represent geographical entities with the Geography data type. This implies that at the database level, geographical information is stored using specific data types supported by different database management systems.

From the Geography data type, the types GeoPoint, GeoLine, and GeoPolygon are derived. These are specialized variants of the Geography data type.

Use cases

Closest Point

We must store tourist attractions of a city, so we define the following transaction:

PlaceID*
PlaceName --> Character
PlaceGeo --> Geography

We then define a Web panel which, given any point and a distance in meters, returns all tourist attractions located within that radius from the point.

&MyPoint --> Geography
for each
     where PlaceGeo.Distance(&MyPoint) < &Distance
    load
endfor 
geo_getdistance

- Point in a Polygon

We have defined a transaction to store the different neighborhoods in the city as follows:

  
NeighborhoodId*
NeighborhoodName --> Character
NeighborhoodPlace --> Geography

We then define a Web panel which, given a specific tourist attraction, returns the neighborhood or zone where that attraction is located:

For each
      Where NeighborhoodPlace.Intersect(&Mypoint)
      &NeighborhoodPlace = NeighborhoodPlace
endfor

//&NeighborhoodPlace is of type Geography and is shown in the form

geo_getbarrio

Data Input

User Interface

Run the Transaction object and double click

FromString and FromGeoJson are two different methods that load data to the attribute. FromString receives a string in WKT format to load the positions, while FromGeoJson receives a file, in a GeoJSON format.
Notice that both format, receive any coordinate in Longitude and Latitude order, it means for example  POINT(Longitude Latitude)

New
   PlaceId = 1
   PlaceName = "Golf Club"
   PlaceGeo.FromString("POINT(-56.163740158081055 -34.92478600243492)")
endNew

New
   PlaceId = 2
   PlaceName = "Ramirez Beach"
   PlaceGeo.FromGeoJson('{"type":"Point","coordinates":[-56.1701774597168,-34.91676309400329]}')
endnew

New PlaceId = 3
   PlaceName = "Bulevar Artigas, Avenue"
   PlaceGeo.FromString("LINESTRING(-56.16090774536133 -34.928797162523516, -56.1650276184082 -34.89494244739731)")
endnew

New PlaceId = 4   
   PlaceName = "Bulevar España, Street"
   PlaceGeo.FromGeoJson('{"type": "LineString","coordinates": [[-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15905165672302, -34.91231144906833], [-56.15905165672302, -34.91231144906833], [-56.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434.15670204162597, -34.9131120591434]]}')
endnew

new
   PlaceId = 5
   PlaceName = "Cerro, Neighborhood"  
   PlaceGeo.FromString('POLYGON ((-56.248367 -34.873821, -56.266563 -34.876427, -56.263733 -34.890366, -56.268799 -34.893394, -56.26897 -34.900291, -56.264851 -34.902615, -56.253605 -34.895645, -56.247597 -34.895153, -56.246052 -34.889523, -56.248367 -34.873821, -56.248367 -34.873821))')
endnew

new
  PlaceId = 6
  PlaceName = "Punta Carretas, Neighborhood" 
    &geojsonbarrio = '{ "type": "Polygon",  "coordinates": [ [ [-56.148808,-34.918453], ['
    &geojsonbarrio = &geojsonbarrio + '-56.154835,-34.917061' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.156059,-34.916466' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.156250,-34.914318' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.162754,-34.914791' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.162003,-34.921761' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.165714,-34.919930' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.165737,-34.919930' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.168247,-34.919525' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.169598,-34.918205' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.171421,-34.919209' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.172668,-34.919685' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.172558,-34.920406' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.171207,-34.921566' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.171852,-34.924698' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.171249,-34.925278' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.169662,-34.925438' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.165329,-34.927372' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.161766,-34.929379' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.159920,-34.930645' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.157967,-34.927776' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.156445,-34.927177' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.153141,-34.925507' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.151508,-34.924644' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.151489,-34.923008' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.149151,-34.921497' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.148506,-34.921585' + '], ['
    &geojsonbarrio = &geojsonbarrio + '-56.148808,-34.918453' + '] ] ] }'
  PlaceGeo.FromGeoJson(&geojsonbarrio)
endnew


Sample

Geography data type Sample

Requirements

- API Key

To see a variable or geographical attribute in the form we use only one provider: GoogleMaps. For this, you must configure an API Key.

In the case of SmartDevices (Android), you must configure the Android Maps API Key property

In the case of Web panels, you must configure the API Key for each control in the form as follows:

geo_Apikeyweb

To obtain an API Key for Javascript, click here
In order to work properly, it highly probably should be enable more than one API, for this Key: For Example.: Maps Javascript Api, Maps static Api, Geocoding Api, Geolocation Api are common uses

- Database Management Systems

SQL Server : Version 2008 or higher is required.
                      In case of SQL Server 2014 or higher, the SQL Server 2012 Feature pack must be installed.

MySQL/MariaDB: Version 5.7.5 or higher.
                                Version 8.0 is not supported, yet

Oracle: Oracle Locator or Oracle Spatial installed. For Oracle 11.g or higher, it’s already installed by default.

PostgreSQL: It’s necessary to install the extension PosGis from PostgreSQL itself. At the moment of database creation, you must set the value “postgis” in the property “Postgre SQL Extensions” (before executing the reorganization).

Limitations

Platforms: In the Android platform, the only one implemented is GeoPoint

DBMS: In Genexus 15, in DB2 and Informix this functionality is not supported.

Compatibility

In previous versions, to represent geographical information we used some functionalities that will still be available, such as:
- Geolocation Domain
- External object SDGeolocation
- User control: MapControl (Web)
- Control Grid Property: SDMaps

Properties

Geography    
Srid int Spatial Reference System Identifier (SRID) , identifies de reference system for the represented Geographic object.
See https://en.wikipedia.org/wiki/SRID
FeatureType char String with the type name of the represented Geographic object.
Some supported types are POINT, LINE, POLYGON, other supported types can be added in future releases.
The empty string represents the null or unsupported object.
GeoPoint    
Srid int Spatial Reference System Identifier (SRID), identifies de 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
GeoLine    
Srid int Spatial Reference System Identifier (SRID), identifies de reference system for the represented Geographic object. See https://en.wikipedia.org/wiki/SRID
GeoPolygon    
Srid int Spatial Reference System Identifier (SRID), identifies de reference system for the represented Geographic object. See https://en.wikipedia.org/wiki/SRID

Methods

Geography    
FromWkt (char WKTtext) Geography Loads a Geography object represented by the WKT text (https://en.wikipedia.org/wiki/Well-known_text)
FromString(char String) Geography Alias for FromWKT Method
FromGeoJson(Char String) Geography Loads a Geography object represented by the GeoJSON text (GeoJSon format spec http://geojson.org/geojson-spec.html)
ToGeoJson() char Serializes the object to GeoJSON representation.
ToWkt() char Serializes the object to WKT (Well Known Text) Format
Distance(Geography object) int Calculates the distance (in meters ) between the current object and the parameter ( both Geography objects must be GeoPoints or Geography containing a GeoPoint)
Intersect(Geography object)) boolean Returns true if the Geographic object parameter Intersects or is included in the instance object.
ToGeoPoint(Geography object) GeoPoint Converts the Geography to a GeoPoint type (cast)
ToGeoLine(Geography object) GeoLine Converts the Geography to a GeoLine type (cast)
ToGeoPolygon(Geography object) GeoPolygon Converts the Geography to a GeoPolygon type (cast)
GeoPoint    
FromWkt() ...Intersect(GeoPoint)   All the methods for Geography apply
ToGeography(GeoPoint object) Geography Converts the Point to a Geography type (cast)
GeoLine    
FromWkt() ...Intersect(GeoLine)   All the methods for Geography apply, except Distance.
ToGeography(GeoLine object) Geography Converts the GeoLine to a Geography type (cast)
GeoPolygon    
FromWkt() ...Intersect(GeoPolygon)    
ToGeography(GeoPolygon object) Geography Converts the GeoPolygon to a Geography type (cast)


There is also a static version of these methods.

Scope

DBMS: SQL Server, Oracle, MySQL, SAP Hana and PostgreSQL.

Platforms: Web, SD

See Also

Map Control SD Maps Control Type Geolocation domain