Base class for Shapes?

Bernhard Reiter bernhard at intevation.de
Fri Nov 26 16:29:21 CET 2004


On Thu, Nov 25, 2004 at 10:08:44PM +0100, Bernhard Herzog wrote:
> Jan-Oliver Wagner <jan at intevation.de> writes:

> > I worked out an idea about a Base Shape Class.

> > The idea is that we might want to have Shapes/Shapestores
> > that are kept in memory instead in a file in order
> > have a opportunity to create/modify them with arbitrary
> > algorithms implemented in Thuban(or in its extensions).

I agree that we should separate storage of geographic data 
from the accessing object interface.

So does Shape refer to geographic object or shapefiles (one specific
format) here?


> Writing shapes to a shapefile is orthogonal of memory shape stores.  It
> should be possible to write a function that takes any kind of shapestore
> and writes its contents to a shapefile (or ideally any writable
> shapestore, once we have such a thing in Thuban).

> Your base class has several methods that modify the shape. So, one
> general design issue that we may need to decide is whether shape objects
> are mutable.  I would prefer to keep them immutable.  If they were
> mutable, what would changing a shape mean?  If it were a shape read from
> a shapefile, for instance, would the shapefile automatically be
> modified?


We need a concept of changing the data 
and also of buffering data (when the storage is slow).

Most modifications could be buffered until a commit
to a storage is possible. 
In some situations the modifications can be made in their
own new storage (used as a layer).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041126/308e6212/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)