[postgis-users] PHP MapScript - BUGS: pointObj->m, shapeObj->numlines and shapeObj->bounds not set.

Luis Blanco luis.blanco at es.wanadoo.com
Wed Feb 12 06:53:08 PST 2003


PHP MapScript - BUGS: pointObj->m, shapeObj->numlines and 
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 
lost, it seems like it is initialized to the y value.

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

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

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

--- ouput begin ---
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
point Object
(
    [_handle_] => Resource id #7
    [x] => 10
    [y] => 20
    [m] => 20             <----------------- this is wrong  !!!
)
point Object
(
    [_handle_] => Resource id #8
    [x] => 40
    [y] => 50
    [m] => 50             <----------------- this is wrong also !!! :)
)

--- ouput end ---


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

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

http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0110/msg00394.html

and

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

but it isn't.

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

$shape = ms_newShapeObj( MS_SHAPE_LINE );

$line = 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=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=POSTGIS 
INPUT=SHAPEFILE
shape Object
(
    [_handle_] => Resource id #9
    [numlines] => 0            <----------------- this is wrong
    [type] => 1
    [index] => -1
    [tileindex] => -1
    [classindex] => 0
    [numvalues] => 0
    [text] =>
    [bounds] => rect Object
        (
            [_handle_] => Resource id #10
            [minx] => -1   <----------------- this is wrong also !!! :)
            [miny] => -1   <----------------- this is wrong also !!! :)
            [maxx] => -1   <----------------- this is wrong also !!! :)
            [maxy] => -1   <----------------- this is wrong also !!! :)
        )

)
--- ouput end ---

Am I doing something wrong or something... ?

Any help is welcome.

luis.

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

Dirección de Tecnología
Edificio APOT
C/ Ribera del Sena, S/N, Planta 3
28042 Madrid
=======================================================}





More information about the postgis-users mailing list