Chip Taylor wrote:
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):
...
'<OGRVRTDataSource> <OGRVRTLayer name="GPSData"> <SrcDataSource>ODBC:myUser/[EMAIL PROTECTED]</SrcDataSource> <SrcSQL>EXEC pGetTracking</SrcSQL> <GeometryType>wkbLineString</GeometryType><GeometryField encoding="PointFromColumns" x="gpsLongitude" y="gpsLatitude"/></OGRVRTLayer> </OGRVRTDataSource>'
Chip, what are the types of your gpsLongitude columns? Are they array types of some kind? Or perhaps you are hoping that OGR will collect all the rows, and make it into a single linestring features? Basically, this is not supported. If you could do something in the database to prepare an appropriate line geometry in WKT format, you could use the WKT column support in VRT. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | President OSGF, http://osgeo.org
