Re: [mapserver-users] two mapserver speed-optimization questions

2011-03-16 Thread Mohamed Saâd HESSANE
For the raster image you can build pyramid with gdaladdo, it's really useful
to increase performances



2011/3/16 Frank Warmerdam warmer...@pobox.com

 On Tue, Mar 15, 2011 at 5:03 PM, Vince Miller vincentpmil...@yahoo.com
 wrote:
  1. The following two lines of PHP from my application transform an php
 image object into a raster map layer:
 
  imagepng($rmap, __MAPS_PATH__ . resource.png);
  $map-getLayerByName(resource)-set(data, __MAPS_PATH__ .
 resource.png);
 
  The imagepng call is a major bottleneck when the extent of the layer is
 large.
  Can the data in image $rmap be accessed for layer resource directly,
 without the file write/read? If so, how? FYI, the following lines appear in
 my mapfile:


 Vince,

 There are no mechanisms to utilize a PHP image object as the
 data in a mapserver raster layer without first writing to disk.  I
 gather PHP image resources are actually a handle to a gdImage
 object, so if you needed it badly enough it should be possible to
 write a PHP function that turn that gdImage into something that
 was accessable to GDAL as a raster but that would be quite
 involved and not something likely to go back into the core
 distribution.

 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

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


Re: [mapserver-users] display tile error as text?

2011-03-16 Thread Mohamed Saâd HESSANE
intercept exception with try catch finally (C# mapscript)

2011/3/16 fruitwerks fruitwe...@gmail.com

 Is there a way to get a request resulting in an error to return plain text?

 Thanks!

 ___
 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] Edit a Line shape and save it

2011-03-09 Thread Mohamed Saâd HESSANE
Hy everybody,
I work with python mapscript and i want to create a Line shape.
I do this :
   test = mapscript.shapefileObj('test',mapscript.MS_SHAPEFILE_ARC)
   for i in range(len(x))
  test.addPoint(mapscript.pointObj(x[i],y[i],0,0))

When i execute the script, there is two new file in the script directory
(test.shp and test.shx).
But when i do an ogrinfo, there's no data stored in the file :
   $ogrinfo -al test.shp
   INFO: Open of `test.shp'
 using driver `ESRI Shapefile' successful.

   Layer name: test
   Geometry: Line String
   Feature Count: 0
   Extent: (0.00, 0.00) - (0.00, 0.00)
   Layer SRS WKT:
   (unknown)

can you help me please?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users