public class ST_Polygon
extends ST_Geometry
Creates a polygon geometry in GeoJSON format, and returns a GeoJSON string representation of the geometry.
Format:
ST_Polygon(geometry STRING, srid INT) - constructor to create a polygon geometry with GeoJSON or WKT strings
ST_Polygon(geometry BINARY, srid INT) - constructor to create a polygon geometry with WKB
ST_Polygon(geometry Object, hiveRecordInfoProvider STRING) - constructor to create a polygon geometry using a HiveRecordInfoProvider
Example:
select ST_Polygon ('{ "type": "Polygon","coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]] }', 8307) from hivetable LIMIT 1; -- creates a polygon using GeoJSON
select ST_Polygon ('polygon((0 0, 10 0, 10 10, 0 0))', 8307) from hivetable LIMIT 1; -- creates a polygon using WKT
select ST_Polygon (geoColumn, 'hive.samples.SampleHiveRecordInfoProviderImpl') from hivetable; -- creates the geometries using a HiveRecordInfoProvider