microsoft / microsoft/GlobalMLBuildingFootprints

Mexico full data process finds general poor detection. 43% of urban blocks has no buildingFootprints.

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
277
PR merge metrics
No merged PRs in 30d

Description

Mexico data process

Mexico full data process reports general poor detection and null buildings structures detection on 43% of urban blocks.


  • Load info prom INEGI's state & municipal polygons
    • /Applications/Postgres.app/Contents/Versions/13/bin/ogr2ogr -f "PostgreSQL" PG:"dbname=dbname user=user" /Volumes/PROJECT_DATA/INEGI/CARTOGRAFIA/2020/MARCO_GEOESTADISTICO_CENSO2020/889463807469_s/MG_2020_Integrado/munici/mexmun.geojsonl -nln mexshpmun
    • less than a minute
  • INEGI's state & municipal geo information is the basic area division

  • Create centroids for each polygon buildings
    • create table mexicobldscen as ( SELECT ogc_fid, ST_centroid(wkb_geometry) as centroide FROM mexicoblds );
    • 2 minutes

  • Assign municipal and state code to each polygon building via centroids
    • create table mexicoblds_mun as (
      select a.ogc_fid, a.centroide,
      b.cvegeo,
      b.cve_ent,
      b.cve_mun,
      b.nomgeo,
      c.wkb_geometry
      from mexicobldscen a
      inner join mexshpmun b
      on ST_Intersects(a.centroide, b.wkb_geometry)
      inner join mexicoblds c
      on a.ogc_fid = c.ogc_fid);
    • 35 minutes
    • Municipal and State code produces a rich Geo_object for easy public's data query.

  • Let's try something complex: Assign state, municipal and zip codes via centroid
    • create table mex_bld_mun_cp as (
      select a.ogc_fid, a.centroide,
      b.cvegeo,
      b.cve_ent,
      b.cve_mun,
      b.nomgeo,
      d.cp,
      c.wkb_geometry
      from mexicobldscen a
      inner join mexshpmun b
      on ST_Intersects(a.centroide, b.wkb_geometry)
      inner join mexicoblds c
      on a.ogc_fid = c.ogc_fid
      left outer join mexcodpos d
      on ST_Intersects(a.centroide, d.wkb_geometry));
    • 1 hour and 8 minutes
    • The new data can respond queries by State, municipal or ZIP codes.

  • Let's try assign the smaller INEGI's geo polygon representations:
    - Localidades - urban areas -
    - AGEBS - Geo Statistical Basic Areas
    - Manzana Urbana - Blocks
    • create table mex_bld_mun_cp_mza as (
      select
      a.ogc_fid,
      a.centroide,
      m.cvegeo,
      m.cve_ent,
      m.cve_mun,
      m.cve_loc,
      m.cve_ageb,
      m.cve_mza,
      m.ambito,
      m.tipomza,
      a.cp,
      a.wkb_geometry
      from mex_bld_mun_cp a
      inner join mexmza m
      on ST_Intersects(a.centroide, m.wkb_geometry) );
  • 47 minutes (recycle previous process)

Results

Poor buildings footprints detection in most urban areas in Mexico.
Data reports 23,769,529 buildings footprints.
There are 19,356,595 buildings footprints detected in 1,367,908 INEGI´s urban blocks.
4,412,934 buildings footprints can not be assigned to geo urban blocks.
1,062,208 INEGI´s urban blocks has no buildings footprints.
The buildings footprints process detection do not report urban structures on 43.7% of geo urban blocks.
No accuracy evaluation was performed in this excercise.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Mexico.zip import and the documented PostGIS queries against the INEGI polygon tables. Compare the 43.7% of urban blocks without footprints with the source data and query results. Before implementation, clarify whether the expected outcome is improved detection, corrected geographic assignment, or better reporting of missing buildings.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
data, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.