[Gdal-dev] ogr virtual data issues with connecting to excel

Frank Warmerdam warmerdam at pobox.com
Mon Feb 16 08:59:28 EST 2004


Kralidis,Tom [Burlington] wrote:
> Hi,
> 
> I'm trying to connect to an excel document using this approach, but am
> having problems doing so.
> 
> I have created a system DSN
> 
> Here is my .ovf file:
> 
> <OGRVRTDataSource>
> 	<OGRVRTLayer name="plantwatch">
> 		<SrcDataSource>ODBC:plantwatch2,plantwatch</SrcDataSource>
> 		<SrcLayer>plantwatch</SrcLayer>
> 		<GeometryType>wkbPoint</GeometryType>
> 		<LayerSRS>WGS84</LayerSRS>
> 		<GeometryField encoding="PointFromColumns" x="longitude"
> y="latitude"/> 
> 	</OGRVRTLayer>
> </OGRVRTDataSource>
> 
> When I test with ogrinfo, I get:
> 
> C:\ms4w\Apache\cgi-bin\ms_odbc>.\ogrinfo.exe
> \ms4w\mapserv\services\naturewatch\plantwatch2.ovf
> ERROR 4: Update access not supported for VRT datasources.
> ERROR 1: Unable to identify source X or Y field for PointFromColumns
> encoding.
> FAILURE:
> 
> Any suggestions?  The x and y attributes exist as columns in my excel file.
> As a workaround, when I converted the excel file to an access database, it
> worked.
> 
> I can post the excel document on request.

Tom,

I would suggest you start by using "ogrinfo -ro -al ODBC:plantwatch2,plantwatch"
to see what OGR thinks the raw ODBC information looks like.  You may find that
the ODBC view of the spreadsheet is different than you think.  For instance,
the column names may be altered.

If you don't learn anything useful from that, you can email me the .xls directly
and I will look into it.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list