[GRASS-user] [ERROR 4:unable to open EPSG support file gcs.csv]

Hi users,

I am trying to produce basin shape-file and then save in desktop in new directory with python script. Interestingly, it gets welly executed in my PC as expected. However, with the same script following error is thrown in my laptop.

r.to.vect complete

ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.
ERROR: Unknown EPSG code 32645

The projection system that I am working is:

name: WGS 84 / UTM zone 45N
datum: wgs84
ellps: wgs84
proj: utm
zone: 45

My laptop processor is AMD 64-bit processor and PC is i7 series 64 bit processor. The grass 7.2.0 on both system.

Any solution will be much appreciated.

···

Best,
Ang Dawa Sherpa

Ang Sherpa wrote

Hi users,

I am trying to produce basin shape-file and then save in desktop in new
directory with python script. Interestingly, it gets welly executed in my
PC as expected. However, with the same script following error is thrown in
my laptop.

r.to.vect complete
ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the directory
containing EPSG csv files.
ERROR: Unknown EPSG code 32645

The projection system that I am working is:
name: WGS 84 / UTM zone 45N
datum: wgs84
ellps: wgs84
proj: utm
zone: 45

My laptop processor is AMD 64-bit processor and PC is i7 series 64 bit
processor. The grass 7.2.0 on both system.

Any solution will be much appreciated.

*Best,*
*Ang Dawa Sherpa*

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

This may be an issue of your GDAL installation.

Which OS are you using? Linux? Windows? Mac?

Running gdal-config --datadir shows where GDAL searches for gcs.csv.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5313118.html
Sent from the Grass - Users mailing list archive at Nabble.com.

[please keep it on the mailing list! others can help and others can benefit from the answers!]

I am using windows 10 * 64-bit processor in my PC and windows 8 * 64 bit processor in my laptop.

Running gdal-config --datadir throws error:

'gdal-config' is not recognized as an internal or external command,
operable program or batch file.

OK; in winGRASS, there is no gdal-config, thus the error.

which winGRASS are you using? standalone-winGRASS 7.2.0? OSGeo4W-winGRASS 7.2.0?

testing it here with:

-----
System Info
GRASS version: 7.2.0
GRASS SVN revision: r70156
Build date: 2016-12-29
Build platform: i386-w64-mingw32
GDAL: 2.1.2
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.14.1
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)
-----

typing in the winGRASS-windows console:

C:\>echo %GDAL_DATA%
C:\OSGeo4W\share\gdal

here the %GDAL_DATA% variable points to the correct path.

try the same on both your working and not working system and report the differences.

kind regards
Helmut

-------------------------------
Gesendet: Montag, 20. März 2017 um 08:31 Uhr

Betreff: Re: [GRASS-user] [ERROR 4:unable to open EPSG support file gcs.csv]

Thanks,
I am using windows 10 * 64-bit processor in my PC and windows 8 * 64 bit processor in my laptop.

Running gdal-config --datadir throws error:

'gdal-config' is not recognized as an internal or external command,
operable program or batch file.

Best,

On Mon, Mar 20, 2017 at 12:07 PM, Helmut Kudrnovsky <hellik@web.de[mailto:hellik@web.de]> wrote:Ang Sherpa wrote

Hi users,

I am trying to produce basin shape-file and then save in desktop in new
directory with python script. Interestingly, it gets welly executed in my
PC as expected. However, with the same script following error is thrown in
my laptop.

r.to.vect complete
ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the directory
containing EPSG csv files.
ERROR: Unknown EPSG code 32645

The projection system that I am working is:
name: WGS 84 / UTM zone 45N
datum: wgs84
ellps: wgs84
proj: utm
zone: 45

My laptop processor is AMD 64-bit processor and PC is i7 series 64 bit
processor. The grass 7.2.0 on both system.

Any solution will be much appreciated.

*Best,*
*Ang Dawa Sherpa*

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

This may be an issue of your GDAL installation.

Which OS are you using? Linux? Windows? Mac?

Running gdal-config --datadir shows where GDAL searches for gcs.csv.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5313118.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org[mailto:grass-user@lists.osgeo.org]
https://lists.osgeo.org/mailman/listinfo/grass-user

Thanks Helmut,

I am using standalone-winGRASS 7.2.0
In both my PC and laptop when: echo %GDAL_DATA% is executed in winGRASS-console it shows the same location:

c:\Program Files\GRASS GIS 7.2.0\Share\gdal

Ang Sherpa wrote

Thanks Helmut,

I am using standalone-winGRASS 7.2.0
In both my PC and laptop when: echo %GDAL_DATA% is executed in
winGRASS-console it shows the same location:

c:\Program Files\GRASS GIS 7.2.0\Share\gdal

could you have a look if gcs.csv lives in the folder above?

may you re-install your winGRASS standalone-winGRASS 7.2.0?
may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?

can't reproduce the error here at the moment.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5313354.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Yes, gcs.csv exists in both machine. Well, I reinstalled Grass 7.2 and it worked.
Thanks.

···

On Tue, Mar 21, 2017 at 3:23 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Ang Sherpa wrote

Thanks Helmut,

I am using standalone-winGRASS 7.2.0
In both my PC and laptop when: echo %GDAL_DATA% is executed in
winGRASS-console it shows the same location:

c:\Program Files\GRASS GIS 7.2.0\Share\gdal

could you have a look if gcs.csv lives in the folder above?

may you re-install your winGRASS standalone-winGRASS 7.2.0?
may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?

can’t reproduce the error here at the moment.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5313354.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Regards,
Ang Dawa Sherpa
GIS technician - Irrigation Master Plan
WRPPF - DOI, Nepal Government
Lalitpur
contact: 984 007 3861

Hi users,

When I tried adding C:\Program Files\GRASS GIS 7.2.0\share\gdal to the system path with following line of code, it doesnot work as expected. Am I missing something?
My code is
new_path = r’C:\Program Files\GRASS GIS 7.2.0\share\gdal’
os.environ[‘PATH’] += os.pathsep + new_path

Still this error persist.

ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.
ERROR: Unknown EPSG code 32645

···

Best,
Ang Dawa Sherpa

On Tue, Mar 21, 2017 at 3:36 PM, Ang Sherpa <angsherpa232@gmail.com> wrote:

Yes, gcs.csv exists in both machine. Well, I reinstalled Grass 7.2 and it worked.
Thanks.

Regards,
Ang Dawa Sherpa
GIS technician - Irrigation Master Plan
WRPPF - DOI, Nepal Government
Lalitpur
contact: 984 007 3861

On Tue, Mar 21, 2017 at 3:23 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Ang Sherpa wrote

Thanks Helmut,

I am using standalone-winGRASS 7.2.0
In both my PC and laptop when: echo %GDAL_DATA% is executed in
winGRASS-console it shows the same location:

c:\Program Files\GRASS GIS 7.2.0\Share\gdal

could you have a look if gcs.csv lives in the folder above?

may you re-install your winGRASS standalone-winGRASS 7.2.0?
may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?

can’t reproduce the error here at the moment.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5313354.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Ang Sherpa wrote

Hi users,

When I tried adding C:\Program Files\GRASS GIS 7.2.0\share\gdal to the
system path with following line of code, it doesnot work as expected. Am I
missing something?
My code is
new_path = r'C:\Program Files\GRASS GIS 7.2.0\share\gdal'
os.environ['PATH'] += os.pathsep + new_path

Still this error persist.
ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the directory
containing EPSG csv files.
ERROR: Unknown EPSG code 32645

*Best,*
*Ang Dawa Sherpa*

On Tue, Mar 21, 2017 at 3:36 PM, Ang Sherpa &lt;

angsherpa232@

&gt; wrote:

Yes, gcs.csv exists in both machine. Well, I reinstalled Grass 7.2 and it
worked.
Thanks.

*Regards,*
*Ang Dawa Sherpa*
*GIS technician - Irrigation Master Plan*
*WRPPF - DOI, Nepal Government*
*Lalitpur*
*contact: 984 007 3861*

On Tue, Mar 21, 2017 at 3:23 PM, Helmut Kudrnovsky &lt;

hellik@

&gt; wrote:

Ang Sherpa wrote
> Thanks Helmut,
>
> I am using standalone-winGRASS 7.2.0
> In both my PC and laptop when: echo %GDAL_DATA% is executed in
> winGRASS-console it shows the same location:
>
> c:\Program Files\GRASS GIS 7.2.0\Share\gdal

could you have a look if gcs.csv lives in the folder above?

may you re-install your winGRASS standalone-winGRASS 7.2.0?
may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?

can't reproduce the error here at the moment.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabbl
e.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp531
3117p5313354.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

AFAIK adding the gdal related folder to %PATH% doesn't help.

As mentioned in the error message, the variable %GDAL_DATA%
should be defined in your script.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5314199.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Thanks for attention,

Tried everything I could. Any solution to incorporate %GDAL_DATA% in the script, other than to manually adding GDAL_DATA path in system variable?

···

On Sat, Mar 25, 2017 at 4:02 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Ang Sherpa wrote

Hi users,

When I tried adding C:\Program Files\GRASS GIS 7.2.0\share\gdal to the
system path with following line of code, it doesnot work as expected. Am I
missing something?
My code is
new_path = r’C:\Program Files\GRASS GIS 7.2.0\share\gdal’
os.environ[‘PATH’] += os.pathsep + new_path

Still this error persist.
ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the directory
containing EPSG csv files.
ERROR: Unknown EPSG code 32645

Best,
Ang Dawa Sherpa

On Tue, Mar 21, 2017 at 3:36 PM, Ang Sherpa <

angsherpa232@

> wrote:

Yes, gcs.csv exists in both machine. Well, I reinstalled Grass 7.2 and it
worked.
Thanks.

Regards,
Ang Dawa Sherpa
GIS technician - Irrigation Master Plan
WRPPF - DOI, Nepal Government
Lalitpur
contact: 984 007 3861

On Tue, Mar 21, 2017 at 3:23 PM, Helmut Kudrnovsky <

hellik@

> wrote:

Ang Sherpa wrote

Thanks Helmut,

I am using standalone-winGRASS 7.2.0
In both my PC and laptop when: echo %GDAL_DATA% is executed in
winGRASS-console it shows the same location:

c:\Program Files\GRASS GIS 7.2.0\Share\gdal

could you have a look if gcs.csv lives in the folder above?

may you re-install your winGRASS standalone-winGRASS 7.2.0?
may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?

can’t reproduce the error here at the moment.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabbl
e.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp531
3117p5313354.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

AFAIK adding the gdal related folder to %PATH% doesn’t help.

As mentioned in the error message, the variable %GDAL_DATA%
should be defined in your script.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5314199.html

Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Best,
Ang Dawa Sherpa

Ang Sherpa wrote

Thanks for attention,

Tried everything I could. Any solution to incorporate %GDAL_DATA% in the
script, other than to manually adding GDAL_DATA path in system variable?

*Best,*
*Ang Dawa Sherpa*

On Sat, Mar 25, 2017 at 4:02 PM, Helmut Kudrnovsky &lt;

hellik@

&gt; wrote:

Ang Sherpa wrote
> Hi users,
>
> When I tried adding C:\Program Files\GRASS GIS 7.2.0\share\gdal to the
> system path with following line of code, it doesnot work as expected.
Am
I
> missing something?
> My code is
> new_path = r'C:\Program Files\GRASS GIS 7.2.0\share\gdal'
> os.environ['PATH'] += os.pathsep + new_path
>
> Still this error persist.
> ERROR 4:Unable to open EPSG support file gcs.csv.
> Try setting the GDAL_DATA environment variable to point to the
directory
> containing EPSG csv files.
> ERROR: Unknown EPSG code 32645
>
> *Best,*
> *Ang Dawa Sherpa*
>
> On Tue, Mar 21, 2017 at 3:36 PM, Ang Sherpa &lt;

> angsherpa232@

> &gt; wrote:
>
>> Yes, gcs.csv exists in both machine. Well, I reinstalled Grass 7.2 and
it
>> worked.
>> Thanks.
>>
>> *Regards,*
>> *Ang Dawa Sherpa*
>> *GIS technician - Irrigation Master Plan*
>> *WRPPF - DOI, Nepal Government*
>> *Lalitpur*
>> *contact: 984 007 3861*
>>
>> On Tue, Mar 21, 2017 at 3:23 PM, Helmut Kudrnovsky &lt;

> hellik@

> &gt; wrote:
>>
>>> Ang Sherpa wrote
>>> > Thanks Helmut,
>>> >
>>> > I am using standalone-winGRASS 7.2.0
>>> > In both my PC and laptop when: echo %GDAL_DATA% is executed in
>>> > winGRASS-console it shows the same location:
>>> >
>>> > c:\Program Files\GRASS GIS 7.2.0\Share\gdal
>>>
>>> could you have a look if gcs.csv lives in the folder above?
>>>
>>> may you re-install your winGRASS standalone-winGRASS 7.2.0?
>>> may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?
>>>
>>> can't reproduce the error here at the moment.
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----
>>> best regards
>>> Helmut
>>> --
>>> View this message in context: http://osgeo-org.1560.x6.nabbl
>>> e.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp531
>>> 3117p5313354.html
>>> Sent from the Grass - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> grass-user mailing list
>>>

> grass-user@.osgeo

>>> https://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>>
>
> _______________________________________________
> grass-user mailing list

> grass-user@.osgeo

> https://lists.osgeo.org/mailman/listinfo/grass-user

AFAIK adding the gdal related folder to %PATH% doesn't help.

As mentioned in the error message, the variable %GDAL_DATA%
should be defined in your script.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-
csv-tp5313117p5314199.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

Are you running your python script inside or outside a GRASS session?

Inside a GRASS session of standalone or osgeo4w wingrass, %GDAL_DATA% is
already defined.

If outside, %GDAL_DATA% may need to be defined when GDAL comes in.

Have you maybe multiple gdal installations on your system?

At

https://grasswiki.osgeo.org/wiki/GRASS_and_Python

there is

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5314213.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Thanks,
fixed by adding
os.environ[‘GDAL_DATA’] = r’C:\Program Files\GRASS GIS 7.2.0\share\gdal’ at the beginning of the script.

···

On Sat, Mar 25, 2017 at 6:14 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Ang Sherpa wrote

Thanks for attention,

Tried everything I could. Any solution to incorporate %GDAL_DATA% in the
script, other than to manually adding GDAL_DATA path in system variable?

Best,
Ang Dawa Sherpa

On Sat, Mar 25, 2017 at 4:02 PM, Helmut Kudrnovsky <

hellik@

> wrote:

Ang Sherpa wrote

Hi users,

When I tried adding C:\Program Files\GRASS GIS 7.2.0\share\gdal to the
system path with following line of code, it doesnot work as expected.
Am
I
missing something?
My code is
new_path = r’C:\Program Files\GRASS GIS 7.2.0\share\gdal’
os.environ[‘PATH’] += os.pathsep + new_path

Still this error persist.
ERROR 4:Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory
containing EPSG csv files.
ERROR: Unknown EPSG code 32645

Best,
Ang Dawa Sherpa

On Tue, Mar 21, 2017 at 3:36 PM, Ang Sherpa <

angsherpa232@

> wrote:

Yes, gcs.csv exists in both machine. Well, I reinstalled Grass 7.2 and
it
worked.
Thanks.

Regards,
Ang Dawa Sherpa
GIS technician - Irrigation Master Plan
WRPPF - DOI, Nepal Government
Lalitpur
contact: 984 007 3861

On Tue, Mar 21, 2017 at 3:23 PM, Helmut Kudrnovsky <

hellik@

> wrote:

Ang Sherpa wrote

Thanks Helmut,

I am using standalone-winGRASS 7.2.0
In both my PC and laptop when: echo %GDAL_DATA% is executed in
winGRASS-console it shows the same location:

c:\Program Files\GRASS GIS 7.2.0\Share\gdal

could you have a look if gcs.csv lives in the folder above?

may you re-install your winGRASS standalone-winGRASS 7.2.0?
may you try OSGeo4W-winGRASS 7.2.0 (https://trac.osgeo.org/osgeo4w/)?

can’t reproduce the error here at the moment.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabbl
e.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp531
3117p5313354.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

AFAIK adding the gdal related folder to %PATH% doesn’t help.

As mentioned in the error message, the variable %GDAL_DATA%
should be defined in your script.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.
nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-
csv-tp5313117p5314199.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

Are you running your python script inside or outside a GRASS session?

Inside a GRASS session of standalone or osgeo4w wingrass, %GDAL_DATA% is
already defined.

If outside, %GDAL_DATA% may need to be defined when GDAL comes in.

Have you maybe multiple gdal installations on your system?

At

https://grasswiki.osgeo.org/wiki/GRASS_and_Python

there is


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5314213.html

Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Best,
Ang Dawa Sherpa

Ang Sherpa wrote

Thanks,
fixed by adding
os.environ['GDAL_DATA'] = r'C:\Program Files\GRASS GIS 7.2.0\share\gdal'
at
the beginning of the script.

anything what sould be added to the wiki

https://grasswiki.osgeo.org/wiki/GRASS_and_Python

?

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-4-unable-to-open-EPSG-support-file-gcs-csv-tp5313117p5314372.html
Sent from the Grass - Users mailing list archive at Nabble.com.