def define_crs(self, type, name=None, link=None, link_type=None):
        """
        Defines the coordinate reference system for the geojson file.
        For link crs, only online urls are currenlty supported
        (no auxilliary crs files).

        Parameters:

        - **type**: The type of crs, either "name" or "link".
        - **name** (optional): The crs name as an OGC formatted crs string (eg "urn:ogc:def:crs:..."), required if type is "name"
        - **link**: The crs online url link address, required if type is "link".
        - **link_type**: The type of crs link, optional if type is "link". 
        """
        if not type in ("name","link"): raise Exception("type must be either 'name' or 'link'")
        crs = self._data["crs"] = {"type":type, "properties":{} }
        if type == "name":
            if not name: raise Exception("name argument must be given")
            crs["properties"]["name"] = name
        elif type == "link":
            if not link: raise Exception("link argument must be given")
            crs["properties"]["href"] = link
            if link_type:
                crs["properties"]["type"] = link_type