[GRASS-user] failing to import table
Helmut Kudrnovsky
hellik at web.de
Mon Sep 2 02:18:25 PDT 2013
Moritz Lennert wrote
> Have you tried accessing the attribute table ? Working with it through
> other modules ?
> What does v.db.connect -p give you ?
attribute table manager opens without any problems, some further tests below
_____
System Info
GRASS version: 6.4.3
GRASS SVN Revision:
GIS Library Revision: 50937 (2012-02-25)
GDAL/OGR: GDAL 1.9.2, released 2012/10/08
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
_____
nc-sample data set
v.out.ogr -s -e input=geology at PERMANENT type=area dsn=C:\wd olayer=a_b
_____
renaming
a_b.shp => a b.shp
a_b.dbf => a b.shp
a_b.prj => a b.shp
a_b.shx => a b.shp
_____
v.in.ogr dsn=C:\wd\a b.shp output=import_shapefile_with_spaces
Projection of input dataset and current location appear to match
Layer: a b
Counting polygons for 1832 features...
Importing map 1832 features...
-----------------------------------------------------
Building topology for vector map <import_shapefile_with_spaces_tmp>...
Registering primitives...
6462 primitives registered
322207 vertices registered
Number of nodes: 5733
Number of primitives: 6462
Number of points: 0
Number of lines: 0
Number of boundaries: 6462
Number of centroids: 0
Number of areas: -
Number of isles: -
-----------------------------------------------------
WARNING: Cleaning polygons, result is not guaranteed!
-----------------------------------------------------
Break polygons:
-----------------------------------------------------
Remove duplicates:
-----------------------------------------------------
Break boundaries:
-----------------------------------------------------
Remove duplicates:
-----------------------------------------------------
Clean boundaries at nodes:
-----------------------------------------------------
Merge boundaries:
-----------------------------------------------------
Change dangles to lines:
-----------------------------------------------------
Remove bridges:
-----------------------------------------------------
Building topology for vector map <import_shapefile_with_spaces_tmp>...
Building areas...
1832 areas built
907 isles built
Attaching islands...
Number of nodes: 6722
Number of primitives: 19851
Number of points: 0
Number of lines: 0
Number of boundaries: 19851
Number of centroids: 0
Number of areas: 1832
Number of isles: 907
Number of areas without centroid: 1832
-----------------------------------------------------
Find centroids for layer: a b
-----------------------------------------------------
Write centroids:
-----------------------------------------------------
1832 input polygons
Total area: 1.27609E+011 (1832 areas)
Overlapping area: 0 (0 areas)
Area without category: 0 (0 areas)
-----------------------------------------------------
Building topology for vector map <import_shapefile_with_spaces>...
Registering primitives...
5465 primitives registered
191205 vertices registered
Building areas...
1832 areas built
907 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 4540
Number of primitives: 5465
Number of points: 0
Number of lines: 0
Number of boundaries: 3633
Number of centroids: 1832
Number of areas: 1832
Number of isles: 907
(Mon Sep 02 10:59:28 2013) Command finished (12 sec)
_____
attribute table manager opens without any problem
_____
v.db.connect map=import_shapefile_with_spaces -p
Vector map <import_shapefile_with_spaces at user1> is connected by:
layer <1> table <import_shapefile_with_spaces> in database
<C:\grassdata\nc_spm_08\user1\dbf\> through driver <dbf> with key <cat>
_____
v.report map=import_shapefile_with_spaces at user1 option=area units=hectares
Displaying column types/names for database connection of layer 1:
cat|onemap_pro|PERIMETER|GEOL250_|GEOL250_ID|GEO_NAME|SHAPE_area|SHAPE_len|area
1|141526064|232209.09375|12|11|Qp|141526058.758|232209.096991|14152.6058758046
2|163779.1875|1767.666138|14|13|Qp|163779.303257|1767.666078|16.3779303256575
3|45783944|43256.566406|15|14|Qp|45783948.3426|43256.564356|4578.39483425879
[...]
_____
v.db.addcol --verbose map=import_shapefile_with_spaces at user1 columns=ncoladd
integer
(Mon Sep 02 11:05:37 2013) Command finished (1 sec)
_____
db.columns --verbose table=import_shapefile_with_spaces
cat
onemap_pro
PERIMETER
GEOL250_
GEOL250_ID
GEO_NAME
SHAPE_area
SHAPE_len
ncoladd
(Mon Sep 02 11:09:08 2013) Command finished (0 sec)
_____
-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/failing-to-import-table-tp5075176p5075573.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list