[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 08:35:40 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
--------------------------+-------------------------------
Changes (by neteler):

 * version:   => unspecified


Comment:

 Replying to [ticket:2878 pmav99]:
 > I was trying to use `v.import` and I think I run into a bug. AFAIK the
 error is caused by `v.in.ogr -i`.
 >
 > In this container I was using [67592] so this should be present in
 `7.0.3`.
 >
 > These are the steps to reproduce it:
 >
 > 1. Create a file with the following contents and save it e.g. as
 `~/input.json`:

 I did that and simply tried with OGR:


 {{{
 ogrinfo -so ~/input.json
 ERROR 1: GeoJSON parsing error: quoted object property name expected (at
 offset 1)
 ERROR 4: Failed to read GeoJSON data
 ERROR 1: GeoJSON parsing error: quoted object property name expected (at
 offset 1)
 ERROR 4: Failed to read GeoJSON data
 FAILURE:
 Unable to open datasource `/home/neteler/input.json' with the following
 drivers.
   -> PCIDSK
   -> JP2OpenJPEG
   -> JPEG2000
   -> PDF
   -> ESRI Shapefile
 ...
   -> GeoJSON
   -> Interlis 1
 ...
 }}}

 Are you sure that this is valid syntax? Since OGR cannot read it, also
 v.in.ogr cannot.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2878#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list