----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 99
From grass-lists-owner@max.cecer.army.mil Fri Apr 2 11:31:05 1993
From: dec@crsa.bu.edu (David Clayton)
Subject: v.in.dlg/v.import question
Sender: lists-owner@max.cecer.army.mil
Reply-To: grassu-list@max.cecer.army.mil
To: grassu-list@max.cecer.army.mil
Date: Fri, 2 Apr 1993 12:22:00 -0500 (EST)
Cc: dec@crsa.bu.edu
X-Mailer: ELM [version 2.4 PL20]
Content-Type> : > text>
Content-Length: 2030Greetings!
I have been trying to import some usgs dlg data into my GRASS database and,
whether using v.in.dlg or v.import, I always get the same error after being
prompted for the new vector file name:Enter a new vector file name
Enter 'list' for a list of existing vector files
Hit RETURN to cancel request
> usgs14.0
<usgs14.0>ERROR: Number of sides in the polygon defining the coverage
of the map less than 4.
61000000000D+00 4 0 4 1 -0.640360450000000D+08
0.1704401
Another words the Dlg header is incorrect.
Dlg header line 4, data element 8.
ERROR((null)): Could not convert ascii dlg file: '/m/crsa/data/users/dec/stcroi
x/survey1/dlg/usgs14' to binary dlg file: '/m/crsa/data/users/dec/stcroix/survey
1/bdlg/usgs14'------------------------
Thsi is what the header looks like in the file:
USGS-NMD DLG DATA - CHARACTER FORMAT - 09-29-87 VERSION E
AST POINT, VI 1958, 1982P 24000
?16 4 4 4
3 1 20 2 0.61000000000D+00 4 0 4 1 -0
.640360450000000D+08 0.170440150000000D+08 0.000000000000000D+00 0
.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0
.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0
.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0
.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.1
0000000000D+01 0.00000000000D+00 0.00000000000D+00 0.00000000000D+00 SW
17.675000 -64.675000 322334.68 1954900.14 NW
17.800000 -64.675000 322457.79 1968733.28 NE
17.800000 -64.550000 335710.04 1968619.40 SE
17.675000 -64.550000 335596.07 1954786.80I know this is probably something really simple, does anyone have the answer?
Thanks,
David Clayton
David,
It looks like that you did get the input file in "optional" DLG format which is
required by GRASS. However, the original optional DLG format should be comprised
of 8 bit ASCII characters organized into fixed-length logical records of 80
characters (bytes). Your header file looks different from the DLG standard by
offseting first 4 characters of each record to the end of the above records.
When you read in DLG data, please make sure you are using correct block size.
I think GRASS v.in.dlg command works just fine. Please check your original
input file. The problem may happen when you use UNIX "dd" command, etc...
make sure the input record has a fixed-length of 80 characters.
The correct header should looks like this:
USGS-NMD DLG DATA - CHARACTER FORMAT - 09-29-87 VERSION
EAST POINT, VI 1958, 1982P 24000
?16 4 4 4
3 1 20 2 0.61000000000D+00 4 0 4 1
-0.640360450000000D+08 0.170440150000000D+08 0.000000000000000D+00
0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00
0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00
0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00
0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.10000000000D+01 0.00000000000D+00 0.00000000000D+00 0.00000000000D+00
SW 17.675000 -64.675000 322334.68 1954900.14
NW 17.800000 -64.675000 322457.79 1968733.28
NE 17.800000 -64.550000 335710.04 1968619.40
SE 17.675000 -64.550000 335596.07 1954786.80
Good Luck !
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: signature
X-Sun-Content-Lines: 15
****************************************************************************
# # ## # # #### Wang Song (wang)
# # # # ## # # #
# # # # # # # # Center for Advanced Spatial Technologies
# ## # ###### # # # # ### 12 Ozark Hall
## ## # # # ## # # University of Arkansas
# # # # # # #### Fayetteville, AR 72701
INTERNET: wang@cast.uark.edu Tel: (501) 575-6159
FAX: (501) 575-3846
***************************************************************************