view flys-backend/contrib/shpimporter/utils.py @ 4402:c84630d544a1

Get rid of HorizontalLayout in MapOutputTab and use manual resizing. The OpenLayers Map widget is now resized and positioned manually by a ResizeHandler method. The automatic HorizontalLayout was obviously broken in combination with the OpenLayers widget. This should fix various layout issues with the OpenLayers Map.
author Christian Lins <christian.lins@intevation.de>
date Mon, 05 Nov 2012 15:17:58 +0100
parents 59ca5dab2782
children b1d7e600b43b
line wrap: on
line source
import os
from shpimporter import DEBUG, INFO, ERROR

SHP='.shp'

def findShapefiles(path):
    shapes = []

    for root, dirs, files in os.walk(path):
        if len(files) == 0:
            continue

        DEBUG("Processing directory '%s' with %i files " % (root, len(files)))

        for f in files:
            idx = f.find(SHP)
            if (idx+len(SHP)) == len(f):
                shapes.append((f.replace(SHP, ''), root + "/" + f))

    return shapes

http://dive4elements.wald.intevation.org