OGR DBF JOINS, Numeric Values now String

Christopher R. Thorne christhorne at SYMPATICO.CA
Thu Sep 15 11:15:50 EDT 2005


Hello again,
I got a OGR Join to work between a Shapefile and DBF. The DBF has much 
fewer records than what is found in the shapefile. The problem that I am 
having is that the CLASSITEM I wish to classify on the JOINED attribute 
which in the dbf is a numeric value with two decimal points. eg. 0.00

All Shapefile features that DO NOT have a successful JOIN contain a 
value 'blank'. ie. EXPRESSION "" This of course is not valid for numeric 
item 'blank' should be 0.00

Which leads into my next observation numerical values that are joined 
seem to be considered string values vs. numerical.

For example

1) DOES NOT WORK
EXPRESSION "10"
DOES WORK
EXPRESSION "10.00" does

1) DOES NOT WORK
EXPRESSION ([test2.FARGAP] eq 20.00)

2) DOES WORK
EXPRESSION ('[test2.FARGAP]' eq '20.00')

Is this a limitation of a DBF OGR JOIN ie. importing all values as 
string, or is there something wrong with my DBF (ie. not created 
properly, defective), or am I missing something in my JOIN CONNECTION?

CONNECTIONTYPE OGR
DATA "SELECT test2.FARGAP FROM MN_BBL LEFT JOIN 
'D:/maps/data/archived/nyc/nyc/dbf_joins/test2.dbf'.test2 ON 
MN_BBL.BBL=test2.BBL"
CONNECTION "D:/maps/data/archived/nyc/nyc/dbf_joins/MN_BBL.shp"
CLASSITEM "test2.FARGAP"

Thanks again,
Chris

-- 
Christopher R. Thorne, GIS Specialist
-
christhorne at sympatico.ca
Tel:(613)523-6593, Ottawa ON Canada
-----------------------------



More information about the mapserver-users mailing list