If you want to keep the original column names in the underlying table, but have issues with mapserver being unable to use these for whatever reason, you can implement a database view on the table with renamed columns as necessary for Mapserver to access them.
Works well & is one example of the advantages of managing your spatial data inside a database. HTH, Brent Wood --- On Sun, 2/8/09, thomas bonfort <[email protected]> wrote: > From: thomas bonfort <[email protected]> > Subject: Re: [mapserver-users] Map File for Open Street Map symbology > To: "Lars Lingner" <[email protected]> > Cc: [email protected] > Date: Sunday, February 8, 2009, 10:29 AM > On Sat, Feb 7, 2009 at 12:57, Lars Lingner > <[email protected]> wrote: > > Rahkonen Jukka schrieb: > >> Lars Lingner wrote: > >> > >> > >> > >>> I see that you also had to rename the column > "natural". As this is an > >>> reserved name by postgres, is there an way to > use such a name in an > >>> mapserver expression? > >>> Although renaming the column did work for me I > just want to know how to > >>> quote correctly. > I don't think you can if you need to do a string > comparison in your > sql where clause, as there's no way in mapserver to > escape the ' or " > characters > > > > > > DATA "way from (select way,osm_id ,name from > planet_osm_polygon where > > 'natural'='water' ) as foo using > unique osm_id using srid=900913" > > > > was not working... but I just tried it again, just to > make sure I don't > > say anything wrong... and its working. *doh* > > it's a valid sql clause, but useless for mapserver as > it won't return > any data (as the string 'water' and > 'natural' are never equal) > > regards, > thomas > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
