From 28083b88b111a1a118ae382881feb05f45d845c0 Mon Sep 17 00:00:00 2001 From: David Berry Date: Tue, 25 Feb 2014 14:15:53 +0000 Subject: [PATCH] kaplibs: Do not specifiy uncertainty in convex hull The recent changes to AST regarding simplification of Polygons means that it is no longer necessary to specify an uncertainty in the outline polygon. Previously, bending of the polygon edges caused by the non-linear mapping from pixel coords to sky coords caused the simplification of the Polygon to fail, and so prevent it being converted to STC-S format. --- libraries/kaplibs/kpg/kpgPutOutline.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/libraries/kaplibs/kpg/kpgPutOutline.c b/libraries/kaplibs/kpg/kpgPutOutline.c index 25eeb5eda2f..f54e865ed44 100644 --- a/libraries/kaplibs/kpg/kpgPutOutline.c +++ b/libraries/kaplibs/kpg/kpgPutOutline.c @@ -102,7 +102,6 @@ void kpgPutOutline( int indf, float wlim, int convex, int *status ){ /* Local Variables: */ - AstCircle *unc; AstFrame *frm2d; AstFrameSet *wcs; AstMapping *map2d; @@ -114,7 +113,6 @@ void kpgPutOutline( int indf, float wlim, int convex, int *status ){ char xtype[10]; const double *data; const double *p0; - double centre[ 2 ]; double radius; int *data_2d = NULL; int *p1; @@ -251,18 +249,8 @@ void kpgPutOutline( int indf, float wlim, int convex, int *status ){ "data in '^N' because no good values were found.", status ); } -/* Assign some uncertainty in each vertex position. Without this fuzzyness, - the conversion from AST to STC-S fails because the polygon is defined - in pixel coordinates and is distorted too much by conversion to sky - coordinates. */ - } else { - centre[ 0 ] = 0.0; - centre[ 1 ] = 0.0; - radius = ACC; - astSetUnc( poly, astCircle( astFrame( 2, "Domain=PIXEL" ), 1, centre, - &radius, NULL, " " ) ); - /* Map the above polygon from GRID coords into the current WCS Frame. */ + } else { region = astMapRegion( poly, map2d, frm2d ); /* Create an StcsChan that can be used to convert the AST Region into an