GDAL Error 1 Warning and Node stack overflow

OS: Windows

I am plotting a raster file after changing the CRS of the same with st_transform. Here, is a warning of GDAL Error 1 being generated.
Later, I changed the CRS of the vector/feature file with the newly transformed raster file.
While I am trying to plot sf data (point) with ggplot on R, it too is bouncing back the same error GDAL Error 1, indicating that I might be having multiple versions of PROJ lib which seems to be making the error. The key thing that I noticed was the error message. It was showing the Postgresql directory while mentioning the error message. The error code is mentioned below:
GDAL Error 1: PROJ: proj_identify: C:\Program Files\PostgreSQL\13\share\contrib\postgis-3.2\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 0 whereas a number >= 2 is expected. It comes from another PROJ installation.

However, though the raster file was successfully plotted, the final error of node stack overflew (Error: node stack overflow) was propagated while I was trying to plot the crs_transormed feature classes on the raster.

  • PostGIS, R- I have these three applications installed, that use GDAL. I also use QGIS.
  • The PROJ package's version which is installed on R is 0.4.0.
  • If GDAL failed when it successfully tried to transform the point feature's coordinates from the source raster file, it would provide an error message.
  • I was trying to use R to develop on VS Code before this error landed. After I started to use R on VS, R Studio started to have this problem.
  • I tried uninstalling and installing the rgdal but that did not help.

Though the raster file's CRS transformation was generating the warning messages of having multiple versions of PROJ, it plotted the raster file but the problem occurred when the feature points were to be plotted on the raster file.

  1. Is it now needed to do a clean installation of GDAL? If yes, then how about doing it without uninstalling Postgis?
  2. I already reinstalled R to circumvent the problem but that didn't help.

Any sort of assistance would help.

Complete code:


options(expressions = 500000)

dsm_Hrvd <- read_stars("data/dd/ddd/dddd.tif")
harv_plot <- st_read("data//dd/ddd/dddd.shp")


target_crs <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
dsm_Hrvd_rprj <- st_transform(dsm_Hrvd, crs = target_crs)
# or dsm_Hrvd_rprj <- st_transform(dsm_Hrvd, 4326) in case the crs in't recognized
harv_plot_rprj <- st_transform(harv_plot, st_crs(dsm_Hrvd_rprj))

# warnings()

ggplot() +
  geom_stars(data = dsm_Hrvd) +
  # scale_fill_viridis_c() +
  geom_sf(data = harv_plot_rprj, mapping = aes(color = plot_type))

Additional Information:

  1. I also checked the GDAL Python version with OSGeoShell:
>>> from osgeo import osr
>>> osr.GetPROJVersionMajor()
>>> osr.GetPROJVersionMinor()


  1. The error occurs both on R Studio & VS Code

  2. The R Studio's version is 4.3.2

  3. When I uninstalled R, I did not remove existing packages after uninstallation. How to remove the previously (old) installed R packages after reinstalling?

(If any key information seems to be amiss, do notify. The same will be added)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.