Skip to content

Commit 90b22a4

Browse files
committed
Revert "Try using GMT_GRID_PIXEL_REG as default instead of GMT_GRID_NODE_REG"
This reverts commit 08edf6f.
1 parent d203cd5 commit 90b22a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pygmt/clib/conversion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def dataarray_to_matrix(grid):
102102
dim
103103
)
104104
)
105-
region.extend([coord.min() - coord_inc / 2, coord.max() + coord_inc / 2])
105+
region.extend([coord.min(), coord.max()])
106106
inc.append(coord_inc)
107107

108108
if any([i < 0 for i in inc]): # Sort grid when there are negative increments

pygmt/clib/session.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def create_data(self, family, geometry, mode, **kwargs):
531531
registration : int
532532
The node registration (what the coordinates mean). Can be
533533
``'GMT_GRID_PIXEL_REG'`` or ``'GMT_GRID_NODE_REG'``. Defaults to
534-
``'GMT_GRID_PIXEL_REG'``.
534+
``'GMT_GRID_NODE_REG'``.
535535
pad : int
536536
The grid padding. Defaults to ``GMT_PAD_DEFAULT``.
537537
@@ -567,7 +567,7 @@ def create_data(self, family, geometry, mode, **kwargs):
567567
)
568568
geometry_int = self._parse_constant(geometry, valid=GEOMETRIES)
569569
registration_int = self._parse_constant(
570-
kwargs.get("registration", "GMT_GRID_PIXEL_REG"), valid=REGISTRATIONS
570+
kwargs.get("registration", "GMT_GRID_NODE_REG"), valid=REGISTRATIONS
571571
)
572572

573573
# Convert dim, ranges, and inc to ctypes arrays if given (will be None
@@ -1173,7 +1173,7 @@ def virtualfile_from_matrix(self, matrix):
11731173
yield vfile
11741174

11751175
@contextmanager
1176-
def virtualfile_from_grid(self, grid, registration="GMT_GRID_PIXEL_REG"):
1176+
def virtualfile_from_grid(self, grid, registration="GMT_GRID_NODE_REG"):
11771177
"""
11781178
Store a grid in a virtual file.
11791179

0 commit comments

Comments
 (0)