geometry output NULL

28 vues
Accéder directement au premier message non lu

Tara

non lue,
18 nov. 2017, 11:10:4718/11/2017
à SpatiaLite Users
Hello,

I am trying following query:

SELECT AsGeoJSON(ST_GeomFromText(a.geometry)) as geometry, a.name, a.node_id
        FROM my_points
        AS a
        WHERE Contains(Buffer(GeomFromText('POINT(1007069.1726977603 6194484.57197054)', 3857), 90), a.geometry);

However the output of my geometry column in NULL instead of getting an GeoJson geometry type. Does anyone now what do I have to do?

mj10777

non lue,
18 nov. 2017, 11:17:1718/11/2017
à SpatiaLite Users
The geometry column is null because because it is not a geometry (a.geometry is a geometry)
ST_GeomFromText(a.geometry) : is a Text representation of a.geometry
AsGeoJSON(ST_GeomFromText(a.geometry)) causes an error (your NULL)

Does anyone now what do I have to do?
- AsGeoJSON(a.geometry) will give the GeoJSON-Text representation of a.geometry

Hope this helps,

Mark

Tara

non lue,
18 nov. 2017, 11:28:1618/11/2017
à SpatiaLite Users
cool thanks it worked!
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message