Defining a line from SQL server using OGR
Chip Taylor
work at XWB.COM
Thu Mar 30 07:00:23 PST 2006
I am retrieving a set of point from SQL Server using OGR. If I declare the
layer type to be "Point" then it works fine. However, I want the series of
XY coordinates to define a line. If I declare the layer type "Line" nothing
renders. Any help would be appreciated. Here is the layer code defined as
a line (there are two xy points in the database):
#####################################
# Tracking
#
LAYER
NAME GPSLayer1
TYPE Point
CONNECTIONTYPE OGR
CONNECTION
'<OGRVRTDataSource>
<OGRVRTLayer name="GPSData">
<SrcDataSource>ODBC:myUser/myPwd at myDSN</SrcDataSource>
<SrcSQL>EXEC pGetTracking</SrcSQL>
<GeometryType>wkbLineString</GeometryType>
<GeometryField encoding="PointFromColumns" x="gpsLongitude"
y="gpsLatitude"/>
</OGRVRTLayer>
</OGRVRTDataSource>'
DATA "GPSData"
CLASSITEM "gpsDeviceId"
STATUS off
CLASS
EXPRESSION /Device1/
STYLE
COLOR 90 0 255
OUTLINECOLOR 0 255 0
SYMBOL 'BigLine'
SIZE 40
END
END
END
########### End of Tracking Layer ###############
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060330/de8a3601/attachment.htm>
More information about the MapServer-users
mailing list