def getShape(shape_id): shape = db.session.query(Shape).filter(Shape.shape_id == shape_id)\ .order_by(Shape.shape_pt_sequence).all() coords = [[pt.shape_pt_lon,pt.shape_pt_lat] for pt in shape] feature = geojson.feature(id=shape_id, feature_type="LineString", coords=coords, properties={}) return jsonify(geojson.featureCollection([feature]))
def getShape(shape_id): shape = ShapePath.query.get(shape_id) feature = geojson.feature(id=shape_id, feature_type="LineString", coords=shape.shape_path_array, properties={}) return jsonify(geojson.featureCollection([feature]))