[Geomoose-users] PGDB mdb query.php
Reynolds, Michael J. (DOT)
Mike.Reynolds at state.mn.us
Sun Jul 11 17:39:04 EDT 2010
Wondering if any users can confirm or deny that a search tool using query.php and a map file with a data connection to a personal geodatabase (.mdb) will work.
I'm using GeoMoose 2.0.
I'm struggling to set this search tool up in my environment.
The layer's map file settings are:
NAME 'Cabinets'
CONNECTIONTYPE ogr
CONNECTION '\\ad\metro\roseville\data\traffic\gis\mte_systems.mdb'
DATA "SELECT OBJECTID, SHAPE, SYSTEM_ID, CABINET_ID, LAYOUT_URL, CABINET_TYPE, CABINET_VOLTS, ROADWAY_NAME, LOCATION, QUAD, METER_VENDOR, METER_ACCOUNT, METER_ADDRESS, METER_NBR, PREMISE_NBR, OWNER_CODE, SHARED_POWER_CSV, format(DATE_LOGGED,'mm/dd/yyyy') AS CDATE_LOGGED, format(DATE_INSTALLED, 'mm/dd/yyyy') AS CDATE_INSTALLED, format(DATE_TURNON, 'mm/dd/yyyy') AS CDATE_TURNON, format(DATE_RETIRED, 'mm/dd/yyyy') AS CDATE_RETIRED, GEOMSRC_CODE FROM LIGHT_CABINETS WHERE (DATE_TURNON < date() OR DATE_TURNON Is NULL) AND (DATE_RETIRED > date() OR DATE_RETIRED Is NULL)"
The mapfile <map-source> entry is:
<map-source name="traffic_lighting_systems_pgdb" type="mapserver" reference="false">
<file>/ms4w/apps/metrogis/maps/mapfiles_metro/assets/traffic_lighting_systems_pgdb.map</file>
<layer name="all"/>
<layer name="Poles"/>
<layer name="Cabinets"/>
<layer name="Utilities"/>
<layer name="Junctions"/>
<layer name="PowerSources"/>
</map-source>
Note that this layer
The <Service> is:
<service name="search_lighting_cabinet">
<url>php/query.php</url>
<step type="input">
<input type="hidden" name="highlight" value="true"/>
<input type="hidden" name="mode" value="search"/>
<input type="hidden" name="layer0" value="traffic_lighting_systems_pgdb/Cabinets"/>
<input type="hidden" name="template0" value="query"/>
<input type="hidden" name="fieldname0" value="CABINET_ID"/>
<input type="select" name="fieldname0" title="Search By:">
<option value="CABINET_ID">Cabinet ID</option>
<option value="SYSTEM_ID">System ID</option>
</input>
<input type="select" name="comparitor0" title="That: ">
<option value="like-icase">Contains</option>
<option value="right-like-icase">Begins With</option>
<option value="eq-str">Matches Exactly</option>
</input>
<input type="user" name="value0" title=""/>
</step>
</service>
This layer renders great from the catalog and identify is working fine. The long layer select sql works great. When I use the search service above from a menu tool, the information panel fills with the search form and I can enter search criteria. When I hit the search button I get the following error:
Warning: [MapServer Error]: msShapefileOpen(): (/ms4w/apps/metrogis/maps/mapfiles_metro/assets/SELECT OBJECTID, SHAPE, SYSTEM_ID, CABINET_ID, LAYOUT_URL, CABINET_TYPE, CABINET_VOLTS, ROADWAY_NAME, LOCATION, QUAD, METER_VENDOR, METER_ACCOUNT, METER_ADDRESS, METER_NBR, PREMISE_NBR, OWNER_CODE, SHARED_POWER_CSV, format(DATE_LOGGED,'mm/dd/yyyy') AS CDATE_LOGGED, format(DATE_INSTALLED, 'mm/dd/yyyy') AS CDATE_INSTALLED, format(DATE_TURNON, 'mm/dd/yyyy') AS CDATE_TURNON, format(DATE_RETIRED, 'mm/dd/yyyy') AS CDATE_RETIRED, GEOMSRC_CODE FROM LIGHT_CABINETS WHERE (DATE_TURNON < date() OR DATE_TURNON Is NULL) AND (DATE_RETIRED > date() OR DATE_RETIRED Is NULL)) in C:\ms4w\apps\metrogis\htdocs\php\query.php on line 318
I find it odd that "/ms4w/apps/metrogis/maps/mapfiles_metro/assets/" is prefixed to the select or data value. Shouldn't the database location and name be somewhere in there?
I have tried keeping the data value a simple table/feature class name to rule that out. Still an error.
I've tried navigating the query.php (geomoose 2.0) but I can't seem to make heads or tails of it.
More information about the Geomoose-users
mailing list