[Mapserver-users] BUGS ?? pointObj->m, shapeObj->numlines and shapeObj->bounds not set.

Luis Blanco luis.blanco at retemail.es
Wed Feb 12 10:50:22 PST 2003


This is a multi-part message in MIME format.
--------------090709070200060100000800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

PHP MapScript - BUGS: pointObj->m, shapeObj->numlines and=20
shapeObj->bounds not set.

I have found the following bugs with Mapscript:

A simple bug related to pointObj, m member is supposed to be initialized =

to 0, but it isn't. If you try to initialize to a value, the value is=20
lost, it seems like it is initialized to the y value.

--- code begin ---
dl( 'php_mapscript.so' );
print ms_GetVersion();
print( "\n" );

$pto =3D ms_newPointObj();
$pto->setXY( 10, 20, 30 );
print_r( $pto );

$pto =3D ms_newPointObj();
$pto->setXY( 40, 50 );
print_r( $pto );
--- code end ---

--- ouput begin ---
MapServer version 3.6.1 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG OUTPUT=3D=
WBMP=20
SUPPORTS=3DPROJ SUPPORTS=3DTTF SUPPORTS=3DWMS_SERVER INPUT=3DEPPL7 INPUT=3D=
POSTGIS=20
INPUT=3DSHAPEFILE
point Object
(
   [_handle_] =3D> Resource id #7
   [x] =3D> 10
   [y] =3D> 20
   [m] =3D> 20             <----------------- this is wrong  !!!
)
point Object
(
   [_handle_] =3D> Resource id #8
   [x] =3D> 40
   [y] =3D> 50
   [m] =3D> 50             <----------------- this is wrong also !!! :)
)

--- ouput end ---


The other (or others) are related to shape (ms_newShapeObj), more=20
exactly with shape.bounds and shape.numlines.

shape.bounds is not updated and neither shape.numlines, the latter is=20
supposed to be fixed according to

http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0110/msg00394.ht=
ml

and

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=3D69

but it isn't.

--- code begin ---
dl( 'php_mapscript.so' );
print ms_GetVersion();
print( "\n" );

$shape =3D ms_newShapeObj( MS_SHAPE_LINE );

$line =3D ms_newLineObj();
$line->addXY( 1, 2 );
$line->addXY( 3, 4 );

$shape->add( $line );
print_r( $shape );
--- code end ---

--- ouput begin ---
MapServer version 3.6.1 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG OUTPUT=3D=
WBMP=20
SUPPORTS=3DPROJ SUPPORTS=3DTTF SUPPORTS=3DWMS_SERVER INPUT=3DEPPL7 INPUT=3D=
POSTGIS=20
INPUT=3DSHAPEFILE
shape Object
(
   [_handle_] =3D> Resource id #9
   [numlines] =3D> 0            <----------------- this is wrong
   [type] =3D> 1
   [index] =3D> -1
   [tileindex] =3D> -1
   [classindex] =3D> 0
   [numvalues] =3D> 0
   [text] =3D>
   [bounds] =3D> rect Object
       (
           [_handle_] =3D> Resource id #10
           [minx] =3D> -1   <----------------- this is wrong also !!! :)
           [miny] =3D> -1   <----------------- this is wrong also !!! :)
           [maxx] =3D> -1   <----------------- this is wrong also !!! :)
           [maxy] =3D> -1   <----------------- this is wrong also !!! :)
       )

)
--- ouput end ---

Am I doing something wrong or something... ?

Any help is welcome.

luis.

--=20
{=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
Luis Blanco   email: luis.blanco at eresmas.com
             Tlno.: 91 20 20 062
Wanadoo Espa=F1a - eresMas
www.wanadoo.es - www.eresMas.com

Direcci=F3n de Tecnolog=EDa
Edificio APOT
C/ Ribera del Sena, S/N, Planta 3
28042 Madrid
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D}




--------------090709070200060100000800
Content-Type: multipart/related;
 boundary="------------000800020608090908010600"


--------------000800020608090908010600
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator" content="Microsoft Word 10 (filtered)">
  <title>FW: Shell in the news</title>
  <style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
p
	{margin-right:0cm;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman";}
span.EstiloCorreo18
	{font-family:Arial;
	color:navy;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
	{page:Section1;}
-->
  </style>
</head>
<body>
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">PHP
MapScript - BUGS: pointObj->m, shapeObj->numlines and
shapeObj->bounds not set. <br>
<br>
I have found the following bugs with Mapscript: <br>
<br>
A simple bug related to pointObj, m member is supposed to be
initialized to 0, but it isn't. If you try to initialize to a value,
the value is lost, it seems like it is initialized to the y value. <br>
<br>
--- code begin --- <br>
dl( 'php_mapscript.so' ); <br>
print ms_GetVersion(); <br>
print( "\n" ); <br>
<br>
$pto = ms_newPointObj(); <br>
$pto->setXY( 10, 20, 30 ); <br>
print_r( $pto ); <br>
<br>
$pto = ms_newPointObj(); <br>
$pto->setXY( 40, 50 ); <br>
print_r( $pto ); <br>
--- code end --- <br>
<br>
--- ouput begin --- <br>
MapServer version 3.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=POSTGIS
INPUT=SHAPEFILE <br>
point Object <br>
( <br>
   [<span class="moz-txt-underscore"><span class="moz-txt-tag">_</span>handle<span
 class="moz-txt-tag">_</span></span>] => Resource id #7 <br>
   [x] => 10 <br>
   [y] => 20 <br>
   [m] => 20             <----------------- this is wrong  !!! <br>
) <br>
point Object <br>
( <br>
   [<span class="moz-txt-underscore"><span class="moz-txt-tag">_</span>handle<span
 class="moz-txt-tag">_</span></span>] => Resource id #8 <br>
   [x] => 40 <br>
   [y] => 50 <br>
   [m] => 50             <----------------- this is wrong also
!!! <img src="cid:part1.05030702.09010003 at retemail.es" alt=":)"
 class="moz-txt-smily" height="19" width="19" align="middle"> <br>
) <br>
<br>
--- ouput end --- <br>
<br>
<br>
The other (or others) are related to shape (ms_newShapeObj), more
exactly with shape.bounds and shape.numlines. <br>
<br>
shape.bounds is not updated and neither shape.numlines, the latter is
supposed to be fixed according to <br>
<br>
<a class="moz-txt-link-freetext"
 href="http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0110/msg00394.html">http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0110/msg00394.html</a> <br>
<br>
and <br>
<br>
<a class="moz-txt-link-freetext"
 href="http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=69">http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=69</a> <br>
<br>
but it isn't. <br>
<br>
--- code begin --- <br>
dl( 'php_mapscript.so' ); <br>
print ms_GetVersion(); <br>
print( "\n" ); <br>
<br>
$shape = ms_newShapeObj( MS_SHAPE_LINE ); <br>
<br>
$line = ms_newLineObj(); <br>
$line->addXY( 1, 2 ); <br>
$line->addXY( 3, 4 ); <br>
<br>
$shape->add( $line ); <br>
print_r( $shape ); <br>
--- code end --- <br>
<br>
--- ouput begin --- <br>
MapServer version 3.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=POSTGIS
INPUT=SHAPEFILE <br>
shape Object <br>
( <br>
   [<span class="moz-txt-underscore"><span class="moz-txt-tag">_</span>handle<span
 class="moz-txt-tag">_</span></span>] => Resource id #9 <br>
   [numlines] => 0            <----------------- this is wrong <br>
   [type] => 1 <br>
   [index] => -1 <br>
   [tileindex] => -1 <br>
   [classindex] => 0 <br>
   [numvalues] => 0 <br>
   [text] => <br>
   [bounds] => rect Object <br>
       ( <br>
           [<span class="moz-txt-underscore"><span class="moz-txt-tag">_</span>handle<span
 class="moz-txt-tag">_</span></span>] => Resource id #10 <br>
           [minx] => -1   <----------------- this is wrong also
!!! <img src="cid:part1.05030702.09010003 at retemail.es" alt=":)"
 class="moz-txt-smily" height="19" width="19" align="middle"> <br>
           [miny] => -1   <----------------- this is wrong also
!!! <img src="cid:part1.05030702.09010003 at retemail.es" alt=":)"
 class="moz-txt-smily" height="19" width="19" align="middle"> <br>
           [maxx] => -1   <----------------- this is wrong also
!!! <img src="cid:part1.05030702.09010003 at retemail.es" alt=":)"
 class="moz-txt-smily" height="19" width="19" align="middle"> <br>
           [maxy] => -1   <----------------- this is wrong also
!!! <img src="cid:part1.05030702.09010003 at retemail.es" alt=":)"
 class="moz-txt-smily" height="19" width="19" align="middle"> <br>
       ) <br>
<br>
) <br>
--- ouput end --- <br>
<br>
Am I doing something wrong or something... ? <br>
<br>
Any help is welcome. <br>
<br>
luis. <br>
<br>
<div class="moz-txt-sig"><span class="moz-txt-tag">-- <br>
</span>{======================================================= <br>
Luis Blanco   email: <a class="moz-txt-link-abbreviated"
 href="mailto:luis.blanco at eresmas.com">luis.blanco at eresmas.com</a> <br>
             Tlno.: 91 20 20 062 <br>
Wanadoo España - eresMas <br>
<a class="moz-txt-link-abbreviated" href="http://www.wanadoo.es">www.wanadoo.es</a>
- <a class="moz-txt-link-abbreviated" href="http://www.eresMas.com">www.eresMas.com</a> <br>
<br>
Dirección de Tecnología <br>
Edificio APOT <br>
C/ Ribera del Sena, S/N, Planta 3 <br>
28042 Madrid <br>
=======================================================} <br>
<br>
<br>
<br>
</div>
</div>
</body>
</html>

--------------000800020608090908010600
Content-Type: image/gif;
 name="smile_n.gif"
Content-Transfer-Encoding: base64
Content-ID: <part1.05030702.09010003 at retemail.es>
Content-Disposition: inline;
 filename="smile_n.gif"

R0lGODlhEwATAKIAAP//AMzMAGZmAP8zAAAAAP///wAAAAAAACH5BAEAAAUALAAAAAATABMA
AANVWLrUTisyEoC1oUlFr8dQRHykFRad+Y0gdzlv86KVKdsskOUAjHu312rFK5GCRWDMJDAC
BKxGrTcFXTIo4CPY41QJgzAP69IWT14nWSL97DaiLVqRAAA7
--------------000800020608090908010600--

--------------090709070200060100000800--




More information about the MapServer-users mailing list