[mapserver-dev] Using tileindex raster layer with php_mapscript
Frank Warmerdam
warmerdam at pobox.com
Thu Oct 2 02:14:23 EDT 2008
On Wed, Oct 1, 2008 at 1:10 PM, <laurent.baey at free.fr> wrote:
> In mapraster.c trunk code :
> 1401 if(layer->data == NULL) /* assume whole filename is in attribute field
> */
> 1402 strcpy( tilename, tshp.values[tileitemindex] );
> 1403 else
> 1404 sprintf(tilename, "%s/%s", tshp.values[tileitemindex], layer->data);
> 1405 filename = tilename;
>
> I found the extra slash coming from line 1404.
> Working with a mapfile solve the problem, as layer->data remains null if not
> defined in the mapfile. But I need to set it dynamically.
>
> So when coming from php mapscript, as layer->data is not null, I would
> suggest
> to replace line 1401 of mapraster.c with
>
> if(layer->data == NULL || strlen(layer->data) == 0)
>
> any comments ?
> If it doesn't create side effect, can it be commited ?
Larent,
I see no problem with this change. Please file a ticket on the
issue. You may assign it directly to me "warmerdam".
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the mapserver-dev
mailing list