[mapserver-users] Configuring a layer with one output with multiple input projections

Peter Schmitt pschmitt at gmail.com
Fri Nov 15 15:54:30 PST 2019


Thanks Jukka! I was looking at
https://www.mapserver.org/mapfile/projection.html, which doesn't mention
TILESRS. I just submitted a PR to address that:
https://github.com/mapserver/docs/pull/293

Cheers,
Pete

On Fri, Nov 15, 2019 at 12:19 PM Rahkonen Jukka (MML) <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> 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-bounces at lists.osgeo.org> *Puolesta
> *Peter Schmitt
> *Lähetetty:* perjantai 15. marraskuuta 2019 21.02
> *Vastaanottaja:* mapserver-users at 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
>


-- 
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20191115/bcab2170/attachment.html>


More information about the mapserver-users mailing list