Skip to content

ST_Area returns negative values #110

@chaosmail

Description

@chaosmail

Hi guys,

When computing the Area of a single Polygon as MultiPolygon, the resulting area is negative.

SELECT
  ST_Area(ST_MultiPolygon(array(0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0)))
FROM src LIMIT 1;

>OK
> -1.0
> Time taken: 3.583 seconds, Fetched: 1 row(s)

When using a Polygon, it is working properly.

SELECT
  ST_Area(ST_Polygon(0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0))
FROM src LIMIT 1;
> OK
> 1.0
> Time taken: 0.845 seconds, Fetched: 1 row(s)

Best,
Christoph

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions