[Gvsig_english] Automatic allocation of color attributes to shape file vector

Francisco José Peñarrubia fjp at scolab.es
Mon Sep 28 19:00:39 CEST 2009


Salut, Sebastien.

I think one way can be to inherit from IndexedShpDriver your own class, 
and implement the interface WithDefaultLegend.
Also, override the method getName() and return something like "my shp 
driver with legends" or whatever.

 Pay attention, your driver must be compiled like others (dgn, shp, dxf, 
etc) and copied to gvSIG/extensiones/com.iver.cit.gvsig/drivers.
This way, your users can choose to add one .shp using "gvSIG shp driver" 
(original shp driver) or yours.

I haven't try it, but it may work.

Just one important note: This method can be ok for 1.1.2 release or 1.9. 
If you are developing for 2.0 release, is totally different.

Good luck!!

Fran Peñarrubia
www.scolab.es

Chailan, Sebastien escribió:
>
> Dear all,
>
> I'm interested on the import functionnality of shape files.
> Color attributes are not embedded in the shape format and after the 
> import process, the application allocates a random color attributes to 
> the vectors created.
>
> My shape files contains the semantic attributs (for exemple the name 
> of my business classes carries the semantic type).
> Would it be possible to attribute graphical attributs to a vector 
> automatically according the semantic type during the import process?
>
> How could I develop this part of source within gvSIG? Witch part of 
> source I need to modify to make it?
>
> thank you all.
>  
> Sébastien.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>   



More information about the Gvsig_internacional mailing list