[GRASS-dev] projection of vectors accros wrapping map boundaries

Patrice Dumas pertusus at free.fr
Thu Dec 29 06:44:01 EST 2011


Hello,

With yesterday svn trunk version.

I have come accross something that I think is a bug, but before opening a
ticket, I'd have preferred to have a confirmation that it is indeed a bug
and not a feature, and also I tried to find a mention of this issue on
the web, but couldn't find one which surprises me a bit.

When I project a vector from a location thet overlaps with a wrapping 
boundary of a map, the vector is split in two.  For example, I have a 
longitude latitude location covering the whole world, that wraps somewhere
in the Pacific (that is points on the eastern boundary are also on the
western boundary).  When I project a vector constructed by doing a grid on a
Lambert equal area location centered somewhere in the Pacific, the grid cells
(that are, in that case, no more rectangular) that fall on the boundary
are cut in two, with warnings like:

WARNING: Number of centroids exceeds number of areas: 900 > 847
WARNING: Number of incorrect boundaries: 507
WARNING: Number of centroids outside area: 53

My first guess is that it is related with the recent change in topography 
of the vectors (not that I understand what is going on...).

grass 6.4 behaves much better (although I also remember seeing an issue
with wrapping of vectors, this looked like a subtle issue).

Should I open a ticket with a reproducer?


Note: I have had these kind of error messages in another case with 
grass 7, although there were no error messages with grass 6.4, but I 
think that in this case, the error messages were legitimate, and the 
output was as correct as it could be.  This happened when I projected 
vectors (corresponding to countries) from a world longitude latitude 
location to a smaller location (on a Lambert equal area projection), and 
the vectors were not completly contained in the smaller location, or even 
had their centroid outside of the smaller location they were projected in.  

-- 
Pat


More information about the grass-dev mailing list