OK, I think I understand it now. So I just need to define the list of available projections at the MAP level. Then, MapServer will automatically take care of the reprojection.
I'll do this as a first step, and then I'll try the 'variable substitution' trick suggested by Martin in case the on-the-fly reprojection is too slow. -Jiří On Mon, Jan 27, 2014 at 1:02 PM, Thomas Bonfort <[email protected]>wrote: > the list of available projections is defined for all layers of the > mapfile, not at the individual <Layer> level. they are set with the > wms_srs metadata entry. > > On 27/01/2014 11:57, Jiří Kadlec wrote: > > Hi Thomas, > > Thanks for explanation but it's still a bit unclear. I tried to study the > > manual on http://mapserver.org/mapfile/projection.html. > > Can I define two or more PROJECTION blocks for one LAYER? > > > > What I'm trying to achieve is something like this: In the GetCapabilities > > document, the client will see the list of supported projections for each > > layer. Something like: > > > > <Layer> > > <Name>cryosphere_atlas_north</Name> > > <Title>Atlas of the Cryosphere: Northern Hemisphere</Title> > > > <SRS>EPSG:32661</SRS><SRS>EPSG:4326</SRS><SRS>EPSG:3408</SRS><SRS>EPSG:3410</SRS><SRS>EPSG:3411</SRS><SRS>EPSG:3413</SRS><SRS>EPSG:3571</SRS> > > ...... > > > > --Jiri > > > > > > On Mon, Jan 27, 2014 at 12:48 PM, Thomas Bonfort > > <[email protected]>wrote: > > > >> (please keep your messages on list) > >> > >> yes, it will do that if proj support is built in. Just make sure you > >> have defined a PROJECTION block at the LAYER level describing the > >> projection of the underlying data. > >> > >> -- > >> thomas > >> > >> On 27/01/2014 11:45, Jiří Kadlec wrote: > >>> Thank you for the clarification. > >>> I have a related question: > >>> > >>> Can MapServer do 'on-the-fly' reprojection of my WMS layer data on the > >>> server? > >>> Let's say I have a table 'lakes' with one geometry column in EPSG:4326. > >> And > >>> I want to make the same layer available in 3 other projections and I > >> don't > >>> mind the reprojection overhead. > >>> > >>> Regards, > >>> Jiri > >>> > >>> > >>> On Mon, Jan 27, 2014 at 12:38 PM, Thomas Bonfort > >>> <[email protected]>wrote: > >>> > >>>> AFAIK, creating 3 distinct layers is currently the only solution > >>>> available, which has the inconvenience that the client must > explicitely > >>>> request the correct layer in order to avoid the overhead of > >> reprojection. > >>>> You can use INCLUDEs inside those layers in order to avoid duplicating > >>>> the rest of the LAYER configuration (i.e. for everything except NAME, > >>>> DATA, PROJECTION). > >>>> The mechanism used for > >>>> http://mapserver.org/fr/development/rfc/ms-rfc-86.html SCALETOKENs > >> could > >>>> probably be extended to include other runtime-replaceable tokens > >>>> (notably projection id), but there would still be issues in that case > as > >>>> to how mapserver itself should be instructed whether to reproject the > >>>> data or not. > >>>> > >>>> -- > >>>> thomas > >>>> > >>>> On 27/01/2014 11:28, Jiří Kadlec wrote: > >>>>> Dear mapserver forum, > >>>>> > >>>>> In my PostGIS database I have a table 'lakes' with 3 geometry > columns: > >>>>> the_geom4326, the_geom3857, the_geom3067 > >>>>> My goal is to make my 'lakes' layer available in the 3 different > >>>>> projections: (EPSG:4326, EPSG:3857, EPSG:3067) > >>>>> > >>>>> Is this possible in MapServer? > >>>>> > >>>>> (then only way I managed so far is to serve the table as 3 different > >>>>> layers, first layer in EPSG:4326, second layer in EPSG:3857, third > >> layer > >>>> in > >>>>> EPSG:3067) > >>>>> > >>>>> > >>>>> Thanks a lot for help, > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> mapserver-users mailing list > >>>>> [email protected] > >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >>>>> > >>>> _______________________________________________ > >>>> mapserver-users mailing list > >>>> [email protected] > >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >>> > >>> > >>> > >>> > >> > > > > > > > -- Jiří Kadlec Research Assistant Aalto university Lahti, Finland
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
