[mapserver-users] Possible bug with 3.5 code w/ Proj 4

Scott Shealy sshealy at e811.com
Tue Nov 20 06:40:06 PST 2001


Thanks... that did it... next time I will be sure to look at all the D 
switches...

Scott

On Monday 19 November 2001 09:12 pm, Frank Warmerdam wrote:
> Scott Shealy wrote:
> > I am stumped... is this a bug?... Am I doing something wrong.? I need the
> > projection stuff to work and I need to do it this way b/c I am using the
> > mapscript interface in a java project.  But when testing I ran into this
> > problem so I pulled the java stuff out of the equation by writing test.c
> > above to isolate the problem ... BTW I have got the mapscript interface
> > working in java and I am planning to post to the mailing list how I did
> > that as soon as the project is complete(deadlines are looming and I am
> > working 65 hrs a week ... or I would do it now!)
> >
> > Any help is greatly appreciated...
> >
> > BTW we have been using mapserver for about 2 weeks and we LOVE IT!!!!
>
> Scott,
>
> I encountered exactly the same problem.  It turns out that mapObj includes
> a projectionObj, but the size of projectionObj (in mapproject.h) changes
> depending on whether USE_PROJ is defined or not.  USE_PROJ is consistently
> defined for all the regular MapServer components by the makefile, but your
> mainline build did not define this symbol, and so projectionObj was smaller
> and all the alighnment of stuff in mapObj was screwed up in your mainline.
>
> Steve ... I would suggest we change projectionObj to look like this:
>
> typedef struct {
>   char **args; /* variable number of projection args */
>   int numargs; /* actual number of projection args */
> #ifdef USE_PROJ
>   projPJ proj; /* a projection structure for the PROJ package */
>
> #else
>    void   *proj; /* dummy place holder */
>
>
> #endif
> } projectionObj;
>
> instead of this:
>
> typedef struct {
>   char **args; /* variable number of projection args */
>   int numargs; /* actual number of projection args */
> #ifdef USE_PROJ
>   projPJ proj; /* a projection structure for the PROJ package */
> #endif
> } projectionObj;
>
> This change will ensure that projectionObj is always the same size
>
> reguardless of whether USE_PROJ is defined for a given build.  What
> do you think?
>
> Scott ... your fix is to just build with -DUSE_PROJ on the commandline.
>
> Best regards,



More information about the MapServer-users mailing list