Skip to content
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

GeoJSON detected as CSV #17

Closed
sgillies opened this issue Jul 24, 2014 · 2 comments
Closed

GeoJSON detected as CSV #17

sgillies opened this issue Jul 24, 2014 · 2 comments
Labels

Comments

@sgillies
Copy link
Contributor

This GeoJSON document https://gist.github.com/sgillies/09372dc03a5b68481f5d is detected as CSV.

$  node runModule.js
You must first edit 'runModule.js' for it to complete: add your filepath and uncomment.
Mapnik LOG> 2014-07-24 16:00:28: CSV Plugin: expected well known text geometry: could not parse row 2,column 36272 - found: '{geometry: {coordinates: [[[-106.523437'
Mapnik LOG> 2014-07-24 16:00:28: CSV Plugin: could not read WKT or GeoJSON geometry for line 2 - found 66511 with values like: {"bbox": [-106.523437, 39.571822, 
...

Metadata returned!
{ filesize: 874901,
  projection: '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs',
  filename: 'shade',
  center: [ -0.5, -0.5 ],
  extent: [ -1, -1, 0, 0 ],
  json: { vector_layers: [ [Object] ] },
  minzoom: 0,
  maxzoom: 14,
  layers: [ 'shade' ],
  dstype: 'csv',
  filetype: '.csv' }

Is mapnik-omnivore sensitive to the order of JSON items? Requires a leading "type": "FeatureCollection"?

@sgillies sgillies added the bug label Jul 24, 2014
@tmcw
Copy link
Contributor

tmcw commented Jul 24, 2014

It looks for a type early on: https://github.com/mapbox/mapnik-omnivore/blob/master/index.js#L59

Not exactly industrial-strength, but it could look for a { as the first non-whitespace character instead

@sgillies
Copy link
Contributor Author

@tmcw thanks for pointer. I'm on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants