Reprojection issue (kind of solved)

Marcos Sánchez Provencio marcos at BURKE.ATH.CX
Thu Dec 27 09:52:10 EST 2007


Hello

I am using ms as packaged by ubuntu LTS
simif at webdgb2:~/src/simif$ mapserv -v
MapServer version 4.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

I use python mapscript to generate a map that needs to be served in
different epsg numbers (32628,32629,32630).

I have no problem with vector (postgis) layers, but I get incorrect
results when I try to access a 32630 layer reprojected to 32629. It
works fine the first time, but if I access this layer without
reprojection, then the next time I ask for the 32629 reprojected layer
it does not get reprojected.

There is no problem with the 32628 layers (apparently some kind of
no-reproject flag kicks in when the map proj is the same as the layer
proj).

I have found that I can avoid this behavior by re-setting the layer
projection:

#First, I set the map proj
wms_map.setProjection(proj)
for each layer:
    # Apparently a noop, but it works for me
    capaMS.setProjection(capaMS.getProjection()) 

I have tried to understand the C code, but I have given up, so I hope
that someone finds this message useful to fix the C code or to use this
trick herself.

Cheers



More information about the mapserver-users mailing list