Help serializing a postGIS query to geojson

المشرف العام

Administrator
طاقم الإدارة
I have a query which I would like to serialize to geoJSON:

select article_title, pub_date, city, geom from article, location where article.id = location.id; I can serialize the geom field easily enough with:

select st_asgeojson(geom) from location; and the fields from article with:

select row_to_json(t) from(select article_title, pub_date from article) t; The problem is I can't find a way to serialize properly to geojson from both the article and location fields. Can anyone help me with this? Let me know if you need any more details. Thanks in advance!



أكثر...
 
أعلى