[GRASS-user] Duplicated CAT during import

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.
Importing a shapefile with a simple
v.in.ogr dsn=/home/paolo/test_import.shp output=test_import_min snap=-1
min_area=0.0001 -o
results in a grass layer with duplicated CAT: is this a correct behaviour?
I'm encountering problems with subsequent v.overlay, and I suspect duplicated CATs
may be the cause.
Thanks for any hint.
- --
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlIgSWkACgkQ/NedwLUzIr5JIQCglDS55zlC+93V94ehDIXUlvIM
IPUAn3LRG81o7V7DugbQy6qcNoTYkhVh
=DVP1
-----END PGP SIGNATURE-----

On Fri, Aug 30, 2013 at 9:27 AM, Paolo Cavallini <cavallini@faunalia.it> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.
Importing a shapefile with a simple
v.in.ogr dsn=/home/paolo/test_import.shp output=test_import_min snap=-1
min_area=0.0001 -o
results in a grass layer with duplicated CAT: is this a correct behaviour?

No, it should issue an error message.

I'm encountering problems with subsequent v.overlay, and I suspect duplicated CATs
may be the cause.

can you please post the relevant column info output of "ogrinfo yourmap"?

Markus

Thanks for any hint.
- --
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlIgSWkACgkQ/NedwLUzIr5JIQCglDS55zlC+93V94ehDIXUlvIM
IPUAn3LRG81o7V7DugbQy6qcNoTYkhVh
=DVP1
-----END PGP SIGNATURE-----
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 31/08/2013 14:04, Markus Neteler ha scritto:

I'm encountering problems with subsequent v.overlay, and I suspect duplicated CATs
may be the cause.

can you please post the relevant column info output of "ogrinfo yourmap"?

which map? The original before import? Here it is:

Layer name: test_import
Geometry: Polygon
Feature Count: 2
Extent: (1570773.587980, 4879203.434159) - (1579628.292941, 4890270.180298)
Layer SRS WKT:
PROJCS["Monte_Mario_Italy_zone_1",
    GEOGCS["GCS_Monte Mario",
        DATUM["Monte_Mario",
            SPHEROID["International_1924",6378388,297]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
COD_COMPON: String (6.0)
COMPONENTE: String (200.0)
COD_SUB_CO: String (10.0)
SUB_COMPON: String (200.0)
NUM_ELEMEN: String (4.0)
NUM_SIST_E: Integer (10.0)
NUM_TAV: Real (24.5)
NORMA: String (200.0)
SCHEDA: String (200.0)
ID1: Integer (10.0)
OGRFeature(test_import):0
  COD_COMPON (String) = LAG
  COMPONENTE (String) = LIGURIA AGRICOLA
  COD_SUB_CO (String) = AGR
  SUB_COMPON (String) = AREE AGRICOLE
  NUM_ELEMEN (String) = (null)
  NUM_SIST_E (Integer) = (null)
  NUM_TAV (Real) = 51.00000
  NORMA (String) = \\rivu\dtuff\img\ptr\norme\LAG.pdf
  SCHEDA (String) = (null)
  ID1 (Integer) = 5
  MULTIPOLYGON (...

Thanks.
- --
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlIiIqEACgkQ/NedwLUzIr54EgCgpBce4LzxuHWJhkx/TgwSyL2k
VdIAniscwHf88szQsgLxIqtNPXoRFvEi
=Zj+c
-----END PGP SIGNATURE-----

On Sat, Aug 31, 2013 at 7:06 PM, Paolo Cavallini <cavallini@faunalia.it> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 31/08/2013 14:04, Markus Neteler ha scritto:

I'm encountering problems with subsequent v.overlay, and I suspect duplicated CATs
may be the cause.

can you please post the relevant column info output of "ogrinfo yourmap"?

which map? The original before import?

Yes.

Here it is:

Layer name: test_import
Geometry: Polygon
Feature Count: 2

...

COD_COMPON: String (6.0)
COMPONENTE: String (200.0)
COD_SUB_CO: String (10.0)
SUB_COMPON: String (200.0)
NUM_ELEMEN: String (4.0)
NUM_SIST_E: Integer (10.0)
NUM_TAV: Real (24.5)
NORMA: String (200.0)
SCHEDA: String (200.0)
ID1: Integer (10.0)

I don't see any existing "cat" column there.
What should be duplicated?

Markus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 31/08/2013 19:09, Markus Neteler ha scritto:

I don't see any existing "cat" column there.
What should be duplicated?

sorry I was unclear: I'm talking about duplicate records in the (grass generated) cat
columns.
All the best, and thanks.

- --
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlIiJGYACgkQ/NedwLUzIr6BPwCfSTSDIyf4wdDQQzIPW55bkfns
s2sAn1NH3bk+AH+v5/QFOCPf18YEkjF8
=21tc
-----END PGP SIGNATURE-----

On Sat, Aug 31, 2013 at 7:14 PM, Paolo Cavallini <cavallini@faunalia.it> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 31/08/2013 19:09, Markus Neteler ha scritto:

I don't see any existing "cat" column there.
What should be duplicated?

sorry I was unclear: I'm talking about duplicate records in the (grass generated) cat
columns.

To my knowledge not possible when importing a SHAPE file since each
row creates a new category value in the conversion from Simple
Features to topology.

You may check the cat column with v.db.select.

best
Markus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 31/08/2013 19:22, Markus Neteler ha scritto:

To my knowledge not possible when importing a SHAPE file since each
row creates a new category value in the conversion from Simple
Features to topology.

Yes, that's also my interpretation.

You may check the cat column with v.db.select.

v.db.select map=test_import0@alessandra layer=1 columns=cat "fs=|"
cat
1
2
Operazione conclusa con successo

So, apparently it is just QGIS that displays different polygons with the same CAT as
different rows in the table, but grass correctly see two polygons: correct?

All the best, and thanks.
- --
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlIjBHIACgkQ/NedwLUzIr6wEQCgr34d54ZlcYIilJ195Kcz5a/D
h5YAoJq/YVAB9b4z26wCwCVv/sLnqUWW
=Das3
-----END PGP SIGNATURE-----