dxf to polygons

Hi,
I need to import some DXF files to GRASS.

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...

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 ?

I will be grateful for any hints !

                =========================================
                Andrea Giacomelli
                Centre for Advanced Studies, Research and
                Development in Sardinia
                Environment Division

                http://www.crs4.it/~andreag
                =========================================

I'm trying to import a raster file in ascii/text format with lat/long
coordinates into GRASS. The file has the following format:

north: 47.937500000000
south: 24.062500000000
east: -66.479166666667
west: -90.520833333333
rows: 573
cols: 577
785 790 786 783 779 771 768 766 ...

Hi Thomas-

I'm trying to import a raster file in ascii/text format with lat/long
coordinates into GRASS. The file has the following format:

north: 47.937500000000
south: 24.062500000000
east: -66.479166666667
west: -90.520833333333
rows: 573
cols: 577
785 790 786 783 779 771 768 766 ...

I do not know, if it is possible to do the conversion with awk, but what
you might do, is to write a small program, that writes your data to
your sites directory and then do the import with an interpolation... :wink:
Have a look at the following part of my script, which runs at the GRASS-
prompt, doing this "task":

cd $HOME/grass_data/$LOCATION/$MAPSET/site_lists/
YOURPROGRAM YOURFILE >! $NAME
s.surf.idw input=$NAME output=$NAME
g.remove sites=$NAME

where YOURPROGRAM should do a conversation from YOURFILE to a file that
has the format

lon|lat|val

Do not forget the "|"!!!
(In my example YOURPROGRAM writes to stdout)

Regards,

  Stephan

P.S.: It might be not very nice, but it works ...

--
------------------------------------------------------------------------

Stephan Eickschen Tel. : +49 (0)251 83-34704
Westfaelische Wilhelms-Universitaet Fax. : +49 (0)251 83-36100
Institute for Geophysics
Research Unit of Physical Glaciology email: eicksch@uni-muenster.de
Corrensstrasse 24
48149 Muenster
Germany

------------------------------------------------------------------------

Stephan,

Thanks so much for your help! I'll certainly give your suggestion a try.

Cheers!

Tom

Stephan Eickschen wrote:

Hi Thomas-

>
> I'm trying to import a raster file in ascii/text format with lat/long
> coordinates into GRASS. The file has the following format:
>
> north: 47.937500000000
> south: 24.062500000000
> east: -66.479166666667
> west: -90.520833333333
> rows: 573
> cols: 577
> 785 790 786 783 779 771 768 766 ...

I do not know, if it is possible to do the conversion with awk, but what
you might do, is to write a small program, that writes your data to
your sites directory and then do the import with an interpolation... :wink:
Have a look at the following part of my script, which runs at the GRASS-
prompt, doing this "task":

cd $HOME/grass_data/$LOCATION/$MAPSET/site_lists/
YOURPROGRAM YOURFILE >! $NAME
s.surf.idw input=$NAME output=$NAME
g.remove sites=$NAME

where YOURPROGRAM should do a conversation from YOURFILE to a file that
has the format

lon|lat|val

Do not forget the "|"!!!
(In my example YOURPROGRAM writes to stdout)

Regards,

        Stephan

P.S.: It might be not very nice, but it works ...

--
------------------------------------------------------------------------

Stephan Eickschen Tel. : +49 (0)251 83-34704
Westfaelische Wilhelms-Universitaet Fax. : +49 (0)251 83-36100
Institute for Geophysics
Research Unit of Physical Glaciology email: eicksch@uni-muenster.de
Corrensstrasse 24
48149 Muenster
Germany

------------------------------------------------------------------------

--
Tom Adams adams@ohrfc.noaa.gov
                                       http://www.nws.noaa.gov/er/iln
Development & Operations Hydrologist NWS-Ohio River Forecast Center
1901 S. State Route 134 Wilmington, OH 45177
(937) 383-0527 (VOICE) (937) 383-0033 (FAX)