[MAPSERVER-DEV] How to generate 3d image like GPS device?

Tamas Szekeres szekerest at gmail.com
Sat Mar 8 14:48:59 EST 2008


Thomas,

Yes I think it would be reasonable to apply a per-pixel transformation
on the image itself. However (as I can see in my navigation system)
the labels are not projected only rotated at the top of the map.
The transformation you use doesn't seem to follow the surface of the
earth I wonder if we could reproject/warp the image on the surface
like using gdal for example.


Just my 2cts

Best regards,

Tamas



2008/3/8, thomas bonfort <thomas.bonfort at gmail.com>:
> oops... just (re?)read the thread and see that I implemented exactly
>  what you where proposing, sorry for the paternity of that ;) although
>  I think that if we do go along this line, it might be more flexible to
>  use a real projection matrix rather than limiting ourselves to this
>  kind of scaling.
>
>  rotation wrt to north facing upwards will probably be a bit more
>  problematic, as the letters of labels are oriented to be readable when
>  the map is oriented to the north and could possibly be upside down if
>  requesting a rotated view, but I think it may be overcome with a
>  specialized msTransformShapeXXX function that could account for the
>  rotational part of the requested view. we'd still have to investigate
>  how to treat the extent of the requested view wrt clipping of shapes
>  though.
>
>  I'll add myself to the soc wiki page on this subject
>
>  regards,
>
> thomas
>
>
>  >  On Wed, Feb 27, 2008 at 5:27 PM, Brent Fraser <bfraser at geoanalytic.com> wrote:
>  >  > 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" <woodbri at SWOODBRIDGE.COM>
>  >  >  To: <MAPSERVER-DEV at LISTS.UMN.EDU>
>  >  >
>  >  > 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 <woodbri at swoodbridge.com>:
>  >  >  > >> 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
>  >  >
>  >
>
> _______________________________________________
>  mapserver-dev mailing list
>  mapserver-dev at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


More information about the mapserver-dev mailing list