[mapserver-users] OGR data layer type - points and lines

Stephen Woodbridge woodbri at swoodbridge.com
Thu Dec 16 09:57:22 EST 2010


I do not believe that this is possible.
If you want to draw lines you have to create a data source the returns 
lines not points.

The problem is that mapserver draws features and each point is a 
feature. It does not have a mechanism that can read a data source and 
aggregate the point features into a single line feature.

I have seen posts on the PostGIS list for SQL that can do this. You 
might ask on the GDAL list if there is a way to do this. Or if you can 
use PostGIS, then you can find the SQL in the archives or ask again.

-Steve W

On 12/16/2010 1:00 AM, Ian Walberg wrote:
> Hello list,
>
> Using an OGR connection to an sqlite data file we can get point and
> labels to draw successfully.
>
> However when we try and draw a line using the point data we do not get
> anything drawn.
>
> Layer details below.
>
> Thanks
>
> Ian
>
> LAYER
>
> NAME ogr_points
>
> STATUS DEFAULT
>
> TYPE point
>
> CONNECTIONTYPE OGR
>
> CONNECTION "points.sqlite"
>
> DATA "DataPoints"
>
> CLASS
>
> NAME "From OGR"
>
> COLOR 255 0 0
>
> STYLE
>
> SYMBOL 'City'
>
> SIZE 5
>
> COLOR 0 255 255
>
> END
>
> LABEL
>
> COLOR 255 255 255
>
> OUTLINECOLOR 0 0 0
>
> TYPE truetype
>
> FONT Unicode
>
> SIZE 16
>
> ANTIALIAS TRUE
>
> POSITION AUTO
>
> END # end of label
>
> END
>
> END
>
> LAYER
>
> NAME ogr_line
>
> STATUS OFF
>
> TYPE line
>
> CONNECTIONTYPE OGR
>
> CONNECTION "points.sqlite"
>
> DATA "DataPoints"
>
> CLASS
>
> STYLE
>
> COLOR 255 22 22
>
> WIDTH 2
>
> 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