-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to parse empty GeoJSON FeatureCollection to Datasource #3463
Comments
32 tasks
@davidtheclark - can you share how exactly you're creating a Datasource (parameters), pls ? Python>>> ds=mapnik.GeoJSON(file="empty.json")
>>> fs = ds.featureset()
>>> type(fs)
<class 'NoneType'> mapnik-indexmapnik-index empty.json
max tree depth:8
split ratio:0.55
processing 'empty.json' as GeoJSON
mapnik-index (GeoJSON) : could not extract bounding boxes from : 'empty.json'
Error: failed to process empty.json both seems reasonable ^ |
Ah, it seems to be tied to whether I use var mapnik = require('mapnik');
var path = require('path');
mapnik.register_default_input_plugins();
// This throws the error "Error: geojson_datasource: Failed to parse GeoJSON file ..."
var x = new mapnik.Datasource({
type: 'geojson',
cache_features: true, // Without this line, though, no error is thrown
file: path.join(__dirname, './test/fixtures/src/no-features.geojson'),
}); I'm using |
Ok, I see, thanks ^ |
artemp
added a commit
that referenced
this issue
Jul 12, 2016
artemp
added a commit
that referenced
this issue
Jul 12, 2016
@davidtheclark - ^ |
Closing here as it has been fixed ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
mapnik/plugins/input/geojson/geojson_datasource.cpp
Line 279 in abe943c
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:
cc @mapsam and @jakepruitt, who chatted with me about this.
The text was updated successfully, but these errors were encountered: