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

Function msProjectRectTraditionalEdge

mapproject.c:664–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662/************************************************************************/
663#ifdef notdef
664static int
665msProjectRectTraditionalEdge(projectionObj *in, projectionObj *out,
666 rectObj *rect)
667{
668#ifdef USE_PROJ
669 pointObj prj_point;
670 rectObj prj_rect;
671 int rect_initialized = MS_FALSE, failure=0;
672 int ix, iy;
673
674 double dx, dy;
675 double x, y;
676
677 dx = (rect->maxx - rect->minx)/NUMBER_OF_SAMPLE_POINTS;
678 dy = (rect->maxy - rect->miny)/NUMBER_OF_SAMPLE_POINTS;
679
680 /* first ensure the top left corner is processed, even if the rect
681 turns out to be degenerate. */
682
683 prj_point.x = rect->minx;
684 prj_point.y = rect->miny;
685#ifdef USE_POINT_Z_M
686 prj_point.z = 0.0;
687 prj_point.m = 0.0;
688#endif /* USE_POINT_Z_M */
689
690 msProjectGrowRect(in,out,&prj_rect,&rect_initialized,&prj_point,
691 &failure);
692
693 /* sample along top and bottom */
694 if(dx > 0) {
695 for(ix = 0; ix <= NUMBER_OF_SAMPLE_POINTS; ix++ )
696 {
697 x = rect->minx + ix * dx;
698
699 prj_point.x = x;
700 prj_point.y = rect->miny;
701 msProjectGrowRect(in,out,&prj_rect,&rect_initialized,&prj_point,
702 &failure);
703
704 prj_point.x = x;
705 prj_point.y = rect->maxy;
706 msProjectGrowRect(in,out,&prj_rect,&rect_initialized,&prj_point,
707 &failure);
708 }
709 }
710
711 /* sample along left and right */
712 if(dy > 0) {
713 for(iy = 0; iy <= NUMBER_OF_SAMPLE_POINTS; iy++ )
714 {
715 y = rect->miny + iy * dy;
716
717 prj_point.y = y;
718 prj_point.x = rect->minx;
719 msProjectGrowRect(in,out,&prj_rect,&rect_initialized,&prj_point,
720 &failure);
721

Callers 1

msProjectRectFunction · 0.85

Calls 3

msProjectGrowRectFunction · 0.85
msProjectRectGridFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected