Giter VIP home page Giter VIP logo

Comments (8)

drStacky avatar drStacky commented on July 28, 2024 3

Python will take forever to parse a file that size. I'm sure there's a more elegant way to do this, but I used a BASH command from the terminal that completed in a relatively short time.

cat incorrect.geojsonl | cut -c 44- | sed 's/]}$//' > correct.geojsonl

Now can someone at Microsoft do this to all the files and upload them again, please?

from kenyanigeriabuildingfootprints.

denironyx avatar denironyx commented on July 28, 2024 1

I noticed a similar mistake @drStacky.

from kenyanigeriabuildingfootprints.

drnextgis avatar drnextgis commented on July 28, 2024 1

It seems GDAL only supports sequences of GeoJSON features (not feature collections). But the original dataset (data.njson) can be easily transformed to a proper one (output.njson):

import json
with open("data.njson", "rt") as src:
    with open("output.njson", "w") as dst:
        for row in src:
            fc = json.loads(row)
            for f in fc["features"]:
                json.dump(f, dst)
                dst.write("\n")

from kenyanigeriabuildingfootprints.

andwoi avatar andwoi commented on July 28, 2024 1

Thanks for notifying us. Both Kenya and Nigeria were updated today and can be found in the same locations.

from kenyanigeriabuildingfootprints.

jeafreezy avatar jeafreezy commented on July 28, 2024

+1 @drStacky @denironyx

from kenyanigeriabuildingfootprints.

jeafreezy avatar jeafreezy commented on July 28, 2024

I have a similar script that is currently taking forever to run.

Please how long does this script take you? @drnextgis

from kenyanigeriabuildingfootprints.

simgislab avatar simgislab commented on July 28, 2024

@drnextgis script is pretty good, kenya file takes around 30 min to run on a regular server, nigeria is longer, but overnight would be ok

it's a one time conversion after all

from kenyanigeriabuildingfootprints.

jeafreezy avatar jeafreezy commented on July 28, 2024

Yeah, it's a nice script. Nigeria took me about 1hr on 16gig ram windows 11 1TD SSD. Thanks @drStacky

from kenyanigeriabuildingfootprints.

Related Issues (1)

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.