[Qgis-user] Problems adding Vector Shape from MYSQL

Javier Mateos Najari javier.mateos at ignisenergia.es
Fri Dec 6 04:30:53 PST 2019


Hello everyone, Im currently using QGIS Desktop 3.4.13 and I'm trying to add a vector layer connected with MySQL to my Project. After setting all paramters of database and connecting succesfully, I tried to add some points within the vector layer. When I save changes in the layer I get this  message:

Could not apply changes to MySQL layer: qgis, host = LocalHost, port = 3306 authcfg = 'w6u75gp' points

Errors: ERROR: 1 spatial object has not been added.
Supplier errors:
OGR error when creating object -4: MySQL error message: SRID value is out of range in 'st_geomfromtext' Description: INSERT INTO `points` (` pointscol`, `idpoints`) VALUES (ST_GeomFromText ('POINT (-5.15748180042588 41.4380033714209 ) ', - 2), 5)

I tried to add this SQL sentence into my database through MySQL workbench and it worked after change -2 value to 4326, which is the correct src for my project.  I don't know why Im getting that value if I properly set my project SRC and vector layer SRC.

I hope you got enough information to know what is the problem.

Thank you so much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20191206/d6ca5309/attachment.html>


More information about the Qgis-user mailing list