Jukka,
Can you do:
$ python
>>> from mapnik import Projection as P
>>> P('+init=epsg:32635')
<mapnik.Projection object at 0x236030>
If not then you've got a problem with the proj 4 epsg files being found.
If you can then there must be a string parsing bug in nik2img.py
Also,
I just tried this:
-p '+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'
and I can confirm a bug that should be fixed in r.263. Can you svn up
and let me know?
Thanks,
Dane
On Oct 30, 2008, at 1:23 PM, Rahkonen Jukka wrote:
> Hi,
>
> Something odd has happened. I had been using nik2img.py
> successfully for some days, and suddenly it stopped accepting -p
> parameter for user defined projection. The script runs still OK if
> I give extents in lon-lat by using -e switch. Generate_image.py
> runs also ok. But every time I an trying with -p switch I get the
> following error:
>
> Traceback (most recent call last):
> File "nik2img4.py", line 1172, in <module>
> main()
> File "nik2img4.py", line 1164, in main
> nik_map.open()
> File "nik2img4.py", line 948, in open
> self.render_file()
> File "nik2img4.py", line 890, in render_file
> self.build()
> File "nik2img4.py", line 720, in build
> mapnik_proj = mapnik.Projection("+init=%s" % self.srs.lower())
> RuntimeError: failed to initialize projection with:+init=epsg:32635
>
> Only thing I know that has happened to my computer was an automatic
> Windows Vista update that rebooted my computer. But how on earth
> could it have any effect on just the -p switch?
>
> I give the projection as -p epsg:32635. I am sure it used to work.
> I tried also -p "+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84
> +units=m +no_defs". Result is otherwise the same, but first error
> comes from line 723 instead of line 720. Any help is appreciated, I
> want my georefernced maps back.
>
> -Jukka Rahkonen-
>
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users