Posted upstream with https://github.com/remotesensinginfo/rsgislib/pull/93

--- src/vec/RSGISVectorMaths.cpp.orig	2025-02-17 11:43:12
+++ src/vec/RSGISVectorMaths.cpp	2025-11-08 12:50:06
@@ -44,7 +44,7 @@
 	{
 		try 
 		{
-			OGRFeatureDefn *inFeatureDefn = inFeature->GetDefnRef();
+			const OGRFeatureDefn *inFeatureDefn = inFeature->GetDefnRef();
 			// Get variables
 			for(int i = 0; i < numVariables; ++i)
 			{
@@ -55,7 +55,7 @@
 			result = muParser->Eval();
 			
 			// Save out Variables
-			OGRFeatureDefn *outFeatureDefn = outFeature->GetDefnRef();
+			const OGRFeatureDefn *outFeatureDefn = outFeature->GetDefnRef();
 			outFeature->SetField(outFeatureDefn->GetFieldIndex(this->outHeading.c_str()), result);
 			
 			
--- src/vec/RSGISZonalStats2Matrix.cpp.orig	2025-02-17 11:43:12
+++ src/vec/RSGISZonalStats2Matrix.cpp	2025-11-08 12:49:39
@@ -520,7 +520,7 @@
             }
             else
             {
-                OGRFeatureDefn *inFeatureDefn = feature->GetDefnRef();
+                const OGRFeatureDefn *inFeatureDefn = feature->GetDefnRef();
                 unsigned int fieldIdx = inFeatureDefn->GetFieldIndex(this->outNameHeading.c_str());
                 if(fieldIdx > 0)
                 {
--- src/cmds/RSGISCmdVectorUtils.cpp.orig	2025-02-17 11:43:12
+++ src/cmds/RSGISCmdVectorUtils.cpp	2025-11-08 13:04:50
@@ -58,7 +58,7 @@
             GDALDriver *ogrVecDriver = NULL;
             GDALDataset *outputVecDS = NULL;
             OGRLayer *outputVecLayer = NULL;
-            OGRSpatialReference* inputSpatialRef = NULL;
+            const OGRSpatialReference* inputSpatialRef = NULL;
             OGRFeatureDefn *inFeatureDefn = NULL;
             
             rsgis::vec::RSGISProcessVector *processVector = NULL;
@@ -188,7 +188,7 @@
             GDALDriver *ogrVecDriver = NULL;
             GDALDataset *outputVecDS = NULL;
             OGRLayer *outputVecLayer = NULL;
-            OGRSpatialReference* inputSpatialRef = NULL;
+            const OGRSpatialReference* inputSpatialRef = NULL;
             OGRFeatureDefn *inFeatureDefn = NULL;
 
             rsgis::vec::RSGISProcessVector *processVector = NULL;
@@ -311,7 +311,7 @@
             GDALDriver *ogrVecDriver = NULL;
             GDALDataset *outputVecDS = NULL;
             OGRLayer *outputVecLayer = NULL;
-            OGRSpatialReference* inputSpatialRef = NULL;
+            const OGRSpatialReference* inputSpatialRef = NULL;
             OGRFeatureDefn *inFeatureDefn = NULL;
 
             if(outFormat == "ESRI Shapefile")
