geom 获取 featurecollection
把查询出来的geojson包装为 featurecollection
SELECT json_build_object(
'type', 'FeatureCollection',
'features', json_agg(ST_AsGeoJSON(by.*)::json)
)
FROM (select geom,gid from risk_census_city_house LIMIT 10) by ;
大致代码
也能用 arcmap 把shp转换为geojson 但是不能选字段
mapshaper 这个网站也可以 方法还是挺多的

浙公网安备 33010602011771号