rgeo / activerecord-spatialite-adapter

ActiveRecord connection adapter for SpatiaLite, based on sqlite3 and rgeo
11 stars 14 forks source link

Válvulas.Geometry violates Geometry constraint [geom-type or SRID not allowed] #10

Open mariano9898 opened 7 years ago

mariano9898 commented 7 years ago

Hi! I'have a problem when I want import some shapefiles into the Spatialite, this process I do it in Qgis directly with plugin Qspatialite. Somebody know what I do wrong?

Thanks a lot! The error is here: 2017-08-04T11:13:53 1 Traceback (most recent call last): File "C:/Users/Mariano/.qgis2/python/plugins\QspatiaLite\importQgis\importQgis.py", line 64, in run if not self.parent.db.uploadQgisVectorLayer(layer, tableName=self.tablenames[i], srid=self.srid, selected=self.selected): File "C:/Users/Mariano/.qgis2/python/plugins\QspatiaLite\Classes\Database.py", line 291, in uploadQgisVectorLayer header,data=self.executeQuery("""INSERT INTO "%s" VALUES (%s,%s)"""%(tableName,','.join([unicode(value).encode('utf-8') for value in values_auto]),','.join('?'*len(values_perso))),tuple([unicode(value) for value in values_perso])) File "C:/Users/Mariano/.qgis2/python/plugins\QspatiaLite\Classes\Database.py", line 51, in executeQuery cursor.execute(query,params) IntegrityError: Válvulas.Geometry violates Geometry constraint [geom-type or SRID not allowed]