GIS4DEV / GIS4DEV.github.io

Open Source GIScience & GIS for Development
1 stars 12 forks source link

Save Ben and Robbie #2

Closed rmkelley closed 4 years ago

rmkelley commented 5 years ago

When you use astext(st_x()) or y it returns nothing even though just st_x was previously returning a float. Any ideas for why?

josephholler commented 5 years ago

The ST_x() and ST_y() functions take the input of a point geometry and give you a decimal number for the x-coordinate or the y-coordinate. Check out the functions guide for SpatiaLite.

astext() takes a geometry input, so that it can translate the geometry data into readable text for you. It doesn't know what to do with a decimal number.