Skip to content

Instantly share code, notes, and snippets.

@adriantre
adriantre / query.txt
Created December 2, 2016 14:06
Klipp rundt trondheim
delete from table where id not in
(
select id from table where ST_Contains(
ST_MakePolygon(
ST_GeomFromText('LINESTRING(10.4588 63.4419, 10.4588 63.4018, 10.3496 63.4018, 10.3496 63.4419, 10.4588 63.4419)',4326)
),
geometryfield
)
);
function updateMap() {
var oldLayerGroup = L.layerGroup();
map.eachLayer(function (layer) {
if (layer instanceof L.GeoJSON) {
oldLayerGroup.addLayer(layer);
}
});
getActiveDataLayers();
clean_map(oldLayerGroup);