Skip to content

Commit 1844f95

Browse files
committed
Fix OGC extent calculations
1 parent c23a5cd commit 1844f95

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/mapserver.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,13 @@ static __inline long int MS_NINT(double __x) {
446446

447447
#define MS_RENDERER_PLUGIN(format) ((format)->renderer > MS_RENDER_WITH_PLUGIN)
448448

449-
#define MS_CELLSIZE(min, max, d) \
450-
(((max) - (min)) / ((d)-1)) /* where min/max are from an MapServer pixel \
449+
/*#define MS_CELLSIZE(min, max, d) \
450+
(((max) - (min)) / ((d)-1))*/ /* where min/max are from an MapServer pixel \
451451
center-to-pixel center extent */
452452
#define MS_OWS_CELLSIZE(min, max, d) \
453453
(((max) - (min)) / (d)) /* where min/max are from an OGC pixel outside \
454454
edge-to-pixel outside edge extent */
455+
#define MS_CELLSIZE MS_OWS_CELLSIZE /* set up OGC pixel model entirely */
455456
#define MS_MAP2IMAGE_X(x, minx, cx) (MS_NINT(((x) - (minx)) / (cx)))
456457
#define MS_MAP2IMAGE_Y(y, maxy, cy) (MS_NINT(((maxy) - (y)) / (cy)))
457458
#define MS_IMAGE2MAP_X(x, minx, cx) ((minx) + (cx) * (x))

0 commit comments

Comments
 (0)