Fwd: Re: [GRASS-dev] VTK export for lat-long locations

Soeren Gebbert soerengebbert at gmx.de
Wed Mar 7 17:41:54 EST 2007


Am Mittwoch, 7. März 2007 06:22 schrieb Glynn Clements:
> "Sören Gebbert" wrote:
> > please dont use the vtk export modules with lat/lon projections.
> > The vtk export modules in grass are not
> > usable with lat/lon projections right now.
> > I think i should put this info to the html docs.
> >
> > The lat/lon coordiantes are used to define the coordinates for each
> > point. VTK interpret these coordinates as planimetric and not as lat/lon.
> > This is not that bad for x,y coordinates, but for the height (z
> > coordinate). Because if x and y lat/lon coordiantes are of type
> > [54.001/34.002] and the height varies from 0m - 500m you will get a
> > senseless result.
> >
> > I still dont know exactly how to implement a meaningful
> > lat/lon ->planimetric coordinate transformation to get rid
> > fo this behaviour.
> >
> > Any suggestions are welcome.
>
> In increasing order of complexity and accuracy:
>
> 1. Convert the lat/lon coordinates to radians then multiply by the
> radius of the earth (in whatever units the z values use).
>
> E.g. if the Z values are in metres, using the radius of 6378137m for
> the WGS ellipsoid gives a scale factor of pi/180*6378137 ~ 111320
>
> [I've noticed Hamish' comment, which essentially suggests the inverse,
> i.e. scale the Z values by 1/111320 = 9e-6, so that everything is in
> degrees.]
>
> For a whole-earth map, this should be adequate; you will still get
> horizontal stretching as you move towards the poles, but no more so
> than is inherent with lat/lon.
>
> 2. As above, but scale the y coordinates by 111320 and the x
> coordinates by 111320*cos(lat), where lat is the mean latitude of your
> region. The main issue here is that, if the range of latitudes is
> significant, the choice of centre for the x scaling will make a
> difference to the shape of the projected data.
>
> 3. Pick an "appropriate" geographic projection and transform the
> coordinates into that projection. The choice of projection needs to be
> done manually, based upon the size, shape and location of your region,
> and the relative importance of various properties (equidistant,
> equal-area, conformal, etc).

Many thanks for this suggestions.
I think i will implement the first and second approach.
The third approach sounds to complex to be implemented 
in the vtk export modules. Maybe it will be easier for the user to reproject 
his data in a metric projection.

Best regards
Soeren





More information about the grass-dev mailing list