[GRASS5] v.in,dxf

David D Gray ddgray at armadce.demon.co.uk
Mon May 21 14:28:02 EDT 2001


Michel Wurtz wrote:
> 
> On Fri, 18 May 2001, David D Gray wrote:
> >
> > No, it's substantially similar. But this is the reason why we should
> > separate out the two phases of the import - so that we don't have to
> > duplicate effort. The other advantage is that we can utilise suitable
> > 3rd party libraries to handle their respective formats. Which is the
> > gist of what you are saying I think.
> >
> 
> I'll probably look stupid, but what is the second phase of the import ?
> The process of importing vector is mainly a stream (with some exceptions
> when reading the imput file).  If not, you will need a temporary storage
> format (on disk, because storing everything in core memory will allways
> limit the size of the imput file)
> 

It's only a direct import if the original format supports component
arcs. Many formats record the data as whole polygons, so must be 'split'
to arcs before writing to dig files, so some kind of intermediate is
necessary. 

The first stage is substantially diffferent for different formats. Also
there is often pre-processing or different fields to be read. A Mapinfo
import has to record the Pen and Brush attributes (or will if we are
going down the road of incorporating these). More significantly, you
have to `deconstruct' the topology of a set of components in a shapefile
as a shape can be compound. So stage 1 reads the original format,
pre-processes the data and deals with spatial and data attributes. Stage
two imports the linework as arcs regardless of the original format, from
a common intermediate.

Of course this isn't necessarily a time separation. It's just a logical
or programmatic separation. Some stages may be carried out in parallel
as lines are imported or they may be sequential.

David



More information about the grass-dev mailing list