On Tue, Apr 19, 2011 at 3:21 PM, Gis Mage <gism...@gmail.com> wrote: > Hello list! > > I'm serving a PostGIS table, containing attributes as codes like field001, > field002 etc... > I've got another non spatial table, containing aliases for fields - just a > table with two columns - code, alias. > > I wonder, how can I serve aliases instead (or additional to) of fields in > requests like getfeatureinfo and wfs getfeature? > I believe customization of responses is done with ftl templates, but I don't > know how to add values from another table of the store inside a template. > Forming views with aliases as field names in my database is not convenient, > because the client app is going to make wfs transactions and edit the data, > wich is impossible with views I guess. > > Can anyone help me out with that?
What you ask is not possible at the moment. I would love to be able to set aliases on the various fields and still be able to use WFS-T, it's been on my wish list for quite some time, with some databases, like for example Oracle, there is simply no way to avoid very ugly names on fields in the db. That said, doing what you ask requires setting up a new wrapping data store that can do the field name translation forwards (when serving data) and backwards (to turn the filters and field name requests back in their native names before hitting the actual data source). And then configuration and GUI to allow changing the names, and test a lot to make sure it's not breaking anything. Doable, but quite a sizeable chunk of work too. I'm waiting for sponsoring to show up to do it, it's too big to fit in spare time coding (done in spare time it would eat up all weekends for a few months). Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users