AW: [mapserver-users] Mapserver Projection Errors

SixDegrees paulcarlisle at comcast.net
Thu Oct 20 05:24:17 EDT 2011


I'll take a look, but the example I provided is a cut-and-paste from the
mapfile in question; the mapfiles are machine-generated, so if it is correct
then all of them should be correct. But it's certainly something worth
checking.

I can also split the string into individual arguments if needed. I tried
that initially, but was then pleasantly surprised to find that the one-liner
worked exactly the same, so I saved a couple lines of code by just using
that. I wasn't checking the logs, though, so I don't know whether the other
form causes errors or not, but I'll try that as well.

Can you point me to any documentation on the precise format these strings
should have? Other reading, and suggestions here, indicate that Proj.4 can
be extremely fussy about leading spaces and other formatting issues.


Eichner, Andreas - SID-NLK wrote:
> 
>> mapserver log fills up with the error message
>> 
>>    msProcessProjection(): Projection library error. 
>> projection not named
> 
> As Daniel already noted, the error you receive can be translated as
> "'proj' argument missing". Since MS uses the number of arguments _and_
> the existence of '+' to decide wether to interpret the PROJECTION block
> as a one-liner or as a list of projection parameters, I guess you mixed
> them somehow.
> 
> So
>>   PROJECTION
>>      "init=epsg:4326"
>>   END 
> is interpreted as a list of projection parameters with only one entry
> and
> 
>>   PROJECTION
>>      "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"
>>   END 
> is interpreted as a one-liner which will be split into a list of
> parameters before invoking the pj_init() function. If you accidentially
> forget the quotes or '+' in one of your projection blocks it might be
> misinterpreted and therefore throw the error.
> Walk through your MAP file and make sure you use either one-liners using
> a single quoted string or a list of quoted parameters one at a line.
> Your examples are correct and the latter equals
> 
> PROJECTION
>   "proj=longlat"
>   "ellps=WGS84"
>   "towgs84=0,0,0,0,0,0,0"
>   "no_defs"
> END
> 
> HTH
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at .osgeo
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-Projection-Errors-tp6908527p6912201.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list