Skip to content

Strange lines when projecting a world map

4 messages · Francesco Carotenuto, Roger Bivand

#
On Thu, 5 Dec 2013, Francesco Carotenuto wrote:

            
The underlying question is what you want to do with the objects after 
projection. The problem in your example is that some polygons/lines cross 
-180+66 degrees, so get reflected back across. A possible solution is to 
clip the polygons before projection at -180+66 degrees +/- a small number, 
but before looking at this in more detail, I need to know what the 
projected object is intended for. When +lon_0=0, there is no such effect, 
as this data set is clipped at -180 already.

Roger

  
    
#
On Thu, 5 Dec 2013, Francesco Carotenuto wrote:

            
This doesn't help much - do you mean that the grid is of prediction 
locations? Are the polygons used for anything other than visualization? If 
you change the visualization projection (shifting the meridian (+lon_0) 
for worldwide distributions) repeatedly, you will have to clip to suit. If 
visualization, does it make sense to modify the meridian (the reader may 
see the shifts as confusing)?

You are trying to deal with multiple somethings that you are interpolating 
(to a grid?) and displaying in possibly different windows possibly 
depending on the extent of the prediction grid. Your workflow isn't 
obvious.

You haven't explained why you need the projection so far (other than 
aesthetics, maybe?). You may be able to interpolate on the sphere, so 
unless the target grid cells must be of fixed area - and possibly not even 
then, you don't need to make life complicated. There are problems in 
creating global visualizations in any case, as the lines/polygons need 
clipping at +/- 180 degrees from the meridian.

Roger