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

2010-01-06 Thread Jeff McKenna

stela anders wrote:

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_titleRoad  
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_titleRoad  
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?


Hello Stella,

Check your GetCapabilities response of your WMS service - your 2 layers 
of the same name were probably renamed by MapServer with unique names 
(such as Road_01 and Road_02), so you should request the layers with 
those names.


To avoid this you could:

- use different names in your mapfile
- combine your 2 layers into one layer
- since you already have the layers in a group, add a group metadata tag 
in the layers, and then use the group name in your WMS LAYERS request 
(but first verify names through a GetCapabilities request), such as:


LAYER
  NAME Road
  GROUP Transport
  METADATA
wms_title Road
wms_group_title groupname
  END
  ...
END


http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.mapLAYERS=Transport;...

-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-06 Thread stela anders
Thanks Jeff!
Could you show me how combine my 2 layers?

Stella

2010/1/6 Jeff McKenna jmcke...@gatewaygeomatics.com

 stela anders wrote:

 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_titleRoad  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_titleRoad  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?


 Hello Stella,

 Check your GetCapabilities response of your WMS service - your 2 layers of
 the same name were probably renamed by MapServer with unique names (such as
 Road_01 and Road_02), so you should request the layers with those names.

 To avoid this you could:

 - use different names in your mapfile
 - combine your 2 layers into one layer
 - since you already have the layers in a group, add a group metadata tag in
 the layers, and then use the group name in your WMS LAYERS request (but
 first verify names through a GetCapabilities request), such as:

 LAYER
  NAME Road
  GROUP Transport
  METADATA
wms_title Road
wms_group_title groupname
  END
  ...
 END



 http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.mapLAYERS=Transport;.
 ..

 -jeff


 --
 Jeff McKenna
 FOSS4G Consulting and Training Services
 http://www.gatewaygeomatics.com/



 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-06 Thread Jeff McKenna

stela anders wrote:

Thanks Jeff!
Could you show me how combine my 2 layers?



I may not understand your scenario very well.  You might want to check 
an example mapfile for labeling roads (such as the labeled roads in 
http://svn.osgeo.org/osgeo/foss4g/benchmarking/mapserver/shapefile-merged.map)


-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-05 Thread stela anders
Hello all...
I´m stuck trying to convert a mapscript app to WMS ...

My mapfile :

MAP
EXTENT -79.7892 -34.2426 -24.9958 6.11775
FONTSET ..\Fonts.txt
IMAGECOLOR 230 254 254
IMAGETYPE png
SIZE 400 200
STATUS ON
UNITS dd
NAME Map

INCLUDE Simbols.sym

OUTPUTFORMAT
NAME png
MIMETYPE image/png
DRIVER GD/PNG
EXTENSION png
IMAGEMODE PC256
TRANSPARENT TRUE
END

PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END

WEB
IMAGEPATH 'C:\map\temp'
IMAGEURL '/tmp/'
QUERYFORMAT text/html
LEGENDFORMAT text/html
BROWSEFORMAT text/html

METADATA
wms_title WMS Server  ##required
wms_onlineresource http://localhost/cgi-bin-last/mapserv.exe?;
##required
wms_srs   EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326
##recommended
END
END

LEGEND
   ...
END

REFERENCE
   ...
END

LAYER
NAME Argentina
METADATA
wms_titleArgentina   ##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

http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.mapLAYERS=ArgentinaTRANSPARENT=trueFORMAT=image/pngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-62.9142,-17.3676,-57.2892,-11.7426WIDTH=256HEIGHT=256

Any help pleasse!

Stella
*
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-05 Thread Frank Warmerdam

stela anders wrote:

LAYER
NAME Argentina
METADATA
wms_titleArgentina   ##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, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-05 Thread stela anders
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.mapLAYERS=ArgentinaTRANSPARENT=trueFORMAT=image/pngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG:4326BBOX=-62.9142,-17.3676,-57.2892,-11.7426WIDTH=256HEIGHT=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 warmer...@pobox.com

 stela anders wrote:

LAYER
NAME Argentina
METADATA
wms_titleArgentina   ##required
END  TYPE POLYGON
STATUS ON
INCLUDE Connection.mapDATA 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,
 warmer...@pobox.com
 light and sound - activate the windows | 
 http://pobox.com/~warmerdamhttp://pobox.com/%7Ewarmerdam
 and watch the world go round - Rush| Geospatial Programmer for Rent


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-05 Thread Daniel Walton
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
dgwal...@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 stelaand...@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.mapLAYERS=ArgentinaTRANSPARENT=trueFORMAT=image/pngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG:4326BBOX=-62.9142,-17.3676,-57.2892,-11.7426WIDTH=256HEIGHT=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 warmer...@pobox.com

 stela anders wrote:

LAYER
NAME Argentina
METADATA
wms_titleArgentina   ##required
END  TYPE POLYGON
STATUS ON
INCLUDE Connection.mapDATA 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,
 warmer...@pobox.com
 light and sound - activate the windows | 
 http://pobox.com/~warmerdamhttp://pobox.com/%7Ewarmerdam
 and watch the world go round - Rush| Geospatial Programmer for Rent



 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2010-01-05 Thread stela anders
Woww!
Thats it
Worked now!
Thanksss guysss ! Thanks Daniel!
iuupi!

Stella

2010/1/5 Daniel Walton dgwal...@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
 dgwal...@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 stelaand...@gmail.comwrote:

 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.mapLAYERS=ArgentinaTRANSPARENT=trueFORMAT=image/pngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG:4326BBOX=-62.9142,-17.3676,-57.2892,-11.7426WIDTH=256HEIGHT=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 warmer...@pobox.com

 stela anders wrote:

LAYER
NAME Argentina
METADATA
wms_titleArgentina   ##required
END  TYPE POLYGON
STATUS ON
INCLUDE Connection.mapDATA 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,
 warmer...@pobox.com
 light and sound - activate the windows | 
 http://pobox.com/~warmerdamhttp://pobox.com/%7Ewarmerdam
 and watch the world go round - Rush| Geospatial Programmer for Rent



 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users