[mapserver-users] how to use sld file with wms

2010-12-06 Thread Tonton
hello i read in mapserver documentation that we can use SLD style definition
in server side but i dont find how to .

where to write in mapfile the sld_body in each layer or  in map object  ?

i don't use mapscript or php request

does the only way is to set it in the url request ? no sld_body or include ?


regards

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


[mapserver-users] How to add attributes to feature/shape with mapscript java?

2010-12-06 Thread rai 8
Hi!,

I trying to add features to a layer with mapscript in a WFS server, there
isn't any method to set attributes directly to a feature or a shape.

I found initValues and setValue to set value to a shape object but in a
xml/gml response it doesn't appear. Anyone knows a way to do this?

 // add feature
shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
shape.initValues(8);
lineObj line = new lineObj();
pointObj point = new pointObj(2.160690, 41.479881, 1);
line.add(point);
shape.add( line);
shape.setValue(0, attr1);
shape.setValue(1, attr2);
System.out.println( shape.getValue(0) +   + shape.getValue(1) +   +
shape.getValue(2) );
 layer.addFeature(shape );
 shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
line = new lineObj();
point = new pointObj(2.17, 41.48, 1);
line.add(point);
shape.add( line);
layer.addFeature(shape );

Another workaround I found is generated a dbf file with all features and
attributes that I want and then load a mapfile pointing to this dbf file,
but this is inefficient.


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


[mapserver-users] street maps

2010-12-06 Thread David Hildebrand
I want to add a street map (OpenStreetMap, Google, Bing, etc.) as a WMS
layer but I'm not sure which service to use and what the URL would be to
try them out?  My AOI is only about 10 by 10 degrees wide.

 

Any suggestions?

 

===
David V. Hildebrand
Agriculture Financial Services Corporation
(403) 782-8239   

www.afsc.ca about:www.afsc.ca  http://www.afsc.ca
http://www.afsc.ca/ 
This communication is intended for the use of the recipient to which it
is addressed, and may contain confidential, personal and/or privileged
information. Please contact Agriculture Financial Services Corporation
immediately if you are not the intended recipient of this communication,
and do not copy, distribute, or take action relying on it. Any
communication received in error, or subsequent reply, should be deleted
or destroyed. Please consider the environment before printing this
email.

 

 

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


[mapserver-users] WMS image doesn't shows at major scales

2010-12-06 Thread Carlos Ruiz
Hi to all,

I have a problem here with an WMS layer, and have no clue about what could be 
happening. I have an ECW file 

with the following info:

Driver: ECW/ERMapper Compressed Wavelets
Files: mosaico_spot_2009.ecw
Size is 192034, 184370
Coordinate System is `'
Origin = (425473.750,2527371.250)
Pixel Size = (2.500,-2.500)
Corner Coordinates:
Upper Left  (  425473.750, 2527371.250)
Lower Left  (  425473.750, 2066446.250)
Upper Right (  905558.750, 2527371.250)
Lower Right (  905558.750, 2066446.250)
Center  (  665516.250, 2296908.750)
Band 1 Block=192034x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
  Metadata:
LAYER_TYPE=athematic
Band 2 Block=192034x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
  Metadata:
LAYER_TYPE=athematic
Band 3 Block=192034x1 Type=Byte, ColorInterp=Blue
  Metadata:
LAYER_TYPE=athematic

It is provided as a WMS and here is the MAP file contents:

MAP

NAME 'spot'
SIZE 800 600
UNITS meters

DEBUG 5
CONFIG MS_ERRORFILE /var/www/html/spot.log

EXTENT 425473 2066446 905559 2527371

PROJECTION
'proj=utm'
'ellps=WGS84'
'datum=WGS84'
'zone=13'
'north'
'nodefs'
END

OUTPUTFORMAT
NAME jpeg
DRIVER GD/JPEG
MIMETYPE image/jpeg
IMAGEMODE RGB
EXTENSION jpg
END

METADATA
'wms_title' 'SPOT'
'wms_onlineresource'
'http://sitel.jalisco.gob.mx/cgi-bin/spot'
'wms_srs'   'EPSG:32613'
'wms_fees'  'none'
'wms_contactperson' 'IC Carlos Ruiz'
'wms_contactelectronicmailaddress'  
'crui...@gmail.com'
END

LAYER

NAME 'spot'
TYPE RASTER
DATA '/var/www/html/raster/spot.ecw'
STATUS DEFAULT

PROJECTION
'proj=utm'
'ellps=WGS84'
'datum=WGS84'
'zone=13'
'north'
'no_defs'
END

METADATA
'wms_title' 'Imagen SPOT'
END

END

END

Everything works fine above the 1:152,000 scale, but when you try to reach 
major 
scales, it shows nothing. The 

map has no MINSCALEDENOM nor MAXSCALEDENOM.

Taking a look at the log file, nothing's wrong. If I set the MS_NONSQUARE 
config key throws: 


msDrawMap(): kicking into non-squarepixel preserving mode.

but nothing yet shows beyond 1:152,000.

Does anyone have a clue about what's wrong ? I'm using Mapserver 5.6.5

Thanks in advance


IC Carlos Ruiz


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


[mapserver-users] PhP/Mapscript expression handling

2010-12-06 Thread Mukesh Subedee
Anyone willing to share a simple example to handle Expression in Mapfile?
I have a Mapfile with few layers and want to play with the EXPRESSION parameter 
in PHP/Mapscript so that I could add dynamism in displaying colors for specific 
region as user's requirement. However I am able to do it with CGI Application.

Any help would be much appreciated!

Thanks,

Mukesh


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


Re: [mapserver-users] WMS image doesn't shows at major scales

2010-12-06 Thread Smith, Michael D ERDC-CRREL-NH
Carlos,

Can you set DEBUG 5 at both the LAYER and MAP level and see what shows up in
the error log?

Also I note that you are specifying the projection at the WMS level in EPSG
terms but not at the MAP and LAYER levels. You should use the EPSG code at
the MAP and LAYER projection blocks as MapServer does not know that your
projection text and the EPSG codes are equivalent so you will be undergoing
reprojection on each call.

Mike


-- 
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
Hanover, NH



On 12/6/10  2:18 PM, Carlos Ruiz boolean10...@yahoo.com wrote:

 Hi to all,
 
 I have a problem here with an WMS layer, and have no clue about what could be
 happening. I have an ECW file
 with the following info:
 
 Driver: ECW/ERMapper Compressed Wavelets
 Files: mosaico_spot_2009.ecw
 Size is 192034, 184370
 Coordinate System is `'
 Origin = (425473.750,2527371.250)
 Pixel Size = (2.500,-2.500)
 Corner Coordinates:
 Upper Left  (  425473.750, 2527371.250)
 Lower Left  (  425473.750, 2066446.250)
 Upper Right (  905558.750, 2527371.250)
 Lower Right (  905558.750, 2066446.250)
 Center  (  665516.250, 2296908.750)
 Band 1 Block=192034x1 Type=Byte, ColorInterp=Red
   Overviews: arbitrary
   Metadata:
 LAYER_TYPE=athematic
 Band 2 Block=192034x1 Type=Byte, ColorInterp=Green
   Overviews: arbitrary
   Metadata:
 LAYER_TYPE=athematic
 Band 3 Block=192034x1 Type=Byte, ColorInterp=Blue
   Metadata:
  LAYER_TYPE=athematic
  
 It is provided as a WMS and here is the MAP file contents:
 
 MAP
 
 NAME 'spot'
 SIZE 800 600
 UNITS meters
 
 DEBUG 5
 CONFIG MS_ERRORFILE /var/www/html/spot.log
 
 EXTENT 425473 2066446 905559 2527371
 
 PROJECTION
 'proj=utm'
 'ellps=WGS84'
 'datum=WGS84'
 'zone=13'
 'north'
 'nodefs'
 END
 
 OUTPUTFORMAT
 NAME jpeg
 DRIVER GD/JPEG
 MIMETYPE image/jpeg
 IMAGEMODE RGB
 EXTENSION jpg
 END
 
 METADATA
 'wms_title' 'SPOT'
 'wms_onlineresource'
 'http://sitel.jalisco.gob.mx/cgi-bin/spot'
 'wms_srs'   'EPSG:32613'
 'wms_fees'  'none'
 'wms_contactperson' 'IC Carlos
 Ruiz'
 'wms_contactelectronicmailaddress'
 'crui...@gmail.com'
 END
 
 LAYER
 
 NAME 'spot'
 TYPE RASTER
 DATA '/var/www/html/raster/spot.ecw'
 STATUS DEFAULT
 
 PROJECTION
 'proj=utm'
 'ellps=WGS84'
 'datum=WGS84'
 'zone=13'
 'north'
 'no_defs'
 END
 
 METADATA
 'wms_title' 'Imagen SPOT'
 END
  
  END
 
 END
 
 Everything works fine above the 1:152,000 scale, but when you try to reach
 major scales, it shows nothing. The
 map has no MINSCALEDENOM nor MAXSCALEDENOM.
 
 Taking a look at the log file, nothing's wrong. If I set the MS_NONSQUARE
 config key throws:
 
 msDrawMap(): kicking into non-squarepixel preserving mode.
 
 but nothing yet shows beyond 1:152,000.
 
 Does anyone have a clue about what's wrong ? I'm using Mapserver 5.6.5
 
 Thanks in advance
 
 IC Carlos Ruiz
 
  
 
 ___
 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] street maps

2010-12-06 Thread Brent Fraser

David,

  This thread may get you started with OpenStreetMap.  Be sure to read 
Google's and Bing's Term Of Service.


http://lists.osgeo.org/pipermail/mapserver-users/2010-July/066061.html

Best Regards,
Brent Fraser


On 12/6/2010 12:18 PM, David Hildebrand wrote:


I want to add a street map (OpenStreetMap, Google, Bing, etc.) as a 
WMS layer but I'm not sure which service to use and what the URL would 
be to try them out?  My AOI is only about 10 by 10 degrees wide.


Any suggestions?

===
David V. Hildebrand
Agriculture Financial Services Corporation
(403) 782-8239

www.afsc.ca about:www.afsc.ca__http://www.afsc.ca 
http://www.afsc.ca/_
_This communication is intended for the use of the recipient to which 
it is addressed, and may contain confidential, personal and/or 
privileged information. Please contact Agriculture Financial Services 
Corporation immediately if you are not the intended recipient of this 
communication, and do not copy, distribute, or take action relying on 
it. Any communication received in error, or subsequent reply, should 
be deleted or destroyed. Please consider the environment before 
printing this email.



___
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