[GRASS-user] Unable to select EPSG code for location

Hi,

After installing 6.4.2 from source, attempting to insert a spatial reference
system for a new location (/Select EPSG code for spatial reference system/)
was giving an error that it was unable to find EPSG codes at
/usr/local/share/proj/epsg

The configuration commands (--with-proj-share="/usr/share/proj/" ) did not
seem to make a difference?

My solution was to copy the proj directory and contents from /usr/share/proj
to to /usr/local/share
sudo cp -r /usr/share/proj /usr/local/share/

Has anyone else encountered this problem, or perhaps my configuration
options below need amending?

./configure \
--enable-debug \
--enable-largefile \
--with-libs=/usr/lib64 \
--with-geos=/usr/bin/geos-config/ \
--with-cxx \
--with-readline \
--with-freetype=yes \
--with-freetype-includes="/usr/include/freetype2/" \
--enable-largefile=yes \
--with-geos=yes \
--with-cairo \
--with-tcltk-includes="/usr/include/tcl8.5/" \
--with-wxwidgets \
--with-postgres=yes \
--with-postgres-includes="/usr/include/postgresql/" \
--with-sqlite=yes \
--with-python=yes \
--with-opengl-libs="/usr/include/GL" \
--with-ffmpeg=yes \
--with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavformat
/usr/include/libswscale" \
--with-lapack=yes \
--with-nls=yes \
--with-motif=yes \
--with-readline=yes \
--with-python=yes \
--with-proj-share="/usr/share/proj/" \

Cheers,
Richard

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Unable-to-select-EPSG-code-for-location-tp4715353p4715353.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Mon, Apr 9, 2012 at 10:00 AM, RichardC <richtcooper@hotmail.com> wrote:

Hi,

After installing 6.4.2 from source,

Please tell us on which operating system.

attempting to insert a spatial reference
system for a new location (/Select EPSG code for spatial reference system/)
was giving an error that it was unable to find EPSG codes at
/usr/local/share/proj/epsg

Please tell us how you installed PROJ4 (self compiled or package)?

The configuration commands (--with-proj-share="/usr/share/proj/" ) did not
seem to make a difference?

It depends.

My solution was to copy the proj directory and contents from /usr/share/proj
to to /usr/local/share
sudo cp -r /usr/share/proj /usr/local/share/

That's likely no good idea and not needed.

Has anyone else encountered this problem, or perhaps my configuration
options below need amending?

./configure \

...

--with-proj-share="/usr/share/proj/" \

Tell us what exactly the problem is (copy paste of error).

Markus

Hi,

After installing 6.4.2 from source, attempting to insert a spatial reference
system for a new location (/Select EPSG code for spatial reference system/)
was giving an error that it was unable to find EPSG codes at
/usr/local/share/proj/epsg

At first I found this same problem.

I have proj and proj-devel installed by the package manager (yum on Scientific Linux 6) and GRASS 6.4.2 self compiled.
I double checked the ./configure line to make sure I had:
–with-proj-share=“/usr/share/proj”

Then I got the following output after running configure:

checking for location of External PROJ.4 includes…
checking for proj_api.h… yes
checking External PROJ.4 version… 470
checking for location of External PROJ.4 library…
checking for pj_get_def in -lproj… yes
checking for location of External PROJ.4 data files… /usr/share/proj
checking for /usr/share/proj/epsg… yes

Now, after compiling and installing, I still got the error message that Richard mentioned when I tried to create a Location with the wizard, but then, after choosing “Select EPSG code…” I had a window to choose the correct path to the epsg file. Only then it worked as expected.

Thanks,
Micha

On Mon, Apr 9, 2012 at 2:45 PM, Micha Silver <micha@arava.co.il> wrote:

On 04/09/2012 11:00 AM, RichardC wrote:

Hi,

After installing 6.4.2 from source, attempting to insert a spatial reference
system for a new location (/Select EPSG code for spatial reference system/)
was giving an error that it was unable to find EPSG codes at
/usr/local/share/proj/epsg

The path is handled via GRASS_PROJSHARE:

[neteler@north wxpython]$ grep GRASS_PROJSHARE */*
./gui/wxpython/location_wizard/wizard.py: epsgdir =
utils.PathJoin(os.environ["GRASS_PROJSHARE"], 'epsg')
./gui/wxpython/core/settings.py: projFile =
PathJoin(os.environ["GRASS_PROJSHARE"], 'epsg')

which comes from

./lib/init/init.sh:if [ ! "$GRASS_PROJSHARE" ] ; then
./lib/init/init.sh: GRASS_PROJSHARE=CONFIG_PROJSHARE

which comes from

./lib/init/Makefile: -e \"s#CONFIG_PROJSHARE#$(PROJSHARE)#\" \
./lib/init/Makefile: -e \"s#CONFIG_PROJSHARE#$(PROJSHARE)#\" \

which comes from

configure:PROJSHARE=
configure: PROJSHARE="$with_proj_share"
configure:if test -z "$PROJSHARE" ; then
configure: PROJSHARE=/usr/local/share/proj

This is the --with-proj-share switch.

Hypothesis: No "make distclean" was done after PROJ4 installation?

Markus

I'm finding that the issue remains after re-installing PROJ from source and
running sudo make distclean.

Method:
Uninstalled package version of PROJ from system and installed from source as
per http://grass.osgeo.org/wiki/Compile_and_Install_Ubuntu but using latest
version of PROJ

sudo svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/
sudo wget -c http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
sudo mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad
cd /usr/local/src/proj/nad
sudo ./configure
sudo make
sudo make install
sudo make distclean

Then configure, make and make install of GRASS

./configure \
--with-tcltk-includes="/usr/include/tcl8.5/" \
--with-tcltk-libs="/usr/lib/tcl8.5" \
--enable-debug \
--enable-largefile \
--with-libs=/usr/lib64 \
--with-proj-share="/usr/share/proj/" \
--with-cxx \
--with-readline \
--with-freetype=yes \
--with-freetype-includes="/usr/include/freetype2/" \
--enable-largefile=yes \
--with-geos=yes \
--with-cairo \
--with-wxwidgets \
--with-postgres=yes \
--with-postgres-includes="/usr/include/postgresql/" \
--with-sqlite=yes \
--with-python=yes \
--with-opengl-libs=/usr/include/GL \
--with-ffmpeg=yes \
--with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavformat
/usr/include/libswscale" \
--with-lapack=yes \
--with-nls=yes \
--with-motif=yes \
--with-readline=yes \
--with-python=yes \
--with-proj=yes \
--with-blas --with-lapack --with-cxx \

OUTPUT:

GRASS is now configured for: i686-pc-linux-gnu

  Source directory: /home/rcooper/Downloads/grass642/grass-6.4.2
  Build directory: /home/rcooper/Downloads/grass642/grass-6.4.2
  Installation directory: ${prefix}/grass-6.4.2
  Startup script in directory: ${exec_prefix}/bin
  C compiler: gcc -g -Wall
  C++ compiler: c++ -g -O2
  Building shared libraries: yes
  64bit support: no
  OpenGL platform: X11

  MacOSX application: no
  MacOSX architectures:
  MacOSX SDK:
  Tcl/Tk NVIZ: yes
  BLAS support: yes
  C++ support: yes
  Cairo support: yes
  DWG support: no
  FFMPEG support: yes
  FFTW support: yes
  FreeType support: yes
  GDAL support: yes
  GEOS support: yes
  GLw support: no
  JPEG support: yes
  LAPACK support: yes
  Large File support (LFS): yes
  Motif support: yes
  MySQL support: no
  NLS support: yes
  ODBC support: no
  OGR support: yes
  OpenGL support: yes
  PNG support: yes
  PostgreSQL support: yes
  Python support: yes
  Readline support: yes
  SQLite support: yes
  Tcl/Tk support: yes
  wxWidgets support: yes
  TIFF support: yes
  X11 support: yes

Then sudo make and sudo make install.

Start GRASS by running the command 'grass64' from a terminal.

Path to EPSG code files: /usr/local/share/proj/epsg

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Unable-to-select-EPSG-code-for-location-tp4715353p4945223.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Resolved.

Run the command 'make distclean' in the GRASS installation directory
(grass-6.4.2), then then ./configure, make and make install. The path to the
EPSG codes in then /usr/share/proj/epsg

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Unable-to-select-EPSG-code-for-location-tp4715353p4945253.html
Sent from the Grass - Users mailing list archive at Nabble.com.