Skip to content

Unable to parse empty GeoJSON FeatureCollection to Datasource #3463

@davidtheclark

Description

@davidtheclark

I'm trying to create a Datasource from a GeoJSON file with no features, and Mapnik is saying that it can't parse that valid GeoJSON.

Looks like the error that throws originates here:

else throw mapnik::datasource_exception("geojson_datasource: Failed to parse GeoJSON file '" + filename_ + "'");

And through node-mapnik it comes out to me like this: Error: geojson_datasource: Failed to parse GeoJSON file ...

The file I've been trying just looks like this:

{
  "type": "FeatureCollection",
  "features": []
}

cc @mapsam and @jakepruitt, who chatted with me about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions