[mapserver-users] Map File for Open Street Map symbology

pcreso at pcreso.com pcreso at pcreso.com
Sat Feb 7 19:32:06 EST 2009


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 <thomas.bonfort at gmail.com> wrote:

> From: thomas bonfort <thomas.bonfort at gmail.com>
> Subject: Re: [mapserver-users] Map File for Open Street Map symbology
> To: "Lars Lingner" <ml at lingner.eu>
> Cc: mapserver-users at lists.osgeo.org
> Date: Sunday, February 8, 2009, 10:29 AM
> On Sat, Feb 7, 2009 at 12:57, Lars Lingner
> <ml at lingner.eu> 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
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list