[mapserver-users] GPX format supported?

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jan 13 14:57:14 EST 2009


Bean,

You probably have some other layer that does not have the block ... ENDs 
match up correctly. Try making a mapfile with just the single layer 
below and see if that works, then add another layer and test it, and so 
on until it breaks. Also check the all quoted strings are properly 
terminated.

No magic here, just take it layer by layer until you find the problem.

-Steve W

bean at warbaby.com wrote:
> 
> Thanks Andreas,
> 
> An obvious and simple mistake. Sorry to have bothered the list with such 
> a simple question.
> 
> I am still getting msLoadMap(): Premature End-of-File. I am a relative 
> newbie with mapserver  although I have managed to build a 2800 line 
> mapfile of many layer types. This is my first CONNECTIONTYPE OGR layer 
> and I just don't seem to get the context.
> 
> Included is my current mapfile that fails with msLoadMap(): Premature 
> End-of-File. OGR reads the file fine from the command line so my problem 
> must be in my mapfile right?
> 
> 
> LAYER
>   NAME 'GPS'
>   TYPE POINT
>   CONNECTIONTYPE OGR
>   CONNECTION 
> '/Applications/MAMP/d/DATA/NonGrassFiles/GPX/gpsbabel_output.gpx'
>   DATA 'waypoints'
>   STATUS ON
>   DEBUG 5
>   CLASS
>     STYLE
>       SYMBOL 'CIRCLE'
>       SIZE 3
>        OUTLINECOLOR 0 0 0
>        COLOR 106 7 182
>     END
>   END
> END
> 
> bean
> 
> Hi,
>  
> I think the 'END' keyword after 'OPACITY 100' shouldn't be there since 
> it terminates the LAYER block.
> LAYER
>   NAME 'GPS'
>   TYPE POINT
>   CONNECTIONTYPE OGR
>   CONNECTION 
> '/Applications/MAMP/d/DATA/NonGrassFiles/GPX/gpsbabel_output.gpx'
>   DATA 'Waypoints'
>   STATUS ON
>   DEBUG 5
>   OPACITY 100
> #  END <-- terminates LAYER
>   LABELITEM 'name'
>   CLASS
>     NAME 'name = Waypoint'
>     STYLE
>       SYMBOL  'circle'
>       SIZE 8
>       OUTLINECOLOR 0 0 0
>       COLOR 255 255 0
>     END
>     LABEL
>       SIZE medium
>       COLOR 0 0 0
>       ANGLE 0
>       BUFFER 1
>     END
>   END
> END
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list