[GRASS-dev] [GRASS GIS] #2878: "v.in.ogr -i" throws an error when importing a GeoJSON file containing a single point.
GRASS GIS
trac at osgeo.org
Wed Jan 27 12:22:29 PST 2016
#2878: "v.in.ogr -i" throws an error when importing a GeoJSON file containing a
single point.
--------------------------+-------------------------------
Reporter: pmav99 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.3
Component: Vector | Version: unspecified
Resolution: | Keywords: v.in.ogr v.import
CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------
Comment (by pmav99):
I also created a vector map that contained a single line element. I
exported and tried to reimport it using `v.import`. This is the exported
`GeoJSON` file:
{{{
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name":
"urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "cat": 3 }, "geometry": { "type":
"LineString", "coordinates": [ [ -78.691347885901351, 35.767500940375896
], [ -78.689522060322943, 35.768756195461052 ] ] } }
]
}
}}}
And this is the output of `v.import` (i.e. everything works just fine):
{{{
GRASS 7.0.3svn (damflood):~/ > v.import input=sample2.json output=zxcv
--verbose
Creating temporary location for <sample2.json>...
WARNING: All available OGR layers will be imported into vector map
<OGRGeoJSON>
Projection of input dataset and current location appear to match
Check if OGR layer <OGRGeoJSON> contains polygons...
100%
Using native format
Column name <cat> renamed to <cat_>
Importing 1 features (OGR layer <OGRGeoJSON>)...
100%
-----------------------------------------------------
Building topology for vector map <zxcv at damflood>...
Registering primitives...
One primitive registered
2 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
100%
Topology was built
Number of nodes: 2
Number of primitives: 1
Number of points: 0
Number of lines: 1
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
Input <sample2.json> successfully imported without reprojection
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2878#comment:5>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list