Hello folks,
 
    Is it possible to join a column in a shapefile's dbf to a column in an ODBC stored procedure via OGR? I'm not too concerned about performance, so this is the idea for the mapfile syntax:
 
LAYER
  NAME StatesProvinces
  CONNECTIONTYPE OGR
  CONNECTION Nearctic.shp
  DATA "SELECT NAME, SpiderData.StateProvince FROM Nearctic LEFT JOIN
            '<OGRVRTDataSource>
            <OGRVRTLayer name="SpiderData">
            <SrcDataSource>ODBC:xxxx/[EMAIL PROTECTED]</SrcDataSource>
            <SrcSQL>EXEC LocalityList "%SpeciesCode%"</SrcSQL>
            </OGRVRTLayer>
            </OGRVRTDataSource>'.SpiderData ON NAME = SpiderData.StateProvince"
  STATUS DEFAULT
  TYPE POLYGON
  CLASSITEM "NAME"
 
  CLASS
    NAME "Yukon Territory"
    _expression_ "Yukon Territory"
    COLOR 210 210 210
  END
 
  CLASS
    NAME "Northwest Territories"
    _expression_ "Northwest Territories"
    COLOR 205 92 92
  END
 
etc.
 
What I ultimately want to do is shade a selection of whole States and Provinces (in a shapefile) a colour different from those not chosen as a result of a JOIN to an ODBC stored procedure. The single and double quotes in the DATA rows above choke on one another, so this obviously doesn't work. Anyone have any ideas?
 
David P. Shorthouse
------------------------------------------------------
Department of Biological Sciences
CW-403, Biological Sciences Centre
University of Alberta
Edmonton, AB   T6G 2E9
Phone: 1-780-492-3080
mailto:[EMAIL PROTECTED]
http://canadianarachnology.webhop.net
http://arachnidforum.webhop.net
------------------------------------------------------
 

Reply via email to