Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
meta.on('row', function (row) {
var query;
var coll;
spatialcol = row.f_geometry_column;
if (geom == "features") {
query = client.query("select st_asgeojson(st_transform(" + spatialcol + ",4326)) as geojson, * from " + fullname + ";");
coll = {
type : "FeatureCollection",
features : []
};
} else if (geom == "geometry") {
query = client.query("select st_asgeojson(st_transform(" + spatialcol + ",4326)) as geojson from " + fullname + ";");
coll = {
type : "GeometryCollection",
geometries : []
};
}
//'meta' code block continues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.