[Mapserver-users] python mapscript install 3.7

Michael Schulz mschulz at webgis.de
Thu Jan 30 03:42:03 EST 2003


Hi,

thanks, Sean and Norman, this did it and now it is working - nearly. I ran into trouble with the gdal library, because i
am using MS 3.6.3 with php-mapscript on the same machine, which was compiled with gdal117. After installing gdal118
php-mapscript363 wasn't working anymore (well, some of it wasn't working, especially maplab), then i reinstalled gdal117:
php-mapscript worked again, but of course python mapscript 37 couldn't be imported anymore. So my question is now, how
would you solve this problem? recompile MS363 with gdal118? find a way to have both installed (how could this be done?)?

Thanks, Michael

> FYI
>
> I have to make the following changes to mapscript.i
> inorder to get a working Python mapscript from the
> CVS sources
>
> I have needed to do this for a while
>
> Below I believe
>
>  int contrain(rectObj *bounds, double overlay) {
>     return msConstrainRect(bounds,self, overlay);
>   }
>
> should be
>
>  int contsrain(rectObj *bounds, double overlay) {
>     return msConstrainExtent(bounds,self, overlay);
>   }
>
> Not sure about the others
>
> Norman
>
> $ cvs diff -cw mapscript.i
> Index: mapscript.i
> ===================================================================
> RCS file: /data2/cvsroot/mapserver/mapscript/mapscript.i,v
> retrieving revision 1.90
> diff -c -w -r1.90 mapscript.i
> *** mapscript.i 27 Jan 2003 22:38:42 -0000      1.90
> --- mapscript.i 29 Jan 2003 17:46:27 -0000
> ***************
> *** 102,110 ****
>         return NULL;
>     }
>
> !   int addColor(int r, int g, int b) {
> !     return msAddColor(self, r, g, b);
> !   }
>
>     int getSymbolByName(char *name) {
>       return msGetSymbolIndex(&self->symbolset, name);
> --- 102,110 ----
>         return NULL;
>     }
>
> ! //  int addColor(int r, int g, int b) {
> ! //    return msAddColor(self, r, g, b);
> ! //  }
>
>     int getSymbolByName(char *name) {
>       return msGetSymbolIndex(&self->symbolset, name);
> ***************
> *** 136,146 ****
>       }
>
> !     if (MS_DRIVER_GD(self->outputformat))
> !     {
> !         if(msLoadPalette(image->img.gd, &(self->palette), self->imagecolor) == -1)
> !           return NULL;
> !     }
>       self->cellsize = msAdjustExtent(&(self->extent), self->width, self->height);
>       status = msCalculateScale(self->extent, self->units, self->width, self->height, self->resolution, &self->scale);
>       if(status != MS_SUCCESS) return NULL;
> --- 136,146 ----
>       }
>
> ! //    if (MS_DRIVER_GD(self->outputformat))
> ! //    {
> ! //        if(msLoadPalette(image->img.gd, &(self->palette), self->imagecolor) == -1)
> ! //          return NULL;
> ! //    }
>       self->cellsize = msAdjustExtent(&(self->extent), self->width, self->height);
>       status = msCalculateScale(self->extent, self->units, self->width, self->height, self->resolution, &self->scale);
>       if(status != MS_SUCCESS) return NULL;
> ***************
> *** 754,762 ****
>       return  msAdjustExtent(self, width, height);
>     }
>
> !   int contrain(rectObj *bounds, double overlay) {
> !     return msConstrainRect(bounds,self, overlay);
> !   }
>
>     int draw(mapObj *map, layerObj *layer, imageObj *image, int classindex, char *text) {
>       shapeObj shape;
> --- 754,762 ----
>       return  msAdjustExtent(self, width, height);
>     }
>
> ! //  int contrain(rectObj *bounds, double overlay) {
> ! //    return msConstrainRect(bounds,self, overlay);
> ! //  }
>
>     int draw(mapObj *map, layerObj *layer, imageObj *image, int classindex, char *text) {
>       shapeObj shape;
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

--
-----------------------------------------------------------
Michael Schulz                                in medias res
Dipl.-Geologe                              Gesellschaft für
                                Informationstechnologie mbH
                             Sautierstr. 38, 79104 Freiburg
                                     0761 55695-95 (Fax 96)
mschulz at webgis.de                             www.webgis.de





More information about the mapserver-users mailing list