tyrasd / osmtogeojson

convert osm to geojson
http://tyrasd.github.io/osmtogeojson/
MIT License
683 stars 112 forks source link

Typings don't conform to the latest version of geojson typings 7946.0.4 #98

Closed tylkomat closed 6 years ago

tylkomat commented 6 years ago

I receive the following error in typescript for the latest version of geojson typings 7946.0.4:

Type 'FeatureCollection<GeometryObject, any>' is not assignable to type 'GeoJSON.FeatureCollection<GeoJSON.GeometryObject, any>'.
    Types of property 'features' are incompatible.
      Type 'Feature<GeometryObject, any>[]' is not assignable to type 'GeoJSON.Feature<GeoJSON.GeometryObject, any>[]'.
        Type 'Feature<GeometryObject, any>' is not assignable to type 'GeoJSON.Feature<GeoJSON.GeometryObject, any>'.
          Types of property 'geometry' are incompatible.
            Type 'GeometryObject' is not assignable to type 'GeoJSON.GeometryObject'.
              Type 'DirectGeometryObject' is not assignable to type 'GeometryObject'.
                Types of property 'type' are incompatible.
                  Type 'string' is not assignable to type 'GeoJsonGeometryTypes'
tylkomat commented 6 years ago

The type property value has to be one of: "Point", "LineString", "MultiPoint", "Polygon", "MultiLineString", "MultiPolygon", "GeometryCollection"

tylkomat commented 6 years ago

Sorry, just noticed that you use FeatureCollection and GeometryObject from geojson-rewind. With that it seems to work.