Giter Club home page Giter Club logo

dcbuildings's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcbuildings's Issues

Streets complete?

This is a sidequest as this project is about buildings and addresses, but while we're at it:

Compare OSM streets with latest streets data available from OCTO DC.

What's the right OCTO streets file to use here?

Multipolygon handling

For complex buildings like http://www.openstreetmap.org/browse/relation/1029369 the OSM tag data is saved in the relation. Currently, convert.py does not handle multipolygons; we'll need to devise a way to do that (probably via differences) and programatically create a relation to append the tag data to. This will also be a problem in reverse (managing multipolygons in the planet.osm file to see whether the building already exists in the OSM data).

Add addresses

  • Add address data to buildings where only one address per building
  • Export addresses as separate nodes where there are 2 or more addresses per building

Double check spatial match between addresses and buildings

We're currently just using rtree and a bounding box test to check whether an address location is within a building.

This is likely too coarse, leading to many false positives.

  • Double check whether we have indeed many false positives
  • Add a point in polygon test after the bounding box test before associating an address with a building

Duplicate nodes

Running validation on JOSM results in "Duplicated nodes" errors.

The DC building dataset has many instances where two points sit in the exactly same location.

  • merge nodes with equal locations

Generate importable .osm files

Generate .osm files chunked by census tracts (or similar). These files can then be loaded up in JOSM, reviewed and copied bit by bit into OpenStreetMap. They should be as clean as possible (well formatted tags, address nodes where more than one address per building) and not contain any existing buildings.

Help from DC GIO?

So at the last MappingDC happy hour a guy who works for the new DC GIO Tim Abdella was there and said he was sent to see how their office could help contribute to OSM. I figured I'd relay the message in case you guys needed anything else from DC as it looks like you're pushing forward with the import.

Attribute review

The script currently only populates addr:housenumber and addr:street

  • Import GIS_ID -> dcgis:gis_id? Previous imports included this.
  • Import addr:city and ZIPCODE -> addr:postcode? Previous imports did not include this.
  • Make sure we're fine to not import or populate dcgis:captureyear, dcgis:lot, dcgis:square, source=dcgis, dataset=buildings

Example: building attributes from a previous import


Example: address attributes from a previous import

Merge building.osm and address.osm

There's no reason to export separate building and address.osm files. Merge them into one building.osm file containing buildings with addresses and separate address points.

Some odd multipolygons

@ajashton reported:

There are some odd multipolygons being created for some of the rowhouses:

screenshot from 2013-08-05 17-08-16

The courtyardish area is incorrectly being added as a second 'outer' polygon - it should not be included at all, and there shouldn't be a need for a multipolygon.

Needs further investigation. Here's what I suspect:

  1. Original dataset oddly includes 'void' polygons for empty spaces enclosed by two buildings (!)
  2. convert.js uses intersects() to test for a match between a void polygon and a building, delivering a positive on a polygon on such void spaces. (I couldn't get within() to work properly)

How are buildings that are intersected by block boundaries handled ?

I noticed in a dataset I've been experimenting with that census block group boundaries can intersect building geometry, so that a simple intersection check will generate duplicate buildings at those boundaries, as those cases intersect multiple block groups.

I dealt with this by assigning buildings to a block group via contains, which does not report intersecting geometries. I then used an intersection checks; which assigns all buildings not picked up by contains to a single block group.

query addresses/buildings into separate by census tract

@lxbarth had a poorly fleshed-out thought on the way to work this morning.

The address data contains a field for the census tract that each address lies inside of. Using psycopg, we could potentially

  1. write a query that returned all the addresses in one census tract
  2. read the resultant table into memory and join against buildings (also in memory)
  3. repeat steps 1 and 2 for each census tract

This way we only have to read 1 census tract's worth of address into memory to perform the spatial join against the building data set.

Thoughts?

Review address formatting

Address formatting needs a review:

dcbuildings/convert.py

Lines 60 to 68 in 8c5a4df

def appendAddress(address, element):
if 'ADDRNUM' in address:
element.append(etree.Element('tag', k = 'addr:housenumber', v = str(address['ADDRNUM'])))
if all (k in address for k in ('STNAME', 'STREET_TYP', 'QUADRANT')):
street = "%s %s %s" % \
(address['STNAME'].title(), # TODO: turns 42nd into 42Nd
address['STREET_TYP'].title(),
address['QUADRANT'])
element.append(etree.Element('tag', k = 'addr:street', v = street))

Also see #8

Addresses complete?

Compare addresses in OSM to latest address file OCTO DC. Compile a list of addresses missing in OSM ready to be used for mapping in OSM XML format.

What's the right OCTO address file to use here?

Upload user account

WIth multiple individuals reviewing and uploading data, should we:

  1. Have one upload account per individual?
  2. One upload account for the import effort that we share between individuals?

Addresses are missing city, state and country tags

Pardon me if this was decidedly not included in the import. It seems that many of the data are missing the addr:city key, as well as addr:state=DC debatable and addr:country=US. To observe these issues, either use Unvollständige Adressen or run this query on Overpass Turbo:

<osm-script output="json" timeout="25">
  <!-- gather results -->
  <union>
    <query type="node">
      <has-kv k="addr:housenumber"/>
      <has-kv k="addr:city" modv="not" regv="."/>
      <bbox-query {{bbox}}/>
    </query>
    <query type="way">
      <has-kv k="addr:housenumber"/>
      <has-kv k="addr:city" modv="not" regv="."/>
      <bbox-query {{bbox}}/>
    </query>
    <query type="relation">
      <has-kv k="addr:housenumber"/>
      <has-kv k="addr:city" modv="not" regv="."/>
      <bbox-query {{bbox}}/>
    </query>
  </union>
  <!-- print results -->
  <print mode="body"/>
  <recurse type="down"/>
  <print mode="skeleton" order="quadtile"/>
</osm-script>

Include dc:gis

  • Include dc:gis id on building footprints. @ericfischer's work with automated TIGER updates shows how these ids are useful to map outside information to OSM and use it later for updates.

This was discussed and agreed on in the imports-us Google hangout on Monday Aug 5.

Consider including separated street name information

Since the shapefile for the addresses includes information about the parts of the street name, consider including that in the OSM data too.

I did this in Chicago. Not sure if it's particularly useful yet, but I figure why lose some information about the street name by only including the merged name.

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.