[MapProxy] ProjInitError

Oliver Tonnhofer olt at omniscale.de
Fri Nov 26 04:59:43 EST 2010


On 25.11.2010, at 15:27, Jason Lee wrote:

> Hi,
> I just downloaded and installed MapProxy (0.9.0.1) locally on my Windows Vista machine for testing. I followed the steps as per the documentation to the point I thought I was ready to startup the MapProxy server, i.e. "paster serve etc/develop.ini --reload"
> 
> Unfortunately I get an error message :-
> 
> "mapproxy.platform.cpython.proj.ProjInitError: error initializing Proj(proj_def=None, init='epsg:4326'): Invalid argument"
> 
> I'm not too sure what I have missed along the installation steps although I have re-installed several times with the same result. Interestingly, I have FWTools installed on my machine and when I startup MapProxy from within a FWTools command prompt it seems to run up fine?! Is it because MapProxy cannot find map projection settings that FWTools provides in its environment settings?

MapProxy can use Proj4 directly (via ctypes) or pyproj, a Python package that bundles Proj4. I guess that FWTools comes with Proj4 and the Proj4 environment variables are set correctly. When you use MapProxy outside of FWTools, then MapProxy still finds the library but Proj4 does not find the projection definitions.

So you could set either the proj4 environment variables or you could try pyproj. Just install it with `easy_install pyproj`. You might have to set the environment MAPPROXY_USE_PYPROJ to true, so that MapProxy will not use FWTools' Proj4.


Regards,
Oliver

-- 
Oliver Tonnhofer <olt at omniscale.de>
Omniscale - Dominik Helle, Oliver Tonnhofer GbR
Nadorster Str. 60, 26123 Oldenburg
Tel: +49(0)441/9392774-2 (Fax: 9)



More information about the MapProxy mailing list