docs: def validate(data, skiperrors=False, fixerrors=True):
      """Checks that the geojson data is a feature collection, that it
      contains a proper "features" attribute, and that all features are valid too.
      Returns True if all goes well.
  
      - skiperrors will throw away any features that fail to validate.
      - fixerrors will attempt to auto fix any minor errors without raising exceptions.
      """
  
      if not "type" in data:
          if fixerrors:
              data["type"] = "FeatureCollection"
          else:
              raise ValueError("The geojson data needs to have a type key")
      if not data["type"] == "FeatureCollection":
          if fixerrors:
              data["type"] = "FeatureCollection"
          else:
              raise ValueError("The geojson data needs to be a feature collection")
      if "features" in data:
          if not isinstance(data["features"], list):
              raise ValueError("The features property needs to be a list")
      else: raise ValueError("The FeatureCollection needs to contain a 'features' property")
  
      if skiperrors:
          for featuredict in data["features"]:
              feat = Feature(featuredict)
              try: feat.validate(fixerrors)
              except: data["features"].remove(featuredict)
  
      else:
          for featuredict in data["features"]:
              feat = Feature(featuredict)
              feat.validate(fixerrors) 
  
      return True