Giter Club home page Giter Club logo

Comments (7)

Peter-Gabel avatar Peter-Gabel commented on June 7, 2024 1

from ogr2ogr.

wavded avatar wavded commented on June 7, 2024

@danielrasmuson I'm unable to duplicate using latest Node v6 or v7. I get the following response:

{ type: 'FeatureCollection',
  crs:
   { type: 'name',
     properties: { name: 'urn:ogc:def:crs:EPSG::3857' } },
  features: [ { type: 'Feature', properties: [Object], geometry: [Object] } ] }

What version of ogr2ogr are you running? ogr2ogr --version

from ogr2ogr.

Peter-Gabel avatar Peter-Gabel commented on June 7, 2024

I had the very same problem. It appears that the generation of the GeoJSON FeatureCollection does NOT buffer the way you might expect. I was expecting that I could grab each feature by stripping off the beginning lines (denoting the FC) and get line-by-line features with a trailing comma. Most of the time that works but occasionally a line does not contain a complete feature for conversion to an object.

As a test, I have been converting Census.gov Zip code geometry files (ZCTA5 500K). These are large enough that every 2 or three attempts the error occurs.

My solution was to stream the output of ogr2ogr to a file. Then I read in the file line-by-line, stripping off the beginning and commas at the end of lines (except for the last feature). It's inelegant that I need to write and then read a file, but it seems to be a reliable solution.

ogr2ogr --version
GDAL 1.11.4, released 2016/01/25

I'd love to hear of a better solution.

from ogr2ogr.

broncha avatar broncha commented on June 7, 2024

I am getting this now. But it's not consistent. Sometimes it just works, and sometimes it throws this exception.

from ogr2ogr.

wavded avatar wavded commented on June 7, 2024

Closing due to age, reopen if issue persists.

from ogr2ogr.

Peter-Gabel avatar Peter-Gabel commented on June 7, 2024

from ogr2ogr.

wavded avatar wavded commented on June 7, 2024

Is this still an issue for you @Peter-Gabel? Feel free to reopen if so. Providing sample code that fails would help for me to address it. And if you have an insight into a fix from your testing, a PR would also be welcome.

As the sole maintainer of this project, closing old, possibly irrelevant, issues helps me keep my task list organized but I want to leave the option open for the asker to reopen if it indeed is still relevant and should be attended to. Other maintainers automate this with bots, which I may consider in the future so it's not personal. Feel free to let me know if you have other ideas.

from ogr2ogr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.