[GRASS-dev] How to import from a spatialite/sqlite db by v.in.ogr?
Helmut Kudrnovsky
hellik at web.de
Sun Apr 16 14:12:50 PDT 2017
Martin Landa wrote
> Hi,
>
> 2017-04-16 22:40 GMT+02:00 Helmut Kudrnovsky <
> hellik@
> >:
>> v.in.ogr -l input=BiogeoRegions2016.sqlite
>> biogeoregions2016
>
> [...]
>
>> Data source
> <BiogeoRegions2016.sqlite>
> (format 'SQLite') contains 1 layers:
>> v.in.ogr input=BiogeoRegions2016.sqlite layer=biogeoregions2016|geometry
>> output=test where=short_name = 'alpine'
>> ERROR: Layer <biogeoregions2016^^^|geometry> not available
>
> why not
>
> layer=biogeoregions2016
yes, the bioregions2016|geometry is autogenerated by the v.in.ogr-GUI!
tested the cmd on the command line without "|geometry"
C:\>v.in.ogr input=BiogeoRegions2016.sqlite layer=biogeoregions2016
output=testoncmdline where="short_name = 'alpine'"
Check if OGR layer <biogeoregions2016> contains polygons...
100%
WARNING: Width for column short_name set to 255 (was not specified by OGR),
some strings may be truncated!
WARNING: Width for column pre_2012 set to 255 (was not specified by OGR),
some strings may be truncated!
WARNING: Width for column code set to 255 (was not specified by OGR), some
strings may be truncated!
WARNING: Width for column name set to 255 (was not specified by OGR), some
strings may be truncated!
Importing 1 features (OGR layer <biogeoregions2016>)...
100%
-----------------------------------------------------
Registering primitives...
27 primitives registered
48947 vertices registered
Number of nodes: 27
Number of primitives: 27
Number of points: 0
Number of lines: 0
Number of boundaries: 27
Number of centroids: 0
Number of areas: -
Number of isles: -
-----------------------------------------------------
Cleaning polygons
-----------------------------------------------------
Breaking polygons...
Breaking polygons (pass 1: select break points)...
100%
Breaking polygons (pass 2: break at selected points)...
100%
-----------------------------------------------------
Removing duplicates...
100%
-----------------------------------------------------
Breaking boundaries...
100%
-----------------------------------------------------
Removing duplicates...
100%
-----------------------------------------------------
Cleaning boundaries at nodes...
100%
-----------------------------------------------------
Merging boundaries...
100%
-----------------------------------------------------
Removing dangles...
100%
-----------------------------------------------------
Building areas...
100%
27 areas built
27 isles built
Number of nodes: 27
Number of primitives: 27
Number of points: 0
Number of lines: 0
Number of boundaries: 27
Number of centroids: 0
Number of areas: 27
Number of isles: 27
-----------------------------------------------------
Removing bridges...
100%
-----------------------------------------------------
Registering primitives...
27 primitives registered
48947 vertices registered
Building areas...
100%
27 areas built
27 isles built
Attaching islands...
100%
Number of nodes: 27
Number of primitives: 27
Number of points: 0
Number of lines: 0
Number of boundaries: 27
Number of centroids: 0
Number of areas: 27
Number of isles: 27
-----------------------------------------------------
Finding centroids for OGR layer <biogeoregions2016>...
100%
-----------------------------------------------------
Writing centroids...
100%
-----------------------------------------------------
27 input polygons
Total area: 9.48235E+011 (27 areas)
-----------------------------------------------------
Copying features...
100%
Building topology for vector map <testoncmdline at vecdata>...
Registering primitives...
54 primitives registered
48974 vertices registered
Building areas...
100%
27 areas built
27 isles built
Attaching islands...
100%
Attaching centroids...
100%
Number of nodes: 27
Number of primitives: 54
Number of points: 0
Number of lines: 0
Number of boundaries: 27
Number of centroids: 27
Number of areas: 27
Number of isles: 27
it's imported correctly.
it's a GUI regression.
should I open a ticket?
-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-import-from-a-spatialite-sqlite-db-by-v-in-ogr-tp5317435p5317439.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
More information about the grass-dev
mailing list