[mapserver-users] Error configuring WMS app : Projection library error. Invalid argument...

stela anders stelaanders at gmail.com
Wed Jan 6 08:14:45 EST 2010


Guys, other problem now ;(
I have 2 layers with same name ... One with LINE and other with ANNOTATION
... It works fine in mapscript environment... But now, with WMS I got a
error when I use both layers with same name:

msWMSLoadGetMapParams(): *WMS server error*. *Invalid layer*(s) given in the
 *LAYERS* parameter

Both layer works separately...

My 2 layers

LAYER
        NAME Road
        METADATA
            "wms_title"    "Road"
        END
        GROUP "Transport"
        TYPE LINE
        STATUS ON
        INCLUDE "Connection.map"
        DATA ...
        PROJECTION
            "+init=epsg:4326"
        END
        CLASS
            TEMPLATE "dummy"
            NAME "Rod x"
            STYLE
                SYMBOL "road"
                COLOR 0 0 0
                ANTIALIAS TRUE
            END
        END
    END

    LAYER
        NAME Road
        METADATA
            "wms_title"    "Road"
        END
        GROUP "Transport"
        TYPE ANNOTATION
        STATUS ON
        INCLUDE "Connection.map"
        DATA ...
        PROJECTION
            "+init=epsg:4326"
        END
        LABELITEM 'rod'
        CLASS
            TEMPLATE "dummy"
            STYLE
                SYMBOL 'roadsymbol'
            END
            LABEL
                TYPE TRUETYPE
                FONT Arial
                SIZE 7
                COLOR 70 70 70
                MINDISTANCE 100
                MINFEATURESIZE 10
                PARTIALS FALSE
                BUFFER 10
            END
        END
    END


Why?

Thanks and sorry for noob questions

Stella



2010/1/5 Daniel Walton <dgwalton at gmail.com>

> You're welcome Stella. I struggled through the Windows WMS stuff a few
> months ago, glad to help.
>
> -Dan
>
>
> On Tue, Jan 5, 2010 at 10:18 AM, stela anders <stelaanders at gmail.com>wrote:
>
>> Woww!
>> Thats it!!!!
>> Worked now!
>> Thanksss guysss ! Thanks Daniel!
>> iuupi!
>>
>> Stella
>>
>> 2010/1/5 Daniel Walton <dgwalton at gmail.com>
>>
>> Stella,
>>>
>>> Try adding a config entry to your mapfile that points to the folder
>>> containing your epsg configuration file:
>>>
>>> MAP
>>>     ...
>>>     CONFIG "PROJ_LIB" "C:/somedir/proj/nad/"
>>>
>>>
>>>     ...
>>> END
>>>
>>>
>>>
>>>  Dan Walton
>>> dgwalton at gmail.com
>>> [image: Linkedin] <http://www.linkedin.com/in/danielwalton2010>[image:
>>> Twitter] <http://twitter.com/danwallie>
>>>
>>>
>>> On Tue, Jan 5, 2010 at 9:56 AM, stela anders <stelaanders at gmail.com>wrote:
>>>
>>>> Hello Frank!
>>>> Thanks for your time ;)
>>>>
>>>> I´m working on Windows 7...
>>>>
>>>> I made all modifications you suggest me, but got the same error...
>>>> The URL now is :
>>>>
>>>>
>>>> http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Argentina&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-62.9142,-17.3676,-57.2892,-11.7426&WIDTH=256&HEIGHT=256
>>>>
>>>>
>>>> The only difference that I noticed is that the error in browser now is
>>>> in TEXT format...
>>>> Before the error was write in a Image...
>>>>
>>>> I´m completely lost ! :(
>>>>
>>>> Any other idea?
>>>>
>>>> ps.: Sorry for my bad english
>>>>
>>>> Stella
>>>>
>>>> 2010/1/5 Frank Warmerdam <warmerdam at pobox.com>
>>>>
>>>> stela anders wrote:
>>>>>
>>>>>>        LAYER
>>>>>>        NAME Argentina
>>>>>>        METADATA
>>>>>>            "wms_title"    "Argentina"   ##required
>>>>>>        END              TYPE POLYGON
>>>>>>        STATUS ON
>>>>>>        INCLUDE "Connection.map"                DATA "the_geom from
>>>>>> tbl_argentina USING UNIQUE gid USING SRID=0"
>>>>>>        PROJECTION
>>>>>>            "proj=longlat"
>>>>>>            "ellps=WGS84"
>>>>>>            "datum=WGS84"
>>>>>>            "no_defs"
>>>>>>        END
>>>>>>
>>>>>>        CLASS
>>>>>>            COLOR 255 200 255
>>>>>>        END
>>>>>>        END
>>>>>>
>>>>>> END
>>>>>>
>>>>>> When I try to open that with my OpenLayer app, I got images with that
>>>>>> error :
>>>>>>
>>>>>> Error: msProcessProjection(): /Projection library error/. /Invalid
>>>>>> argument
>>>>>>
>>>>>
>>>>> Stella,
>>>>>
>>>>> I am not sure why you are getting this error.  I search high and low
>>>>> and can't
>>>>> find "Invalid argument" in either MapServer or PROJ.4.  Are you working
>>>>> on
>>>>> linux or Windows?  Were the "/" characters really in this message?  It
>>>>> is
>>>>> hard for me to understand how this could happen.
>>>>>
>>>>> With regard to your mapfile, I was surprised that you don't have
>>>>> wms_srs metadata on your layer.  It is a shot in the dark, but perhaps
>>>>> you
>>>>> could add wms_srs EPSG:4326 metadata on the layer, and reorder the
>>>>> wms_srs
>>>>> metadata on the map to put EPSG:4326 first.
>>>>>
>>>>> Also, you could try changing:
>>>>>
>>>>>
>>>>> >         PROJECTION
>>>>> >             "proj=longlat"
>>>>> >             "ellps=WGS84"
>>>>> >             "datum=WGS84"
>>>>> >             "no_defs"
>>>>> >         END
>>>>>
>>>>> to:
>>>>>
>>>>> PROJECTION
>>>>>  "+init=epsg:4326"
>>>>> END
>>>>>
>>>>> in both the layer and map.  This is slower to expand but it might
>>>>> make it easier for mapserver to relate to epsg codes.
>>>>>
>>>>>
>>>>> Best regards,
>>>>> --
>>>>>
>>>>> ---------------------------------------+--------------------------------------
>>>>> I set the clouds in motion - turn up   | Frank Warmerdam,
>>>>> warmerdam at pobox.com
>>>>> light and sound - activate the windows | http://pobox.com/~warmerdam<http://pobox.com/%7Ewarmerdam>
>>>>> and watch the world go round - Rush    | Geospatial Programmer for Rent
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100106/53d58bf5/attachment.html


More information about the mapserver-users mailing list