
def read(fp, prop_map, source_filename=None):
    """Read GeoJSON file.

    :param fp: file-like object
    :param prop_map: dictionary mapping source properties to output properties
    :param source_filename: Filename to read, only applicable if fp is a zip file
    """
    return {}

@@ -1,8 +1,130 @@
+import os%0Aimport tempfile%0Aimport shutil%0A%0Afrom utils import get_compressed_file_wrapper%0A%0Aimport fiona%0Aimport fiona_dataset%0A
 %0Adef rea
@@ -138,16 +138,31 @@
 rop_map,
+ filterer=None,
  source_
@@ -174,16 +174,33 @@
 ame=None
+, layer_name=None
 ):%0A    %22
@@ -210,15 +210,15 @@
 ead 
-GeoJSON
+geojson
  fil
@@ -430,14 +430,1146 @@
     
-return %7B%7D
+filename = os.path.basename(fp.name)%0A    root, ext = os.path.splitext(filename)%0A%0A    unzip_dir = tempfile.mkdtemp()%0A    %0A    if ext == %22.geojson%22 or ext == %22.json%22:%0A        file_to_process = fp.name%0A    else:%0A    #search for a geojson file in the zip file, unzip if found%0A        shp_name = source_filename%0A        zipped_file = get_compressed_file_wrapper(fp.name)%0A%0A        if shp_name is None:%0A            for name in zipped_file.infolist():%0A                base, ext = os.path.splitext(name.filename)%0A                if ext == %22.geojson%22:%0A                    if shp_name is not None:%0A                        raise Exception(%22Found multiple shapefiles in zipfile%22)%0A                    shp_name = name.filename%0A%0A            if shp_name is None:%0A                raise Exception(%22Found 0 shapefiles in zipfile%22)%0A%0A        zipped_file.extractall(unzip_dir)%0A        zipped_file.close()%0A        file_to_process = os.path.join(unzip_dir, shp_name)%0A%0A    #Open the shapefile%0A    with fiona.open(file_to_process) as source:%0A        collection = fiona_dataset.read_fiona(source, prop_map, filterer)%0A%0A    shutil.rmtree(unzip_dir)%0A%0A    return collection
 %0A

Add a new adapter for geojson sources