[GRASS-user] problem about import of shp file

Natsuko YOSHIFUJI natsuko.yoshifuji at gmail.com
Wed Mar 18 03:55:05 EDT 2009


Dear everyone,

Hello.
I made my first challenge to import Arc-GIS shp file to GRASS.
But I have some trouble.
This may be an elementary question...,but could anyone help me, please?

What I want to do (final destination) is to
1) Import vector map (Arc-GIS shp file) into location1(UTM)
2) Reproject vector data into location2 (lat-lon).
3) Overlay on raster map in location2. I need area information in vector
map (Arc-GIS shp file) .
But I have a trouble in step 1, and area (polygon) cannot be shown...

Outline of what I did is shown below.
Details of commands and error message are shown in attached file.

1) Create UTM new location
47N, but the area was extended to eastward because the area includes a
part of 48N
This seems to succeed.

2) v.in.ogr dsn=lu2543s.shp output=lu2543s
failed.

3) v.in.ogr dsn=lu2543s.shp output=lu2543s -o
Succeeded, but had an error message.
Seems to failed to Import of area and isles...???

4) d.vect lu2543s.
Some map was shown, but had an error to show area.

5) d.what.vect
failed. Problem about topology.

6) v.category input=lu2543s option=report
failed

* I have 6 another files in addition to shp file to be imported
(lu2543s.shp), which is lu2543s.cpg, lu2543s.dbf, lu2543s.prj,
lu2543s.sbn, lu2543s.sbx, lu2543s.shx.
But I am not sure whether I should use them to import shp file correctly
or not...

How can I import shp file correctly?
I hope someone kindly advice me, please...

Thank you.

N. Yoshifuji
2009-3-18


-------------- next part --------------
[ 1) created location]

projection: 1 (UTM)
zone: 47
  north:       3300000
  south:       0
  east:        1666000
  west:        0

  e-w res:     50
  n-s res:     50

total rows: 66000
total cols: 33320
total cells: 2,199,120,000


[ 2) import shp file]

GRASS 6.2.3 (utm47n3):~ > v.in.ogr dsn=Thai_GIS/lu2543s.shp output=lu2543s
A datum name wgs84 (WGS_1984) was specified without transformation parameters.
Note that the GRASS default for wgs84 is towgs84=0.000,0.000,0.000.
ERROR: Projection of dataset does not appear to match current location.

       LOCATION PROJ_INFO is:
       name: UTM
       datum: wgs84
       towgs84: 0.000,0.000,0.000
       proj: utm
       ellps: wgs84
       a: 6378137.0000000000
       es: 0.0066943800
       f: 298.2572235630
       zone: 47

       Dataset PROJ_INFO is:
       name: Transverse Mercator
       proj: tmerc
       datum: wgs84
       a: 6378137.0
       es: 0.006694379990141317
       lat_0: 0
       lon_0: 99
       k: 0.999600
       x_0: 500000
       y_0: 0
       no_defs: defined

       You can use the -o flag to v.in.ogr to override this check.
       Consider to generate a new location with 'location' parameter from
       input data set.


[3) import shp file]

GRASS 6.2.3 (utm47n3):~ > v.in.ogr dsn=Thai_GIS/lu2543s.shp output=lu2543s -o
A datum name wgs84 (WGS_1984) was specified without transformation parameters.
Note that the GRASS default for wgs84 is towgs84=0.000,0.000,0.000.
Over-riding projection check.
Proceeding with import...
Layer: lu2543s
WARNING: Default driver / database set to:
         driver: dbf
         database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
Importing map 89326 features...
-----------------------------------------------------
Building topology ...
162787 primitives registered      
Building areas:  100%
15407 areas built      
14236 isles built
Attaching islands:  100%
Attaching centroids:  100%
Topology was built.
Number of nodes     :   88204
Number of primitives:   162787
Number of points    :   0
Number of lines     :   0
Number of boundaries:   162787
Number of centroids :   0
Number of areas     :   15407
Number of isles     :   14236
Number of incorrect boundaries   :   148487
Number of areas without centroid :   15407
-----------------------------------------------------
WARNING: Cleaning polygons, result is not guaranteed!
Building topology ...
Topology was built.
Number of nodes     :   88204
Number of primitives:   162787
Number of points    :   0
Number of lines     :   0
Number of boundaries:   162787
Number of centroids :   0
Number of areas     :   -
Number of isles     :   -
-----------------------------------------------------
Break polygons:
Registering points ... 4611190assertion "n" failed: file "node.c", line 48
Aborted (core dumped)


[4) display imported vector file]

GRASS 6.2.3 (utm47n3):~ > d.vect lu2543s
WARNING: Cannot display areas, topology not available

GRASS 6.2.3 (utm47n3):~ > v.category input=lu2543s option=report
ERROR: Cannot open old vector lu2543s at PERMANENT on level 2


More information about the grass-user mailing list