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

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

On Thu, Dec 29, 2011 at 12:44 PM, Patrice Dumas <pertusus@free.fr> wrote:

Hello,

With yesterday svn trunk version.

...

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

...

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?

Yes, for both 6.4 and 7 cases would be ideal. That increases tremendously
the motivation to try and fix it :slight_smile:

Concerning bug or a feature: my position is: if the user does not understand
what's going on it is a bug (which could be just bad communication about
the feature...). So let's catch and improve such cases.

Markus

On Thu, Dec 29, 2011 at 05:52:16PM +0100, Markus Neteler wrote:

Yes, for both 6.4 and 7 cases would be ideal. That increases tremendously
the motivation to try and fix it :slight_smile:

For 7, I have filled
http://trac.osgeo.org/grass/ticket/1527

For 6.4, I don't remember exactly the issue, and I don't have a simple
reproducer, nor a test platform, so I am not able to report it for now.

--
Pat