[Gvsig_english] Automatic allocation of color attributes to s hape file vector

Chailan, Sebastien sebastien.chailan at eads.com
Tue Sep 29 10:12:25 CEST 2009


ola José!

thank you for your quick answer.
I'll tell you back if it works.

best regards 

-----Original Message-----
From: gvsig_internacional-bounces at listserv.gva.es
[mailto:gvsig_internacional-bounces at listserv.gva.es] On Behalf Of Francisco
José Peñarrubia
Sent: Monday, September 28, 2009 7:01 PM
To: Users and Developers mailing list
Subject: Re: [Gvsig_english] Automatic allocation of color attributes to
shape file vector

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
>   

_______________________________________________
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