[mapserver-dev] variable substitution for projection

Zach Aller allerzach at gmail.com
Wed Dec 21 21:38:54 EST 2011


Yup thats exactly what is going on we have images from different source
that have different projections and so we have a little program that will
get called to figure out the projection of the geotiff then with we need to
use mapserver for some processing and there for need to change the
projection of the said layer.

Also this method did not seem to work

map.layer[layername]=PROJECTION+EPSG:3158+END

got this error

loadProjection(): Unknown identifier. Parsing error near (:):(line 1)


On Wed, Dec 21, 2011 at 7:55 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:

> Zach,
>
> Why would you want to change the projection of a layer?
>
> The projection of a layer should be constant as it defines the projection
> of the data that is in that layer.
>
> So unless you are doing something like changing the data source AND also
> needing to then change the projection because the new data is in another
> projection, then I can not imagine that you are going to get any useful
> results doing this.
>
> -Steve W
>
>
> On 12/21/2011 5:23 PM, Zach Aller wrote:
>
>> that seem's to have done the trick sort of now i am just wondering if i
>> can set that for a specific layer i tried
>>
>> map.layer[layername].**projection
>>
>> but that did not seem to work. Setting the map projection will probably
>> be fine for our project at least for now.
>>
>> On Wed, Dec 21, 2011 at 11:04 AM, Lime, Steve D (DNR)
>> <Steve.Lime at state.mn.us <mailto:Steve.Lime at state.mn.us**>> wrote:
>>
>>    Zach: You should be able to change the projection through the URL
>>    like so:
>>
>>       …&map.projection=EPSG:3158&…
>>
>>    No need to runtime subs…
>>
>>    Steve
>>
>>    *From:*mapserver-dev-bounces@**lists.osgeo.org<mapserver-dev-bounces at lists.osgeo.org>
>>    <mailto:mapserver-dev-bounces@**lists.osgeo.org<mapserver-dev-bounces at lists.osgeo.org>
>> >
>>    [mailto:mapserver-dev-bounces@**lists.osgeo.org<mapserver-dev-bounces at lists.osgeo.org>
>>    <mailto:mapserver-dev-bounces@**lists.osgeo.org<mapserver-dev-bounces at lists.osgeo.org>>]
>> *On Behalf Of *Zach
>>    Aller
>>    *Sent:* Tuesday, December 20, 2011 5:28 PM
>>    *To:* mapserver-dev at lists.osgeo.org
>>    <mailto:mapserver-dev at lists.**osgeo.org<mapserver-dev at lists.osgeo.org>
>> >
>>    *Subject:* [mapserver-dev] variable substitution for projection
>>
>>
>>    ok i am working with mapserver and a nodejs project and so i am
>>    calling mapserver like so.
>>
>>    mapserv -nh
>>    "/getPreviewImg.map&mode=map&**mapext='+req.params.extent+'&**
>> filename='+req.params.imgname+**'&projection=3158"
>>
>>    the issue is that mapserver dose not support projection based run
>>    time substitution and so i was wondering if that is possible to add
>>    and how hard it would be (maybe i could to it myself etc if pointed
>>    in right direction because i have no experience with mapserver's src)
>>
>>    map file example thats what i want to replace
>>
>>    PROJECTION
>>    "init=epsg:%projection%"
>>    END
>>
>>    or perhaps even this then i could build what ever
>>
>>    PROJECTION
>>         %projection%
>>    END
>>
>>
>>
>>
>> ______________________________**_________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>>
>
> ______________________________**_________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20111221/92381294/attachment.html


More information about the mapserver-dev mailing list