[GRASS5] vector cats files

Eric G. Miller egm2 at jps.net
Sat Jul 13 04:42:02 EDT 2002


On Fri, Jul 12, 2002 at 04:44:59PM -0600, Roger Miller wrote:
> On Friday 12 July 2002 14:39, Eric G. Miller wrote:
> 
> >
> > AFAIK, vector cats don't support ranges.  Range support is primarily for
> > floating point rasters where exact quantities are possibly
> > unrepresentable (fractions like .1).  
> 
> Thanks Eric.  The programmer's manual says that vector cats files are 
> identical to raster cats files.  This looks like something that needs to be 
> revised.

It does use the same functions, data structures and file format.  But
vector cats are always indexed with integers and ranges are only used
for floating point "indices".  The G_set_cat() function is essentially
the same as calling the G_set_c_raster_cat() function (which works on
single integer index/label pairs)...

> > The easy way is to use symlinks to change the "active" category label.
> > I don't recall whether v.support is necessary (I thought it wasn't)...
> > We are just talking about the dig_cats file, and not the dig_att?
> 
> We were talking about dig_cats files.  I tested and found that it wasn't 
> necessary to run v.support after changing the dig_cats file.  Good thing, as 
> once I did get one of the larger files imported it took about 20 minutes to 
> run it through v.support just once.

Right.  That's what I thought.  v.support doesn't care about dig_cats,
it uses the dig_att file for placing the category number to the
specified type when building topology.  What label (or tuple when
external DBMS's are used) is only found on label (tuple) lookups.

> I have revised m.in.e00 so that it can be used to import larger e00 files.  
> Once I'm convinced that I'm done I'll commit the changes.  If anyone really 
> needs a version now that will read big e00 files (50,000+ polygons with 340+ 
> attribute items each) let me know.

I'd say, it might be worthwhile to look at adding some functions for
bulk loading to libes/gis/cats.c.  The only real issue is how such
functions should behave when duplicate category indices with different
labels are encountered (maybe generate a duplicates list?).  This
issue should go away for vectors in 5.1 (since dig_cats is not used),
but such bulk functions still might have utility for raster imports??

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list