[mapserver-dev] Re: [mapserver-users] Using e00 files

Paul Ramsey pramsey at cleverelephant.ca
Tue Feb 2 14:20:06 EST 2010


On Tue, Feb 2, 2010 at 11:03 AM, Brent Fraser <bfraser at geoanalytic.com> wrote:
> Hmm.  I see the problem.  The current Mapserver behavior is "if the LAYER
> proj is not specified, assume it to be the same as the MAP proj and don't
> re-project the coordinates".

I don't see that a behavior of
- if PROJECTION defined use that
- if ! PROJECTION but source SRS is available use that
- if no information assume same as MAP
would necessarily break any map files
(except those where the data is actually living in a state with
invalid source SRS information, in which case blaming mapserver for
breaking backwards compat is a bit harsh)

P.

> As Howard points out in RFC, the closest we
> could get to simplifying the LAYER proj definition would be:
>
> PROJECTION
>  AUTO
> END
>
> Dunno about where to put the reading of the external SRS.  Perhaps when the
> Layer Data is set mapscript could attempt to load the SRS.   I never could
> get PHP mapscript to give me a valid projection object; I seem to have to
> set them explicitly within the PHP.
>
> Brent
>
> Paul Ramsey wrote:
>>
>> Yeah, would be nice.
>>
>> Howard did an RFC some time back.
>> http://svn.osgeo.org/mapserver/trunk/docs/en/development/rfc/ms-rfc-37.txt
>>
>> I think it could be whittled down to
>>
>> if (! layer->projection)
>>  msLoadProjectionFromSource(lyr);
>>
>> The odd/unfortunate thing about that is setting the projection becomes
>> a kind of side effect of msDrawMap, probably. At least, the current
>> workflow is such that the data sources aren't opened until "things
>> start happening" (queries, map drawing, whatever). So either we
>> piggyback the source projection setting into there, or we stick it
>> onto the end of msLoadMap. But putting the projection load at the end
>> of msLoadMap could make for some interesting problems for mapscript
>> people who are loading a map file with invalid data entries and then
>> making them valid before invoking an action.
>>
>> The question of "where in the workflow to do the source projection
>> reading" seems like the key one for this problem.
>>
>> P.
>>
>> On Tue, Feb 2, 2010 at 9:14 AM, Brent Fraser <bfraser at geoanalytic.com>
>> wrote:
>>>
>>> You haven't defined the LAYER's PROJECTION (we really should enhance
>>> mapserver to read .prj files!)
>>
>


More information about the mapserver-dev mailing list