Stephen,
A cheap way to approximate the projective transformation
might be to apply a x-axis scaling with the scaling factor
varying linearly along the y-axis, basically squishing it at
the top. In other words, render the map image, then
resample each line of pixels (with a resampling value of say
10% for the top line of pixels to 100% of the bottom line),
then clip and add other stuff (sky etc). Then there's the
problem of heading-up instead of north-up. The map file
does have a rotation setting, which might help.
In the end, I think a more rigorous projective
transformation would give better results (preserving line
widths, etc). And there may be so many "special" features
that it would make more sense to have a separate "NavServer"
(with its own map file/API objects) instead of
warping/adding-noise to the more traditional MapServer to do
the task. But as Steve Lime say, it would be cool to see in
Mapserver. And 3d is the future...
Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta
----- Original Message -----
From: "Stephen Woodbridge" <
[hidden email]>
To: <
[hidden email]>
Sent: Wednesday, February 27, 2008 7:57 AM
Subject: Re: [MAPSERVER-DEV] How to generate 3d image like
GPS device?
> Tamas Szekeres wrote:
> > 2008/2/27, Stephen Woodbridge <
[hidden email]>:
> >> Hi all,
> >>
> >> Sorry for the cross posting. I need to find out how to
make mapserver
> >> generate map images that appear like the 3D mode of
GPS devices. See
> >> attached image.
> >>
> >> Has anyone done this? How?
> >> Any thoughts on how to to hack the code to do this?
> >>
> >
> > Stephen,
> >
> > I think we should add a special renderer for doing such
things, and it
> > would require to do some additional coordinate
transformations for the
> > shapes and additional special effects like drawing the
horizon and
> > use gradient fade out for distant areas etc. I don't
think it would be
> > a scope of instant hack in the code.
>
> Tamas,
>
> Thank you for your response.
>
> Yes, you may be right. I think there are a variety of
levels of
> implementation. Initially just getting mapserver to render
a tilted view
> without all the special effects would be a start. I was
thinking of the
> possibility of hacking the projection matrix to achieve
this, although
> I'm not sure how or if that is possible.
>
> The image also has an implied point of viewer that is used
to orient
> "up" for the image.
>
> > I wonder which use case would make this option
reasonable though. Are
> > you planning to utilize a permanent client-server
connection with the
> > mobile application, or compile mapserver to your mobile
platform?
>
> Mobile devices can be Windows/Linux laptops along with
those normally
> thought of as mobile.
>
> Best regards,
> -Steve W
>
> > Best regards,
> >
> > Tamas