AW: [Mapserver-users] multiple request in one layer
Vincent Schut
schut at sarvision.com
Thu Mar 27 04:20:20 PST 2003
Thilo,
please always reply to all when using a mailinglist; others might have more
knowledge and join the discussion, or learn from it...
You are right that the result should be one column, the one you mention.
I don't know if it is possible to do this directly from mapserver. You'd have
to ask a mapserver&sql specialist on this list, I'm afraid... Or try to find
it out yourself by searching the mailing list, google, experiment... And then
of course post your solution on the list :-)
I'm sorry I can't help you further, but now you at least know where and what
the problem is.
Or course a workaround is to just create this table outside mapserver. But if
you have dynamic data this might not be a good solution. Maybe a view is an
option? But this is outside of my sql knowledge.
Why not using 2 layers, actually? Eventually you can group them into the same
group and have them displayed in the legend as one group instead of 2 layers,
if that's the bottleneck...
Regards,
Vincent Schut.
On Thursday 27 March 2003 12:33, you wrote:
> Thanks for your answer, Vincent
>
> > ---Ursprüngliche Nachricht-----
> > I'm afraid you can't do that this way. Not with mapserver, neither with
> > standard SQL (but I'm not an expert, if I'm wrong please correct me...)
>
> okay...i tested my sql-statement in oracle and it works fine.
>
> > Here comes what I think...:
> > Your sql query selects 2 columns from two tables. That means your result
> > will
> > be a 2 column table, and the query assumes both STREETS and PATH have the
> > columns S.GEOM and P.GEOM.
>
> i guess the result should be 1 column [geom] with all results from
> Streets ( shortcut s) and Path (shortcut p)
>
> > What you need to do is: first create a (temporary?)
> > table in which you insert the column s.geom (streets) and p.geom (path),
> > both
> > into the same column in your new table. Something like:
> > INSERT INTO new_table (geom) SELECT geom FROM streets;
> > INSERT INTO new_table (geom) SELECT geom FROM path;
> > And then you can use this new table in your mapfile:
> > DATA "geom FROM new_table"
>
> ...and what function or feature i have to use in mapserver for this
> task?
>
>
> Thanks a lot
>
> Thilo
--
______________________________________
Vincent Schut (schut at sarvision.com)
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com
More information about the MapServer-users
mailing list