problem with same projection for map and layer in mapfile

Frank Warmerdam warmerdam at POBOX.COM
Fri Feb 17 08:38:41 EST 2006


Jiří Mikulášek wrote:
> Hello,
> 
> I have got a mapfile with specified projection for both the whole map
> and the only layer in it. Both projections are same. Mapserver then
> renders a blank image. However, when I comment out the map projection
> or the layer projection, the map is rendered properly. Why am I getting 
> such behaviour?
> 
> I know that this example is a little bit artificial and I do not have to 
> specify
> both projections. In fact I am dealing with mapfiles with much bigger
> number of layers and the mapfiles are generated on the fly. Usually
> the layers are in the same projection but it may happen that they are not.
> It is much easier for me to specify the projections both for the layers 
> and the map
> and not bother about checking when projection is the same and when not.
> Or do I have to check it?
> 
> This is the mapfile:
> 
> MAP
>   EXTENT -654601.880000 -1154846.910000 -648383.16 -1148290.76
>   UNITS meters
>   SIZE 600 600
>   PROJECTION
>       "init=epsg:2065"
>   END
>   OUTPUTFORMAT
>     NAME png
>     DRIVER "GD/PNG"
>     MIMETYPE "image/png"
>     IMAGEMODE PC256
>     EXTENSION "png"
>   END
>   LAYER
>     NAME "dkm/par001"
>     TYPE POLYGON
>     STATUS ON
>     DATA "c:\MyGisData\Trebic_DGN_Shapefile\dkm/par001"
>     PROJECTION
>       "init=epsg:2065"
>     END
>     CLASS
>       COLOR 240 240 240
>       OUTLINECOLOR 0 0 0
>     END
>   END
> END
> 
> I am using custom built Python Mapscript for Mapserver 4.6.1 on Windows XP.

Jirka,

I can't think of any reason you would get this problem.  I would suggest you
submit a bug report on the issue with a minimal map demonstrating the issue.
You might want to use an inline feature to avoid having to submit supporting
data.

One thing you might want to try and verify first is that the EPSG look i
working ok.

Perhaps replace your PROJECTION blocks with the following and see if you
get different results.

PROJECTION
   "+proj=krovak +lat_0=49.5 +lon_0=60.16666666666667 +alpha=30.28813972222222 
+k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs"
END

I would also note that there are reasons to be nervous about the default
translations of coordinate systems with non-greenwich prime meridians via
PROJ (such as yours) and also to be nervous of the axis handling of krovak
projections.  I don't see how these could matter in this situation since
the definition isn't really being used to do anything.  But it may bite you
later.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list