Hi all!
I've a point layer in Spatialite in EPSG32632 system reference.
Then I've added two columns to calculate x, y coordinates in this way
ALTER TABLE points ADD COLUMN X REAL
ALTER TABLE points ADD COLUMN Y REAL
and calculate the coordinates in this way
SELECT load_extension('mod_spatialite');
UPDATE points SET X=ST_X("Geometry") , Y=ST_Y("Geometry")
Now I need to calculate the Lat, Lon values too.
I've tried this:
ALTER TABLE points ADD COLUMN LON REAL;
ALTER TABLE points ADD COLUMN LAT REAL;
UPDATE points SET LON=ST_X(ST_Transform(geometry,4326));
UPDATE points SET LAT=ST_Y(ST_Transform(geometry,4326));
No errors in the execution but if I try
select X,Y,LON,LAT from points;
the result is
492051.358020695|4927339.50750624||
488162.133600385|4919734.42606608||
527761.520720489|4906898.57798871||
so, LON and LAT are empty.
Suggestions? Thank you in advance!
Cesare