From daa395cb8a39d341dbb1bdb43ffa89761f3cc60c Mon Sep 17 00:00:00 2001 From: faragher Date: Wed, 27 Mar 2024 21:41:31 -0500 Subject: [PATCH] Updated MMAP API for Windows --- sbapp/sideband/geo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbapp/sideband/geo.py b/sbapp/sideband/geo.py index 17279d0..77ad157 100644 --- a/sbapp/sideband/geo.py +++ b/sbapp/sideband/geo.py @@ -418,7 +418,10 @@ class GeoidHeight(object): raise Exception("File has the wrong length") self.headerlen = headerlen - self.raw = mmap.mmap(fd, fullsize, mmap.MAP_SHARED, mmap.PROT_READ) + if RNS.vendor.platformutils.is_windows(): + self.raw = mmap.mmap(fd, fullsize, access=mmap.ACCESS_READ) + else: + self.raw = mmap.mmap(fd, fullsize, mmap.MAP_SHARED, mmap.PROT_READ) self.rlonres = self.width / 360.0 self.rlatres = (self.height - 1) / 180.0