Hi,
It's great that your are developing this utility. I hope that some day I can
use it in a WMS way for requesting map from a given BBOX in a given projection
so that what I get is exactly what I wanted.
I made another try yesterday by reprojecting the whole OSM data in the database
into epsg:32635 and replacing all projection elements in osm.xml file
correspondingly. I believe that I managed to do the changes without errors
because running nik2img was successful. Unfortunately the result was exactly
the same than when the data and osm.xml were both using Google projection.
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)
I wonder why max easting is now taken into min easting, and instead of max
easting that I give the query is always using fixed value of 500000.
-Jukka Rahkonen-
Dane Springmeyer wrote:
> Hi Jukka,
>
> That's great you are testing nik2img.py.
>
> You are definitely using it in the way it is intended but
> unfortunately you've run into one of its limitations.
>
> The overall issue is that the mapnik-python bindings cannot
> AFAICT do transforms between two projected coordinate systems.
>
> Currently nik2img is not set to fail when this type of
> reprojection is requested, but it probably should to avoid
> confusion (note we're talking about the BBOX reprojection.
> Mapnik core can do transformations between projected systems
> without a problem but the BBOX transformation in python with
> nik2img can't)
>
> If your OSM.XML were in geographic/epsg:4326 this
> reprojection to UTM would probably work, but you can't
> currently go from mercator to UTM.
>
> For background see this ticket: http://trac.mapnik.org/ticket/117
>
> Dane
>
>
> On Oct 26, 2008, at 7:10 AM, Rahkonen Jukka wrote:
>
> > Hi,
> >
> > I captured the statement sent to Postgresql from the logfile and it
> > seems a bit odd for me. In my nik2img.py request I used parameters:
> > -p epsg:32635 -r 389725,6673682,392528,6676266
> >
> > However, this is what comes into database
> >
> > (select * from osm_line order by z_order) as roads where way &&
> > setSRID('BOX3D(392527.9999999671 6673681.999999999,500000
> > 6676265.999999509)'::box3d,32635)
> >
> > Looks like bounding box easting values are wrong.
> >
> > -Jukka-
> >
> >
> >
> > -----Alkuperäinen viesti-----
> > Lähettäjä: [EMAIL PROTECTED] puolesta: Rahkonen
> > Jukka
> > Lähetetty: su 26.10.2008 15:22
> > Vastaanottaja: mapnik mailinglist
> > Aihe: [Mapnik-users] Question about nik2img.py
> >
> > Hi,
> >
> > I am trying to get some OpenStreetMap data out from PostGIS
> database
> > with nik2img.py utility.
> > I was running the following two commands and hoped to get rather a
> > similar result. However, while the first is producing a
> good map with
> > all the OSM features in it, the latter is missing almost
> all OSM data.
> > There are only a few streets in the eastern side of the
> > map while western part of resulting map lacks all OSM data.
> > However, coastline is there. Am I using nik2img in a wrong
> way? By
> > request were these:
> >
> > c:\python2.5\python nik2img.py -m gosm.xml -o niktest.png -e
> > 25.01,60.18,25.06,60.21 -s 1000,1000
> > c:\python2.5\python nik2img.py -m gosm.xml -o niktest2.png
> -p epsg:
> > 32635 -r 389725,6673682,392528,6676266 -s 1000,1000
> >
> > My environment is:
> > - Windows Vista
> > - Python 2.5
> > - Mapnik for Windows32 v. 0.5.0
> > - osm.xml dated 14.3. 2008
> >
> > Anybody having Mapnik running and OSM data in Postgis from
> this area
> > in Google projection should be able to repeat my test.
> >
> > -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
>
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users