yocontra / node-gdal-next

Node.js bindings for GDAL (Geospatial Data Abstraction Library) [Fork]
https://contra.io/node-gdal-next/
Apache License 2.0
75 stars 36 forks source link

Error: Corrupt Data #58

Closed FreeGIS closed 2 years ago

FreeGIS commented 2 years ago

OS:Win10 64

When run the code : const srs= gdal.SpatialReference.fromProj4('+init=epsg:4326'); ^ Error: Corrupt Data

I can not locate the problem,who can tell me why?

FreeGIS commented 2 years ago

The error was caused by an environment variable conflict. I installed the PostgreSQL/postgis database and set environment variable: PROJ_LIB=C:\Program Files\PostgreSQL\14\share\contrib\postgis-3.1\proj when i delete the variable and restart os,the fromProj4 is right