GithubHelp home page GithubHelp logo

fences-builder's People

Contributors

dianashk avatar missinglink avatar orangejulius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fences-builder's Issues

Fences CLI

Implement a CLI to allow easy access to all the Fences related functionality

Change admin boundary generation process

Current extracts (geofabrik as well as mapzen) can't be used to generate complete admin boundary data set for the given region. Firstly, the data doesn't contain the lowest levels (i.e. national borders and continents). Second, the data has many missing members for admin boundary relations.

Proposed solution is to filter and extract admin boundaries using the full planet. Then implement an extract generator that takes a bounding box and generates extracts that contain any area that overlaps that box. Therefore, this extract generation process would result in a full stack of admin levels for given area.

  1. convert planet pbf to o5m (~16 minutes)
    osmconvert planet-latest.osm.pbf -o=planet-latest.o5m
  2. filter planet o5m to leave admin boundaries only (~50 minutes)
    osmfilter planet-latest.o5m --keep="boundary=administrative" > planet-latest-admin-boundaries.osm
  3. convert filtered results back to pbf (~5 minutes)
    osmconvert planet-latest-admin-boundaries.osm -o=planet-latest-admin-boundaries.osm.pbf
  4. feed pbf through openstreetmap-polygons (~3.5 hours)
    npm start
  5. run geojson-slicer for a list of bounding boxes and generate extracts for each region
    TBD

Investigate street relations

Export ways and relations tagged with highway and see the quality of the data. Determine if the way data is enough or if we need to expand import pipeline to support relations.

Related to pelias/pelias#52

Cleanup and normalize admin boundary properties

Cleanup and normalize admin boundary properties.

  • Set name to name:en, where available
  • Remove uncommon/unimportant tags
  • Provide stats per admin level (err, areas, average number of tags)
  • Identify and decide what to do with admin_level values in "other"

Process exits with 0 exit status on OOM

Test case:

  • attempt to process the planet with max memory limit set very low (e.g. 1024)
  • process will fail to successfully output any extract data, but on exit querying the exit code (echo $?) shows success: 0.

Process should exit with non-zero exit status on failure.

Non-numeric admin levels should be grouped into "other"

Admin levels with problematic characters are causing the process to choke.

Here's what happened when admin_level was set to Village/Desa (it tried to create a new directory in output dir)

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
Error: ENOENT, open '/mnt/poly/output/indonesia-latest.osm.pbf-level-Village/Desa.geojson'

Process coastlines differently

There are many errors about name tags missing for coastline areas. Maybe just set name to "coastline"? These could also go into a separate file, if it makes sense to break them out since they aren't administrative, but rather natural.

{
  "message": "Area is missing a name tag",
  "data": {
    "type":"Feature",
    "properties": {
      "natural":"coastline",
      "boundary":"administrative",
      "admin_level":"4"
    }
  }
}

Use TIGER name tag where name isn't found

There are many errors that show up in the extract for missing name tag for TIGER data. Implement a way to specify alternate name tags, ordered by priority.

example:

{
  "message": "Area is missing a name tag",
  "data": {
  "type": "Feature",
    "properties": {
      "is_in": "USA, Alabama",
      "place":"town",
      "source": "TIGER/Line® 2008 Place Shapefiles (http://www.census.gov/geo/www/tiger/)",
      "boundary": "administrative",
      "tiger:CPI": "N",
      "wikipedia": "Somerville,_Alabama",
      "created_by":"polyshp2osm-multipoly",
      "place_name": "Somerville",
      "tiger:LSAD": "43",
      "tiger:NAME": "Somerville",
      "admin_level": "8",
      "border_type":"town",
      "is_in:state": "Alabama",
      "tiger:MTFCC": "G4110",
      "is_in:country": "USA",
      "tiger:CLASSFP": "C1",
      "tiger:PCICBSA":"N",
      "tiger:PLACEFP": "71496",
      "tiger:PLACENS": "02407365",
      "tiger:PLCIDFP": "0171496",
      "tiger:STATEFP": "01",
      "tiger:FUNCSTAT":"A",
      "tiger:NAMELSAD": "Somerville town",
      "tiger:PCINECTA": "N",
      "tiger:reviewed": "no",
      "is_in:iso_3166_2": "US:AL",
      "is_in:state_code":"AL",
      "is_in:country_code": "US"
    }
  }
}  

use "tiger:NAME": "Somerville" as a replacement for name.

US national border missing in admin_level=2 file

Figure out why the national border for US is missing. When filtering with osmfilter and then converting to geojson using ogr2ogr, I get an error about too many tags on that object.

  1. Add sanity checks for errors, like looking up which relations/ways became actual areas and why the others failed to.
  2. Expose the errors, along with some explanation as to why they failed.

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.