Hi,

Please read  
https://mapserver.org/optimization/tileindex.html#tileindex-mixed-srs and 
https://mapserver.org/development/rfc/ms-rfc-100.html?

-Jukka Rahkonen-
Lähettäjä: mapserver-users <mapserver-users-boun...@lists.osgeo.org> Puolesta 
Peter Schmitt
Lähetetty: perjantai 15. marraskuuta 2019 21.02
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Configuring a layer with one output with multiple input 
projections

Hi,

Is it possible to configure one raster layer with a single output projection 
(epsg:4326) where input rasters are in different UTM zones? I'd like to avoid 
reprojecting the source data if possible.

The rasters will be determined from a Postgis-based tile index where raster 
extents are stored in epsg:4326. The database will also track what UTM zone the 
source raster is in.  Is it possible to pass this projection info from the 
database to the PROJECTION block?

I tried an experiment which does not quite work.  I built a tile index with two 
tifs in different UTM zones:

gdaltindex -t_srs EPSG:4326 test_tindex.gpkg zone45.tif zone46.tif

Then my layers are:

  LAYER
    NAME                    "test_tindex"
    TYPE                    POLYGON

    CONNECTIONTYPE          OGR
    CONNECTION              "test_tindex.gpkg"
    STATUS                  OFF
    PROJECTION
        # proj4 config for +init=epsg:4326  
http://spatialreference.org/ref/epsg/wgs-84/
        "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
    END
    CLASS
        STYLE
            WIDTH 2
            OUTLINECOLOR 0 255 0
        END
    END
  END

  LAYER
    NAME                   "test"
    TYPE                   RASTER
    METADATA
        "ows_title"         "test"
        "ows_srs"           "EPSG:4326 EPSG:3857"
    END
    TILEINDEX               "test_tindex"
    STATUS                  OFF

    PROJECTION
        AUTO
    END
  END

When I make a WMS request for test in an area where the images overlap, it 
seems MapServer stops rendering rasters after the first image in the tile index 
is found... so in this case since zone45.tif  was the first image in the tile 
index, that's what I see for a request bbox in the overlap region.  If I swap 
the order of files in the command to build the tindex, the overlapped area only 
shows me zone46.tif.

$ mapserv -v
MapServer version 7.2.2 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS 
SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Thanks,
Pete
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to