OGR Problem

Frank Warmerdam fwarmerdam at GMAIL.COM
Wed Aug 24 09:06:45 EDT 2005


On 8/24/05, Dave Mitchell <dave.mitchell at newgrove.com> wrote:
> 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>

Dave,

To clarify, the ODBC driver looks for a geometry_columns 
table, and if it finds it, uses the f_geometry_column column
to identify which column in the target table is the geometry
column.  As noted, it is assumed to be WKT format. 

I would add that in the above configuration, you don't really
need the "virtual" layer at all.  You could just directly address
the ODBC table. 

> My questions are these:-
> 
> 1. Have I understood this correctly?

yes

> 2. Is there a workaround for OGR with a WKB database?

not currently. 

> 3. Are there any plans to implement this functionality by GDAL/ Mapserver and if so when?

there are no fixed plans to do so. 

> 4. If no, then who might do this custom development for a fee?

Amoung others, I would be prepared to do the work.  

There are a couple of approaches.  One would be to build the
WKB support into the ODBC driver, and to have it auto-detect
WKB based on column type.  Currently I have no BLOB handling
in the ODBC driver, so some additional work would need to be
implemented for binary columns as well as changes to translate
the WKB.   I can prepare a quote if you wish.

The more general approach would be to have the VRT layer
support WKB.  This would be easy, but would still mean that
the ODBC driver would need to be changed to support
binary columns. 

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 mapserver-users mailing list