Jukka,

I may have spoke to soon in the sense that the reprojection of the  
bbox inside the nik2img script before passing parameters along to  
mapnik may not be your only problem.

I'll need to set up a test case and do further testing because I get  
different results than you. The bbox set with the -r flag get properly  
passed to mapnik on my system but the -p flag to actually request the  
map in the UTM projection is not being honored.

When I get around to testing it would be helpful to know what versions  
of nik2img and postgres/postgis are you using.

Also, note that you should use the '-v' flag to output verbose debug  
information from nik2img which might yield more clues about what is  
going wrong.


Dane



On Oct 27, 2008, at 5:36 AM, Rahkonen Jukka wrote:

> Martijn van Oosterhout wrote:
>
>> On Mon, Oct 27, 2008 at 10:59 AM, Rahkonen Jukka
>> <[EMAIL PROTECTED]> wrote:
>>> I wonder if nik2img could be made to support this kind of
>> cases properly.  There is no need to reproject the bbox of
>> request because now the request and data are using the same
>> projection. Thus the coordinates could perhaps just be passed
>> on to the database query as they are given in the command line?
>>> So instead of these parameters
>>> -r 389725,6673682,392528,6676266
>>> which now lead to database query
>>> setSRID('BOX3D(392527.9999999671 6673681.999999999,500000
>>> 6676265.999999509)'::box3d,32635)
>>> the query might be simply
>>> BOX3D(389725 6673682,392528 6676266)
>>
>> Do you realise that setSRID does not do any projection at all
>> and that from the point of view of the database those queries
>> will return exactly the same thing?
>>
>> What you probably intend is the query to be somethinhg like:
>>
>> st_transform( setSRID('BOX3D(392527.9999999671
>> 6673681.999999999,500000 6676265.999999509)'::box3d,32635), 900913)
>
> Thanks Martijn, I checked the database logs after well behaving  
> queries
> sent by other clients and saw that there is not much wrong in the  
> query
> sent by nik2img-Mapnin chain. My database is now in 32635 and
> st_transform is not needed.  Therefore  
> setSRID('BOX3D(392527.9999999671
> 6673681.999999999,500000 6676265.999999509)'::box3d,32635) is  
> otherwise
> OK, but for some reason it does not take the easting parameters as I
> give those.  MaxX parameter 392528 is used as MinX (after going  
> through
> some rather accurate calculation) and static value 500000 is used as
> MaxX.  For me this looks like a bug either in the script or in Mapnik
> but perhaps I am giving the parameters wrongly.  According to nik2img
> help -r 389725,6673682,392528,6676266 should be correct.
>
> Should I try running Mapnik-WMS instead of nik2img? I would prefer  
> using
> nik2img because I just want to get Mapnik maps which I could
> georeference simply and accurately to be used in GIS programs. And I
> have already both Mapserver and Geoserver WMS running on this  
> computer.
> But I can tolerate having a third WMS if that is the way to go. Most
> fresh Mapnik Windows version seems to be 0.5.1, is it enough for  
> running
> WMS service?
>
> -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

Reply via email to