[GRASS-dev] [GRASS GIS] #3010: PyGRASS fails to write vector map with attributes
GRASS GIS
trac at osgeo.org
Fri Nov 11 00:45:26 PST 2016
#3010: PyGRASS fails to write vector map with attributes
-------------------------+-------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
Type: defect | Status: reopened
Priority: major | Milestone: 7.2.0
Component: PyGRASS | Version: svn-trunk
Resolution: | Keywords: vector, API break, backwards
CPU: | compatibility
Unspecified | Platform: All
-------------------------+-------------------------------------------------
Comment (by huhabla):
IMHO the former implementation was close to be a bug that was fixed in
trunk. For every new feature a new category was created by default, except
a category was already attached to the c_cat field in the geometry. It was
not obvious howto use the same category for different features.
Replying to [comment:3 wenzeslaus]:
> The following from r68603 is breaking backwards compatibility between
7.0 and 7.2:
>
> {{{
> #!diff
> - def write(self, geo_obj, attrs=None, set_cats=True):
> + def write(self, geo_obj, cat=None, attrs=None):
> }}}
>
> The old API should (must) be accommodated. If the old API is so bad,
that it needs to be replaced (rather than extended), then we should have
one transitional version where both APIs work and the old one gives a
warning. I don't have enough information to make the judgment.
>
> Related to that, the error message does not give much information about
what is going on.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3010#comment:5>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list