vector: superfluous layer 0 reported for a polygon layer #46
Open
Description
Contrary to a point vector layer, for a polygon vector layer an extra layer "0"
is reported as the first layer, containing linestrings and no attributes.
The examples below use vector data sources in the GRASS GIS 'North Carolina basic dataset', downloaded from https://grass.osgeo.org/download/data/.
ogrinfo polygons example (has the problem)
$ ogrinfo -so -al /home/floris/grassdata/nc_basic_spm_grass7/PERMANENT/vector/zipcodes/head
Warning 1: GRASS warning: GISBASE environment variable was not set, using:
/usr/lib/grass83
INFO: Open of `/home/floris/grassdata/nc_basic_spm_grass7/PERMANENT/vector/zipcodes/head'
using driver `OGR_GRASS' successful.
Layer name: 0
Geometry: Line String
Feature Count: 158
Extent: (610047.866451, 196327.520901) - (677060.680666, 258102.572146)
Layer SRS WKT:
PROJCRS["unknown",
BASEGEOGCRS["grs80",
DATUM["North American Datum 1983",
ELLIPSOID["Geodetic_Reference_System_1980",6378137,298.257222101,
LENGTHUNIT["metre",1]],
ID["EPSG",6269]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8901]]],
CONVERSION["unnamed",
METHOD["Lambert Conic Conformal (2SP)",
ID["EPSG",9802]],
PARAMETER["Latitude of false origin",33.75,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8821]],
PARAMETER["Longitude of false origin",-79,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8822]],
PARAMETER["Latitude of 1st standard parallel",36.1666666666667,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8823]],
PARAMETER["Latitude of 2nd standard parallel",34.3333333333333,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8824]],
PARAMETER["Easting at false origin",609601.22,
LENGTHUNIT["metre",1],
ID["EPSG",8826]],
PARAMETER["Northing at false origin",0,
LENGTHUNIT["metre",1],
ID["EPSG",8827]]],
CS[Cartesian,2],
AXIS["easting",east,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["northing",north,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]]
Data axis to CRS axis mapping: 1,2
Layer name: zipcodes
Geometry: Polygon
Feature Count: 48
Extent: (610047.866451, 196327.520901) - (677060.680666, 258102.572146)
Layer SRS WKT:
PROJCRS["unknown",
BASEGEOGCRS["grs80",
DATUM["North American Datum 1983",
ELLIPSOID["Geodetic_Reference_System_1980",6378137,298.257222101,
LENGTHUNIT["metre",1]],
ID["EPSG",6269]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8901]]],
CONVERSION["unnamed",
METHOD["Lambert Conic Conformal (2SP)",
ID["EPSG",9802]],
PARAMETER["Latitude of false origin",33.75,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8821]],
PARAMETER["Longitude of false origin",-79,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8822]],
PARAMETER["Latitude of 1st standard parallel",36.1666666666667,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8823]],
PARAMETER["Latitude of 2nd standard parallel",34.3333333333333,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8824]],
PARAMETER["Easting at false origin",609601.22,
LENGTHUNIT["metre",1],
ID["EPSG",8826]],
PARAMETER["Northing at false origin",0,
LENGTHUNIT["metre",1],
ID["EPSG",8827]]],
CS[Cartesian,2],
AXIS["easting",east,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["northing",north,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]]
Data axis to CRS axis mapping: 1,2
cat: Integer (0.0)
OBJECTID: Integer (0.0)
WAKE_ZIPCO: Real (0.0)
PERIMETER: Real (0.0)
ZIPCODE_: Real (0.0)
ZIPCODE_ID: Real (0.0)
ZIPNAME: String (0.0)
ZIPNUM: Real (0.0)
ZIPCODE: String (0.0)
NAME: String (0.0)
SHAPE_Leng: Real (0.0)
SHAPE_Area: Real (0.0)
ogrinfo points example (is OK)
$ ogrinfo -so -al /home/floris/grassdata/nc_basic_spm_grass7/PERMANENT/vector/schools/head
Warning 1: GRASS warning: GISBASE environment variable was not set, using:
/usr/lib/grass83
INFO: Open of `/home/floris/grassdata/nc_basic_spm_grass7/PERMANENT/vector/schools/head'
using driver `OGR_GRASS' successful.
Layer name: schools
Geometry: Point
Feature Count: 167
Extent: (619215.133883, 203559.011362) - (671714.551108, 248159.844411)
Layer SRS WKT:
PROJCRS["unknown",
BASEGEOGCRS["grs80",
DATUM["North American Datum 1983",
ELLIPSOID["Geodetic_Reference_System_1980",6378137,298.257222101,
LENGTHUNIT["metre",1]],
ID["EPSG",6269]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8901]]],
CONVERSION["unnamed",
METHOD["Lambert Conic Conformal (2SP)",
ID["EPSG",9802]],
PARAMETER["Latitude of false origin",33.75,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8821]],
PARAMETER["Longitude of false origin",-79,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8822]],
PARAMETER["Latitude of 1st standard parallel",36.1666666666667,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8823]],
PARAMETER["Latitude of 2nd standard parallel",34.3333333333333,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8824]],
PARAMETER["Easting at false origin",609601.22,
LENGTHUNIT["metre",1],
ID["EPSG",8826]],
PARAMETER["Northing at false origin",0,
LENGTHUNIT["metre",1],
ID["EPSG",8827]]],
CS[Cartesian,2],
AXIS["easting",east,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["northing",north,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]]
Data axis to CRS axis mapping: 1,2
cat: Integer (0.0)
TAG: String (0.0)
NAMESHORT: String (0.0)
NAMELONG: String (0.0)
CORECAPACI: Real (0.0)
MOBILEUNIT: Real (0.0)
MOBILECAPA: Real (0.0)
GLEVEL: String (0.0)
LOGRADE: String (0.0)
HIGRADE: String (0.0)
CALENDAR: String (0.0)
HASBASE: String (0.0)
ISMAGNET: String (0.0)
PHONE: String (0.0)
ADDRNUMBER: String (0.0)
ADDRPREFIX: String (0.0)
ADDRROOT: String (0.0)
ADDRTYPE: String (0.0)
ADDRSUFFIX: String (0.0)
ADDRCITY: String (0.0)
ADDRZIPCOD: String (0.0)
SPED: Real (0.0)
STATUS: String (0.0)
NODEID: String (0.0)
CAPACITYTO: Real (0.0)
ESL: String (0.0)
BOARDDIS2: String (0.0)
PROJ_CAP: Real (0.0)
NOTES: String (0.0)
System specs:
$ ogrinfo --version
GDAL 3.8.4, released 2024/02/08
$
$ apt policy libgdal-grass
libgdal-grass:
Installed: 1:1.0.2-7+jammy3
Candidate: 1:1.0.2-7+jammy3
Version table:
*** 1:1.0.2-7+jammy3 500
500 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu jammy/main amd64 Packages
100 /var/lib/dpkg/status
3.4.1-3 500
500 http://ftp.belnet.be/ubuntu jammy/universe amd64 Packages
$
$ inxi -Sxxx
System:
Host: xxx Kernel: 5.15.0-112-generic x86_64 bits: 64 compiler: gcc
v: 11.4.0 Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33 wm: muffin vt: 7
dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
base: Ubuntu 22.04 jammy
Metadata
Assignees
Labels
No labels