MCPcopy Index your code
hub / github.com/MapServer/MapServer / msProjectShape

Function msProjectShape

mapproject.c:468–497  ·  view source on GitHub ↗

/ msProjectShape() */ /

Source from the content-addressed store, hash-verified

466/* msProjectShape() */
467/************************************************************************/
468int msProjectShape(projectionObj *in, projectionObj *out, shapeObj *shape)
469{
470#ifdef USE_PROJ
471 int i;
472
473 for( i = shape->numlines-1; i >= 0; i-- )
474 {
475 if( shape->type == MS_SHAPE_LINE || shape->type == MS_SHAPE_POLYGON )
476 {
477 if( msProjectShapeLine( in, out, shape, i ) == MS_FAILURE )
478 msShapeDeleteLine( shape, i );
479 }
480 else if( msProjectLine(in, out, shape->line+i ) == MS_FAILURE )
481 {
482 msShapeDeleteLine( shape, i );
483 }
484 }
485
486 if( shape->numlines == 0 ) {
487 msFreeShape( shape );
488 return MS_FAILURE;
489 } else {
490 msComputeBounds( shape ); /* fixes bug 1586 */
491 return(MS_SUCCESS);
492 }
493#else
494 msSetError(MS_PROJERR, "Projection support is not available.", "msProjectShape()");
495 return(MS_FAILURE);
496#endif
497}
498
499/************************************************************************/
500/* msProjectLine() */

Callers 15

msQueryByAttributesFunction · 0.85
msQueryByFilterFunction · 0.85
msQueryByRectFunction · 0.85
msQueryByFeaturesFunction · 0.85
msQueryByPointFunction · 0.85
msQueryByShapeFunction · 0.85
msDrawShapeFunction · 0.85
RebuildClustersFunction · 0.85
_AdjustLabelPositionFunction · 0.85
processShplabelTagFunction · 0.85

Calls 6

msProjectShapeLineFunction · 0.85
msShapeDeleteLineFunction · 0.85
msProjectLineFunction · 0.85
msFreeShapeFunction · 0.85
msComputeBoundsFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected