#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.4 Component: Vector | Version: svn-releasebranch70 Resolution: | Keywords: v.in.ogr v.import CPU: Unspecified | Platform: Unspecified --------------------------+---------------------------------
Comment (by pmav99): Replying to [comment:10 neteler]: > One question we have to answer is whether GRASS should allow the creation of mapsets with 0 resolution in any direction, and, if not (as I think it should be), then what would be a reasonable default when creating a location from a file containing data with identical coordinates in either of the directions or with just one point. I also tried to create a location using the grass binary and a GeoJSON file containing a single Point: {{{ grass -e -c /path/to/test.json ~/grassdata/newlocation }}} The location gets created without any errors/warnings but when you try to open the location you get the following traceback: {{{ grassuser@2b7a187f3320:~$ grass -e -c ~/scenes/foo.json ~/grassdata/qwer/ WARNING: Default locale settings are missing. GRASS running with C locale. WARNING: Searched for a web browser, but none found Creating new GRASS GIS location/mapset... Cleaning up temporary files... grassuser@2b7a187f3320:~$ grass ~/grassdata/qwer/ Launching <wxpython> GUI in the background, please wait... GRASS 7.0.3svn (qwer):~ > Traceback (most recent call last): File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/wxgui.py", line 141, in <module> sys.exit(main()) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/wxgui.py", line 132, in main app = GMApp(workspaceFile) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/wxgui.py", line 49, in __init__ wx.App.__init__(self, False) File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__ self._BootstrapApp() File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/wxgui.py", line 83, in OnInit workspace=self.workspaceFile) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/lmgr/frame.py", line 223, in __init__ self.NewDisplay(show = False) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/lmgr/frame.py", line 1793, in NewDisplay showMapDisplay = show) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/lmgr/layertree.py", line 181, in __init__ Map = self.Map) File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/mapdisp/frame.py", line 188, in __init__ self.MapWindow2D.InitZoomHistory() File "/usr/local/src/grass-trunk7/dist.x86_64-pc-linux- gnu/gui/wxpython/mapwin/buffered.py", line 1743, in InitZoomHistory self.zoomhistory.append((self.Map.region['n'], KeyError: 'n' }}} and this dialog: [[Image(http://i.imgur.com/lXEVltS.png)]] -- Ticket URL: <https://trac.osgeo.org/grass/ticket/2878#comment:12> GRASS GIS <https://grass.osgeo.org> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev