[mapserver-users] Mapserver WFS - ODBC RDBMS - GEOMETRY_COLUMNS and SPATIAL_REF_SYS Tables

Robert Sanson Robert.Sanson at asurequality.com
Thu Mar 1 19:57:54 EST 2012


OVF files can link to point, line and polygon data in WKT format. Just specify wkbPoint, wkbLinestring, wkbPolygon see:

http://www.gdal.org/ogr/drv_vrt.html

Regards,
Robert

>>> "Donald Kerr"  03/02/12 11:54 AM >>>
Hi List,

I have a point layer set up for WFS requests that connects to a Microsoft
Access database with two tables structured as follows:

Table: GEOMETRY_COLUMNS

Fields:
F_TABLE_NAME
F_GEOMETRY_COLUMN
GEOMETRY_TYPE
SRID

Values:
MyData
geom
POINT
27700

Table: MyData (Contains about 8,000 records)

Fields:
UniqueID
NameStr
Geom
XMIN
YMIN
XMAX
YMAX

Values:
1
Smiths
POINT(265377 665516)
265377
665516
265377
665516

In my layer, I have:

CONNECTIONTYPE OGR
CONNECTION "ODBC:overlays,FullOIs(geom)"
DATA "FullOIs"

A GetFeature request works well and quite speedily so I think that the the
query is run against the database is using the XMIN, YMIN, XMAX and YMAX
columns to restrict the data returned. During debugging, the following query
appeared in the response as recorded by Firebug in Firefox but I can't
replicate that (if anyone can tell me how to confirm that the BBox is being
used as follows that would be appreciated):

SELECT * FROM MyData WHERE XMAX > 176077.07205091 AND XMIN < 340988.92794909
AND YMAX > 583498.46091313 AND YMIN < 748311.53908687

The problem that I have relates to the GEOMETRY_COLUMNS table which I know
is not being used.

If I remove the geometry column from the connection string, i.e. change
CONNECTION "ODBC:overlays,FullOIs(geom)" to CONNECTION
"ODBC:overlays,FullOIs" - remove the word "(geom), it does not find the
geometry column from the GEOMETRY_COLUMNS table. It would appear that this
table is being completely ignored.

I have tried all sorts of combinations and field names and have also created
a SPATIAL_REF_SYS table with values that I use in a working PostGIS database
to no avail.

I previously used an OVF file but I think that may be limited to point
layers whereas, when I get this working as I want to, I would like to extend
this type of connection to line and polygon layers.

Can anyone advise please?

Many thanks.

Regards,

Donald

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system.

This message has been scanned for Malware and Viruses by Websense Hosted Security.
www.websense.com


More information about the mapserver-users mailing list