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 _<_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


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

2010-12-06 Thread Smith, Michael D ERDC-CRREL-NH
It appears that it is reading the data. Could be be that the color values
are not between 0 and 255? Perhaps you need to add a PROCESSING section?
Does this display properly is another viewer?

Also, you should reply back to the list as well. There are many people that
may be able to help.

M


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


On 12/6/10  3:29 PM, "Carlos Ruiz"  wrote:

> Michael,
> 
> Thanks for the reply. I've set the DEBUG 5 config key at the LAYER section,
> I've reproduced 
> the steps to get nothing and this is the log's contents:
> 
> 
> mapserv request processing time (msLoadMap not incl.): 0.084s
> msFreeMap(): freeing map at 0xa029150.
> freeLayer(): freeing layer at 0xa030a28.
> mapserv request processing time (msLoadMap not incl.): 0.083s
> msFreeMap(): freeing map at 0x9dd6150.
> freeLayer(): freeing layer at 0x9ddda28.
> msDrawMap(): kicking into non-square pixel preserving mode.
> msDrawRasterLayerLow(imagen): entering.
> msResampleGDALToMap in effect: cellsize = 298.004345
> msDrawGDAL(imagen): using RAW_WINDOW=0 0 192034 184370, dst=0,0,1611,1546
> msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
> msDrawMap(): Layer 0 (imagen), 0.897s
> msDrawMap(): Drawing Label Cache, 0.000s
> msDrawMap() total time: 0.898s
> msSaveImage() total time: 3.291s
> mapserv request processing time (msLoadMap not incl.): 4.214s
> msFreeMap(): freeing map at 0x92376f0.
> freeLayer(): freeing layer at 0x923efc8.
> msDrawMap(): kicking into non-square pixel preserving mode.
> msDrawRasterLayerLow(imagen): entering.
> msResampleGDALToMap in effect: cellsize = 22.479058
> msDrawGDAL(imagen): using RAW_WINDOW=70800 88927 17174 14962,
> dst=0,0,1910,1664
> msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
> msDrawMap(): Layer 0 (imagen), 0.525s
> msDrawMap(): Drawing Label Cache, 0.000s
> msDrawMap() total time: 0.525s
> msSaveImage() total time: 1.415s
> mapserv request processing time (msLoadMap not incl.): 1.967s
> msFreeMap(): freeing map at 0x8bc96f0.
> freeLayer(): freeing layer at 0x8bd0fc8.
> msDrawMap(): kicking into non-square pixel preserving mode.
> msDrawRasterLayerLow(imagen): entering.
> msResampleGDALToMap in effect: cellsize = 22.479058
> msDrawGDAL(imagen): using RAW_WINDOW=70800 88927 17174 14962,
> dst=0,0,1910,1664
> msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
> msDrawMap(): Layer 0 (imagen), 0.524s
> msDrawMap(): Drawing Label Cache, 0.000s
> msDrawMap() total time: 0.524s
> msSaveImage() total time: 1.528s
> mapserv request processing time (msLoadMap not incl.): 2.078s
> msFreeMap(): freeing map at 0x99ca6f0.
> freeLayer(): freeing layer at 0x99d1fc8.
> 
> 
> I didn't noticed about the EPSG matters, thanks, I just change it using
> init=epsg:32613.
> 
> IC Carlos Ruiz
> 
> 
> From: "Smith, Michael D ERDC-CRREL-NH" 
> To: Carlos Ruiz ; mapserver-users
> 
> Sent: Mon, December 6, 2010 1:23:35 PM
> Subject: Re: [mapserver-users] WMS image doesn't shows at major scales
> 
> Re: [mapserver-users] WMS image doesn't shows at major scales 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
> 

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


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

2010-12-06 Thread Jeff McKenna

On 10-12-06 6:23 AM, Tonton wrote:

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 ?


I'm not sure if it was implemented any other way.  There was discussions 
on this mailing list several years ago, but I don't know the outcome:


http://osgeo-org.1803224.n2.nabble.com/server-side-SLD-support-td1997798.html
http://osgeo-org.1803224.n2.nabble.com/server-side-SLD-support-td1998273.html

I have used PHP MapScript to apply SLDs on the server side, such as:

***
getLayerByName("country_bounds");

//apply SLD
$oLayer->applySLD('version="1.0.0">country_boundsxxxNA3DESCAfricacenter-linename="stroke">#ffname="stroke-width">2.0');


// set image size
$oMap->setsize(400, 300);

// set image format
$oMap->selectoutputformat("png");

// draw map
$oImage = $oMap->draw();

// set header
header("Content-type: image/gif");

// output map
$url = $oImage->saveImage("");

?>
**


--
Jeff McKenna
MapServer 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] 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"  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


[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


[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] 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    >
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] 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] 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