GregM
03/31/2026, 4:06 PMRocky
03/31/2026, 4:06 PMGEOMETRY functions (like ST_GeometryFromText and ST_Polygon) officially support POINT, LINESTRING, and POLYGON types, as well as a special CIRCLE type.
MULTIPOLYGON is not currently supported in StarRocks spatial functions. If you try to use a MULTIPOLYGON WKT, it will likely result in an error or a NULL value.
Supported Example (POLYGON)
If you can represent your data as a single polygon, here is an example of a working query:
sql
SELECT ST_AsText(ST_GeometryFromText('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))'));
Why MULTIPOLYGON isn't working
StarRocks' spatial engine is primarily optimized for basic shapes to support functions like ST_Contains and ST_Distance_Sphere. If you have multiple polygons, you would currently need to store them as separate rows or simplify them into a single POLYGON if they are contiguous.
Summary of Supported WKT Types:
* POINT: POINT (1 1)
* LINESTRING: LINESTRING (1 1, 2 2)
* POLYGON: POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))
* CIRCLE: CIRCLE ((111 64), 10000) (Center longitude/latitude and radius in meters)
If you have a specific use case requiring MULTIPOLYGON, I recommend keeping the data in a VARCHAR column for storage and performing complex spatial operations in a dedicated GIS tool or using StarRocks' ST_Contains on individual polygon components.
References
• sql-reference/data-types/README.md
• table_design/StarRocks_table_design.md
• sql-reference/data-types/semi_structured/VARIANT.md
• knowledge/usage/best-practice.md
• sql-reference/data-types/semi_structured/Array.md
• sql-reference/sql-functions/spatial-functions/st_point.md
• developers/type_checker_xml_configuration.md
• sql-reference/sql-functions/spatial-functions/st_astext.md