I am new GRASS use, and learning GRASS to use conservation literacy using rare plant databases. To start with I converted a Kml file of the state of Meghalaya India to a shapefile using DNRGarmin. However when I try to open the shapefile in GRASS I keep getting errors and the map of the opened file does not look anything like the original map. What did I do wrong. I am attaching the shapefile and dbf file, I used.
thanks in advance
Sonali
This is the message I get in the command output console
Projection of input dataset and current location appear to match
Layer: Meghalay
Counting polygons for 1 features…
Importing map 1 features…
Building topology for vector map <Megh_tmp>…
Registering primitives…
1 primitives registered
258 vertices registered
Number of nodes: 2
Number of primitives: 1
Number of points: 0
Number of lines: 0
Number of boundaries: 1
Number of centroids: 0
Number of areas: -
Number of isles: -
WARNING: Cleaning polygons, result is not guaranteed!
Snap boundaries (threshold = 1.000e-007):
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 <Megh_tmp>…
Building areas…
2 areas built
1 isles built
Attaching islands…
Number of nodes: 9
Number of primitives: 12
Number of points: 0
Number of lines: 0
Number of boundaries: 12
Number of centroids: 0
Number of areas: 2
Number of isles: 1
Number of areas without centroid: 2
Find centroids for layer: Meghalay
Write centroids:
1 input polygons
Total area: 3.56766E+011 (2 areas)
Overlapping area: 0 (0 areas)
Area without category: 3.56766E+011 (2 areas)
Building topology for vector map …
Registering primitives…
3 primitives registered
17 vertices registered
Building areas…
2 areas built
1 isles built
Attaching islands…
Attaching centroids…
Number of nodes: 2
Number of primitives: 3
Number of points: 0
Number of lines: 0
Number of boundaries: 3
Number of centroids: 0
Number of areas: 2
Number of isles: 1
Number of areas without centroid: 2
WARNING: Errors were encountered during the import
Try to import again, snapping with at least 1e-007: ‘snap=1e-007’
(Tue Aug 13 15:32:05 2013) Command finished (1 sec)
–
Sonali Saha, PhD.
Senior Biologist
The Institute for Regional Conservation
22601 SW 152nd Avenue
Miami FL 33170
I am new GRASS use, and learning GRASS to use conservation literacy using
rare plant databases.
Nice!
To start with I converted a Kml file of the state of Meghalaya India to a
shapefile using DNRGarmin. However when I try to open the shapefile in GRASS
I keep getting errors and the map of the opened file does not look anything
like the original map.
How does the original map look like? Viewing the attached ESRI Shapefile
within from QGIS, it does not look "ok".
What did I do wrong. I am attaching the shapefile and dbf file, I used.
My guess is that either the original file has some problem (open polygon), or
the conversion did not work well.
I am new GRASS use, and learning GRASS to use conservation literacy using rare plant databases. To start with I converted a Kml file of the state of Meghalaya India to a shapefile using DNRGarmin. However when I try to open the shapefile in GRASS I keep getting errors and the map of the opened file does not look anything like the original map. What did I do wrong. I am attaching the shapefile and dbf file, I used.
thanks in advance
Sonali
This is the message I get in the command output console
Projection of input dataset and current location appear to match
Layer: Meghalay
Counting polygons for 1 features…
Importing map 1 features…
Building topology for vector map <Megh_tmp>…
Registering primitives…
1 primitives registered
258 vertices registered
Number of nodes: 2
Number of primitives: 1
Number of points: 0
Number of lines: 0
Number of boundaries: 1
Number of centroids: 0
Number of areas: -
Number of isles: -
WARNING: Cleaning polygons, result is not guaranteed!
Snap boundaries (threshold = 1.000e-007):
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 <Megh_tmp>…
Building areas…
2 areas built
1 isles built
Attaching islands…
Number of nodes: 9
Number of primitives: 12
Number of points: 0
Number of lines: 0
Number of boundaries: 12
Number of centroids: 0
Number of areas: 2
Number of isles: 1
Number of areas without centroid: 2
Find centroids for layer: Meghalay
Write centroids:
1 input polygons
Total area: 3.56766E+011 (2 areas)
Overlapping area: 0 (0 areas)
Area without category: 3.56766E+011 (2 areas)
Building topology for vector map …
Registering primitives…
3 primitives registered
17 vertices registered
Building areas…
2 areas built
1 isles built
Attaching islands…
Attaching centroids…
Number of nodes: 2
Number of primitives: 3
Number of points: 0
Number of lines: 0
Number of boundaries: 3
Number of centroids: 0
Number of areas: 2
Number of isles: 1
Number of areas without centroid: 2
WARNING: Errors were encountered during the import
Try to import again, snapping with at least 1e-007: ‘snap=1e-007’
(Tue Aug 13 15:32:05 2013) Command finished (1 sec)
–
Sonali Saha, PhD.
Senior Biologist
The Institute for Regional Conservation
22601 SW 152nd Avenue
Miami FL 33170
# create location from SHP file:
grass70 -c Meghalay.shp grassdata/Meghalay
# import, here the final "working" command line:
v.in.ogr Meghalay.shp out=Meghalay snap=100
Given that such "severe" snapping was needed (snapping is in map
units, here: meters), you will need to redo the conversion from KML
since the geometry in the SHAPE file is broken as the others
indicated.
I have redone the shape file, I am attching it again, and this is the error I get when I am trying to open it. The location is in india and spans two UTM zones and therefore I used lat lons
Projection of input dataset and current location appear to match
Layer: Meghalay
DBMI-DBF driver error:
ERROR: Unable to create table: ‘create table Meghalay (cat integer, TYPE varchar ( 10 ), IDENT varchar ( 24 ), LAT double precision, LONG double precision, Y_PROJ double precision, X_PROJ double precision, NEW_SEG varchar ( 10 ), DISPLAY varchar ( 10 ), COLOR varchar ( 10 ), ALTITUDE double precision, DEPTH double precision, TEMP double precision, TIME varchar ( 20 ), MODEL varchar ( 20 ), FILENAME varchar ( 254 ), LTIME varchar ( 20 ))’
On Tue, Aug 13, 2013 at 3:41 PM, Sonali Saha <sahairc@gmail.com> wrote:
I am new GRASS use, and learning GRASS to use conservation literacy using rare plant databases. To start with I converted a Kml file of the state of Meghalaya India to a shapefile using DNRGarmin. However when I try to open the shapefile in GRASS I keep getting errors and the map of the opened file does not look anything like the original map. What did I do wrong. I am attaching the shapefile and dbf file, I used.
thanks in advance
Sonali
This is the message I get in the command output console
Projection of input dataset and current location appear to match
Layer: Meghalay
Counting polygons for 1 features…
Importing map 1 features…
Building topology for vector map <Megh_tmp>…
Registering primitives…
1 primitives registered
258 vertices registered
Number of nodes: 2
Number of primitives: 1
Number of points: 0
Number of lines: 0
Number of boundaries: 1
Number of centroids: 0
Number of areas: -
Number of isles: -
WARNING: Cleaning polygons, result is not guaranteed!
Snap boundaries (threshold = 1.000e-007):
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 <Megh_tmp>…
Building areas…
2 areas built
1 isles built
Attaching islands…
Number of nodes: 9
Number of primitives: 12
Number of points: 0
Number of lines: 0
Number of boundaries: 12
Number of centroids: 0
Number of areas: 2
Number of isles: 1
Number of areas without centroid: 2
Find centroids for layer: Meghalay
Write centroids:
1 input polygons
Total area: 3.56766E+011 (2 areas)
Overlapping area: 0 (0 areas)
Area without category: 3.56766E+011 (2 areas)
Building topology for vector map …
Registering primitives…
3 primitives registered
17 vertices registered
Building areas…
2 areas built
1 isles built
Attaching islands…
Attaching centroids…
Number of nodes: 2
Number of primitives: 3
Number of points: 0
Number of lines: 0
Number of boundaries: 3
Number of centroids: 0
Number of areas: 2
Number of isles: 1
Number of areas without centroid: 2
WARNING: Errors were encountered during the import
Try to import again, snapping with at least 1e-007: ‘snap=1e-007’
(Tue Aug 13 15:32:05 2013) Command finished (1 sec)
–
Sonali Saha, PhD.
Senior Biologist
The Institute for Regional Conservation
22601 SW 152nd Avenue
Miami FL 33170
–
Sonali Saha, PhD.
Senior Biologist
The Institute for Regional Conservation
22601 SW 152nd Avenue
Miami FL 33170
I have redone the shape file, I am attching it again, and this is the
error I get when I am trying to open it. The location is in india
and spans two UTM zones and therefore I used lat lons
Projection of input dataset and current location appear to match
Layer: Meghalay
DBMI-DBF driver error:
ERROR: Unable to create table: 'create table Meghalay (cat integer, TYPE varchar ( 10 ), IDENT varchar ( 24 ), LAT double precision, LONG double precision, Y_PROJ double precision, X_PROJ double precision, NEW_SEG varchar ( 10 ), DISPLAY varchar ( 10 ), COLOR varchar ( 10 ), ALTITUDE double precision, DEPTH double precision, TEMP double precision, TIME varchar ( 20 ), MODEL varchar ( 20 ), FILENAME varchar ( 254 ), LTIME varchar ( 20 ))'
Hi,
perhaps TIME is a SQL reserved keyword, so you have to change that column name. (maybe TYPE too)