Tom H | 14 Aug 2003 03:24
Picon

RE: orthographic projection with proj4 and mapserver.


> > 
> > Proper graphical clipping is a tough problem.  It looks like 
> the specific
> > problem in this case is with the polygons that are half visible and half
> > invisible.  The invisible vertices appear to be all substituted 
> with (0,0)
> > coordinates, though I thought that the PROJ.4 library used -infinity as
> > its 'invalid coordinate' value.  To plot such a polygon mathematically
> > correctly, you'd need to cut it in two (or more) pieces along 
> the line of
> > the horizon of the projection, which would be a smooth curve in 
> this case.
> > Other short-cut cheats are also possible.
> 
> Indeed, not a trivial problem.  In all the map graphics that I use in
> the PROJ.4 manuals, only vector plotting was performed.  The clipping
> problem for vectors is much simpler than polygons---that's why I didn't
> fill the continental outlines.  ;-)
> 
> BTW, libproj4 forward routine returns HUGE_VAL when it cannot project a
> point.  Program [l]proj returns an "*".  The HUGE_VAL method has been
> in PROJ.4 use for a *long* time so I suspect that the problem lay in
> the calling software.
> 
> 

If HUGE_VAL was returned against the 0,0 would the image have had shards out
to infinity rather than to 0,0?

(Continue reading)

Gerald I. Evenden | 14 Aug 2003 04:06
Picon

RE: orthographic projection with proj4 and mapserver.

On Wed, 2003-08-13 at 21:24, Tom H wrote:
	...
> > BTW, libproj4 forward routine returns HUGE_VAL when it cannot project a
> > point.  Program [l]proj returns an "*".  The HUGE_VAL method has been
> > in PROJ.4 use for a *long* time so I suspect that the problem lay in
> > the calling software.
> > 
> > 
> 
> If HUGE_VAL was returned against the 0,0 would the image have had shards out
> to infinity rather than to 0,0?
> 

I have no idea where the 0,0 values comes from.  In theory, libproj
procedures should produce HUGE_VAL,HUGE_VAL for invisible or non-
projectable points.  It is up to the calling program to make sense
of this condition---making 0,0 does no make sense.

The only condition that I will address is that libproj is producing
0,0 for invisible points.  So far, no evidence has been given to
demonstrate libproj is producing 0,0.  A quick check with lproj
gives *,*s for invisible points so presumably the library is working.
The illustrations I made many years ago indicated that *,* was
being correctly produced as the graphic routines depended upon
this return for invisible points.

To demonstrate that libproj is in error I need values for the
pj_fwd input and its return values.  A graphic is not considered
evidence of failure because of too many operations external to
libproj library calls that can be in error.
(Continue reading)


Gmane