Problem with reprojected images

Ed McNierney ed at TOPOZONE.COM
Tue Mar 14 06:38:12 PST 2006


Dirk -

I assume your tiled source images do not overlap, and that the originals
do not have white border strips around them.

If that's the case, this may be an inevitable artifact of the
reprojection.  Look at the situation along one north/south edge between
two tiles.

If you render the tiles in the source projection you'll get two adjacent
vertical lines along the edges of each file, with no gap between them.

If you reproject the tiles, then you will have two adjacent edges that
are two diagonal lines.  The distance between the edges may not be 1,
and may vary by a pixel along the course of those two diagonal lines.
When that happens, the images will sometimes overlap by one pixel (you
won't notice) and will sometimes leave a one-pixel gap (which is
obvious).  The obvious gaps will repeat in a regular pattern since the
phase difference between the two diagonal lines will be regular and
repeating.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Dirk Jesko
Sent: Tuesday, March 14, 2006 3:04 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Problem with reprojected images

Hi,

I set up a WMS for aerial images. The images are projected in
Gauss-Krueger 3 and have a size of one square kilometer. The WMS also
provides other projections, e.g. Gauss-Krueger 2-5, UTM, etc. If I query
the WMS with a projection other than the original one, I get little
white lines along the edges of the tiles (see the attached image). The
image format does not matter. How do I get rid of these? I can not find
any option that might be related to this. By the way, this also happens
if the data is accessed via mapscript or as normal cgi.

Thanks for any help.

Regards,
Dirk

Here a part of the mapfile:

MAP
 ...
 IMAGECOLOR      255 255 255
 EXTENT          3100000 5200000 4100000 6200000
 SIZE            500 500
 SHAPEPATH       "/data/daten/WMS"

 PROJECTION
   "init=epsg:31467"     # GK 3
 END

 WEB
   METADATA
     ...
     "wms_srs" "EPSG:31467 EPSG:31466 EPSG:31468 EPSG:31469 EPSG:32632
EPSG:32633 EPSG:4326"
     "wms_encoding" "UTF-8"
     "wms_feature_info_mime_type" "application/vnd.ogc.gml"
   END

   MAXSCALE   10000000
   MINSCALE   1000

   ...
 END

 OUTPUTFORMAT
   NAME png24
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
   IMAGEMODE RGB
   EXTENSION "png"
   FORMATOPTION "INTERLACE=ON"
 END
 OUTPUTFORMAT
   NAME png
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
   IMAGEMODE PC256
   EXTENSION "png"
   FORMATOPTION "INTERLACE=ON"
 END
 OUTPUTFORMAT
   NAME jpeg
   DRIVER "GD/JPEG"
   MIMETYPE "image/jpeg"
   IMAGEMODE RGB
   EXTENSION "jpg"
   FORMATOPTION "QUALITY=95"
   FORMATOPTION "PROGRESSIVE=ON"
 END

 ...

 LAYER
   NAME         "img02000"
   GROUP        "img"
   TILEINDEX    "IMG_02000.shp"
   TILEITEM     "locationUn"
   TYPE         RASTER
   MAXSCALE     500000.0
   MINSCALE     100000.0
   PROJECTION
     "init=epsg:31467"     # GK 3
   END
   METADATA
      ...
   END
 END

 ...

END



More information about the MapServer-users mailing list