/
๐ŸŒ

Well-known Text Representation of geometry

On this page

Geometry is a very complex data type: accordingly to this, OGC-SFS defines two alternative standard notations allowing to represent Geometry values:

  • the WKT (Well Known Text) notation is a text markup language for representing vector geometry objects.
  • the WKB (Well Known Binary) notation on the other side is more intended for precise and accurate import/export/exchange of Geometries between different platforms.
TypeExamples
PointPOINT (30 10)
LineStringLINESTRING (30 10, 10 30, 40 40)
PolygonPOLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))

Tools

logo
Code-related notes and snippets