I aggree with Michaël. This is a non-trivial task. I would propose that if it is ever attempted, it should be implemented as a special layer type, as with database layers. This "ShapeFileLayer" type could also be the perfect place to implement loading the subset of the shapefile that is within the current view (like uDig). Since it would be a quasi-database layer, attribute editing would probably need a different UI from the current View/Edit Attributes, where field constraints could be implemented without limiting the rest of OJ's layers.
Larry 2010/5/17 Michaël Michaud <michael.mich...@free.fr> > Hi, > > I did a bit of work in the past to add new datatypes in OpenJUMP like > char(fixedlength) or decimal, but I abandonned this work. > There are several reasons for that : > - my needs changed :-( > - adding new datatypes was really a pain, because "AttributeType" class > is used everywhere in the code (many if/then/else) , and it is more and > more difficult to add new data types without breaking the core code or > some plugins > - thinking about the problem made me wonder if new types are really needed > > Now, I think that existing datatypes are almost enough (boolean datatype > would be the best candidate for an add) > and that OpenJUMP is missing a way to add "constraints" that could be > seen as wrappers rather than new datatypes > Constraints can be much more than a length (ex a regular expression to > store URL, zip codes..., a min and a max for numeric datatypes...). > Maybe it woud be easier to add this kind of information at the schema > level (extending the schema class) than adding new attribute types. > But even this is a big change and needs important resources from my > point of view. > > My two cents, > > Michaël > > luca marletta a écrit : > > Hi, I also would need this feature maybe for same kind of application. > > to better explain it's the feature that, like in QGIS if i remember > > well, when you define a new layer it asks to save it as shape defining > > from the early beginning the dbf fields with every type and length > > (for instance "name" String 20 chars). > > In QGIS is assumed that you work in shape file or other format from > > the beginning, but in OJ you works on "levels" that, just when you > > save they, are transformed into shp and just on file, the levels will > > still be just a OJ level. > > > > So is not easy to implement this feature and the main problem is not > > the code but to rethink a way to define it. > > > > for me it could be quite interesting a thread on this topic and if it > > will be clear a way to do it I can try. > > > > luca > > > > > > luca marletta > > www.beopen.it > > > > > > > > On Mon, May 17, 2010 at 6:52 PM, Stefan Steiniger <sst...@geo.uzh.ch> > wrote: > > > >> Hei, > >> > >> I would say "no" - but I am also not sure if I understand correctly what > >> you mean by "length of a integer field". > >> > >> stefan > >> > >> Totenfeier wrote: > >> > >>> Hi all! > >>> i'm a fellow worker of Politecnico di Milano and i'm working on a > >>> project that need to manage field length of a shapefile. > >>> Notably i have to set different dimension of integer fields in a dbf > file. > >>> I'm wondering if this is possible with Openjump now or somebody is > >>> working on that. > >>> Thanks! > >>> Michele > >>> ---- > >>> Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e > >>> SMTP autenticato? GRATIS solo con Email.it > >>> <http://www.email.it/cgi-bin/start?sid=3> > >>> > >>> Sponsor: > >>> Conto Arancio ti regala 50 Euro da spendere su Media World on line. > Cosa > >>> aspetti, aprilo subito! > >>> Clicca qui < > http://adv.email.it/cgi-bin/foclick.cgi?mid=10036&d=20100517> > >>> > >>> > >>> > ------------------------------------------------------------------------ > >>> > >>> > ------------------------------------------------------------------------------ > >>> > >>> > >>> > >>> > ------------------------------------------------------------------------ > >>> > >>> _______________________________________________ > >>> Jump-pilot-devel mailing list > >>> Jump-pilot-devel@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>> > >> > ------------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Jump-pilot-devel mailing list > >> Jump-pilot-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >> > >> > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >
------------------------------------------------------------------------------
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel