Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
app.get('/leonardtown/buildings/:geom', function (req, res, next) {
var client = new pg.Client(app.conString);
var geom = req.params.geom.toLowerCase();
if ((geom != "features") && (geom != "geometry")) {
res.status(404).send("Resource '" + geom + "' not found");
return;
}
var tablename = "leonardtown_bldgs";
var schemaname = "public";
var fullname = schemaname + "." + tablename;
var spatialcol = "";
var proptype = req.query.type;
var whereclause = ";";
if (typeof proptype != "undefined") {
if (proptype.toLowerCase() != "all") {
whereclause = " where structure_ = '" + proptype + "';";
}
}
var coll;
var sql = "";
//logic continues from here
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.