OGR Problem

Dave Mitchell dave.mitchell at NEWGROVE.COM
Wed Aug 24 05:49:04 PDT 2005


Hi List,

I have been investigating the GDAL/OGR with the ODBC connection.

I have been using virtual data files (See the link below)
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData

My understanding is as follows:

1. Non-spatial data

It is possible to plot x,y data from a SQL Server table quite easily as
follows:-

<OGRVRTDataSource>
  <OGRVRTLayer name="mylayer">
  <SrcDataSource>ODBC:mapserver/mapserver at MapServerTest</SrcDataSource>
  <SrcSQL>SELECT * FROM tblWhatever</SrcSQL>
  <GeometryField encoding="PointFromColumns" x="Easting" y="Northing"/>
  </OGRVRTLayer>
</OGRVRTDataSource>

2. WKT Spatial Data
If you have an OGC compliant WKT database with a GEOMETRY_COLUMNS table, it
is possible to plot points, Lines, polygons etc.
(It picks up the required columns automatically)

<OGRVRTDataSource>
   <OGRVRTLayer name="mylayer3">
   <SrcDataSource>ODBC:mapserver/mapserver at MapServerTest</SrcDataSource>
   <SrcLayer>UK_Counties_FEA</SrcLayer>
   <GeometryType>wkbPolygon</GeometryType>
   </OGRVRTLayer>
</OGRVRTDataSource>


3. WKB Spatial Data
However the database I am using holds data in the WKB (Well Known Binary)
format and I am not clear whether this is supported by the current OGR
library as the documentations says:

"it is currently a hardcoded assumption that the geometry is in WKT format."
http://www.gdal.org/ogr/drv_odbc.html
-------------------------------
My questions are these:-

1. Have I understood this correctly?
2. Is there a workaround for OGR with a WKB database?
3. Are there any plans to implement this functionality by GDAL/ Mapserver
and if so when?
4. If no, then who might do this custom development for a fee?



More information about the MapServer-users mailing list