Question:

I need to import some DXF files to GRASS.
Where to store the files and how to perform?

Answer:

File storage:
When using the modules with command line, the files are read from the current directory. When using v.in.dxf interactively, you have to store the DXF-files in your location- directory. Change to this directory with
cd $LOCATION

Performing the import:
With linear themes, the v.in.dxf3d does an excellent job; with polygon themes I have problems in reconstructing the proper polygons via v.digit.
I can first of all "re-type" arcs from line to area; however, when I pass to assigning labels, the process succeeds only if the polygon is composed by 1 or 2 arcs (otherwise v.digit says it is not able to define a polygon).
At any rate, reconstructing the polygons manually can become very time consuming. I have re-checked the documentation on v.in.dxf and v.cadlabel, and I see that there is no mentioning of polygon themes...

Question:So: is it possible to reconstruct automatically a polygon from a DXF polyline?
Maybe with polylines defining the arcs and text labels positioned inside the polygons?

Answer:

Try the grass program v.line2area after importing the dxf polygons. This usually creates correct topology.
Then follow with v.alabel which automatically labels your areas incrementally. Then add your attribute labels with v.support.
This usually works 100 %.

June 1999


Go back to GRASS FAQ...