<div>Hi All,</div><div><br></div><div>We would like to establish an option to get type, with, precision information from the drivers. </div><div>Currently all items are treated as strings and no such information provided by the drivers.</div>
<div><br></div><div>To keep it simple, I would let the drivers manage the item information internally and only a new method would be added to</div><div>the layer vtable:</div><div><br></div><div>itemDefnObj* (*LayerGetItemDefn)(layerObj *layer, int item);</div>
<div><br></div><div>typedef struct {</div><div> int index;</div><div> int type;</div><div> int width;</div><div> int precision;</div><div> } itemDefnObj;</div><div> </div><div>We can use the following concept to implement and utilize the new method: </div>
<div> </div><div>1. Drivers may decide whether to implement this method or not. The default implementation would return NULL.</div><div>2. Clients should call InitItemInfo before calling LayerGetItemDefn.</div><div>2. The drivers may decide whether to store the itemDefnObj structs in layer->iteminfo or continue to use the itemindex array and create itemDefnObj on the fly using the item index (when LayerGetItemDefn is called).</div>
<div>3. In msWFSDescribeFeatureType (mapwfs.c) we would use LayerGetItemDefn to retrieve the item definition and copy the corresponding values to gmlItemObj before reading the metadata values.</div><div>4. MapScript API would be extended with a new method added to layerObj. itemDefnObj *getItemDefn(int i)</div>
<div><br></div><div>Let me know whether this would be reasonable or not.</div><div><br></div><div>Implementation would be provided within the scope of this bug:</div><div><a href="http://trac.osgeo.org/mapserver/ticket/462">http://trac.osgeo.org/mapserver/ticket/462</a></div>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div>