[postgis-users] Which operators/functions work with circular arcs?

Paul Ramsey pramsey at cleverelephant.ca
Sat Aug 22 15:35:04 PDT 2015


I was about to point out how clever I was, to work this out and then
forget I'd worked it out, but then I found this,

double
lwcurvepoly_area(const LWCURVEPOLY *curvepoly)
{
double area = 0.0;
LWPOLY *poly;
if( lwgeom_is_empty((LWGEOM*)curvepoly) )
return 0.0;
poly = lwcurvepoly_stroke(curvepoly, 32);
area = lwpoly_area(poly);
lwpoly_free(poly);
return area;
}

On Fri, Aug 21, 2015 at 5:29 PM, Paragon Corporation <lr at pcorp.us> wrote:
> Paul,
>
>> The area calculations don't work.
>
>> A comprehensive survey would be most appreciated.
>
> By they don't work, what exactly do you mean? Do you mean it gives the wrong
> answer?
>
> The gardens tests on curves didn't error out on ST_Area.  This same test
> also doesn't error out in PostGIS 2.1
>
> SELECT ST_Area(
> ST_GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036,
> -71.4821 42.3036, -71.7821 42.7036, -71.0821 42.7036, -71.0821
> 42.3036),(-71.1821 42.4036, -71.3821 42.6036, -71.3821 42.4036, -71.1821
> 42.4036) ) ') );
>
> Thanks,
> Regina
> On Thu, Aug 20, 2015 at 7:30 AM, Andreas Neumann <a.neumann at carto.net>
> wrote:
>> Hi,
>>
>> I wonder how I can find out what operators and what functions work
>> with circular arcs? Are they marked in the documentation as such?
>>
>> Thank you for your hints!
>>
>> Andreas
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list