[mapserver-users] Pixel size for distance tool in Rosa applet

Silke Reimer silke at intevation.de
Tue Oct 8 03:08:07 EDT 2002


Hello,

since the pixel size is a relevant information for the distance tool in the
Rosa applet I adapted the MapServer code so that I could use the pixel size
with a [cellsize] tag. Therefor I just had to add 2 lines in maptemplate.c
and I thought that this could be useful to be integrated in the mapserver
code (at least for 3.7). 

Greetings,
	
	Silke

Here is the patch:
---------------------
diff -ur mapserver-3.6.2.orig/maptemplate.c mapserver-3.6.2/maptemplate.c
--- mapserver-3.6.2.orig/maptemplate.c  Mon Aug 12 08:48:30 2002
+++ mapserver-3.6.2/maptemplate.c       Mon Aug 12 08:53:50 2002
@@ -1963,6 +1963,8 @@
   
   sprintf(repstr, "%f", msObj->Map->scale);
   outstr = gsub(outstr, "[scale]", repstr);
+  sprintf(repstr, "%f", msObj->Map->cellsize);
+  outstr = gsub(outstr, "[cellsize]", repstr);
   
   sprintf(repstr, "%.1f %.1f", (msObj->Map->width-1)/2.0,
(msObj->Map->height-1)/2.0);
   outstr = gsub(outstr, "[center]", repstr);
------------------------------------

-- 
Silke Reimer

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20021008/3146029a/attachment.bin


More information about the mapserver-users mailing list