<div dir="ltr"><div>Hi,<br><br></div>in the source code I stumbled on direct OGR access and realized that I don't know what it is. I haven't found any documentation (now I think there might be something on the wiki) but at the end I remembered I've seen it (probably lately for the GSoC idea) and figured out that you can do the following:<br><div><div><br></div><div># prepare data<br></div><div>v.random output=direct_ogr_test -z npoints=10<br>v.out.ogr input=direct_ogr_test output=direct_ogr_test.shp<br><br></div><div># magic<br></div><div><a href="http://v.info">v.info</a> direct_ogr_test.shp@OGR layer=direct_ogr_test<br><br></div><div>This is pretty cool. There are just some issue and my question is weather I should create tickets for them.<br></div><div><br></div><div>1) You need to specify layer, in my case it was the same as filename without suffix. This took my some time to find out. Perhaps natural for GDAL/OGR, not so much for common users.<br></div><div><br></div><div>2) It gives strange errors when you use it for output.<br><br></div><div># note @OGR in output<br></div><div>v.clean input=direct_ogr_test.shp@OGR output=direct_ogr_test_clean@OGR tool=rmdac layer=direct_ogr_test<br><br></div><div># gives (which is not true):<br></div><div>ERROR: option <output>: <direct_ogr_test_clean> exists. To overwrite, use the --overwrite flag<br><br># note @OGR in output and --o<br>v.clean input=direct_ogr_test.shp@OGR output=direct_ogr_test_clean@OGR tool=rmdac layer=direct_ogr_test --o<br><br></div><div># gives:<br></div><div>ERROR: Output vector map name <direct_ogr_test_clean@OGR> is not in the<br>       current mapset (manual)<br><br></div><div>Which is at least right but perhaps not 100% fitting the OGR case.<br><br></div><div>3) Is the above read-only limitation necessary? I suppose it is not implemented but now the code is shared for reading with the external/link driver for reading. The issue is of course writing to different Mapset. I don't like to potential mess in code and increased complexity in documentation and in writing checks (e.g. in GUI). However, it would be nice to find a way our it.<br><br></div><div>4) I haven't tried GUI much but v.clean went through. Unfortunately, you cannot browse the file as a user. I guess this is a feature worth putting there. Some ideas on that would be good. Or is there a reason for not having it there?<br><br></div><div>5) I guess some documentation is needed. Perhaps even a separate page. Maybe we can try to replace text in manual "direct OGR access" in modules' pages by a link to that page when building the pages.<br></div><div><br></div><div>6) The name OGR might not be really the right thing anymore since OGR merged more under GDAL if I'm following the website properly. We should consider this before writing the documentation or putting it to GUI.<br><br></div><div>Thanks,<br></div><div>Vaclav<br></div></div></div>