카테고리 없음 2023. 3. 3. 03:26
  1. Download parcel_05_06_2022.zip from https://downloads.hcpafl.org/
  2. Extract a shape file (.shp)
  3. Run QGIS to see / verify data / display all on a map / view ("Open attribute table")
  4. Check _DOR_Code_List.xlsx to see which parcel type of the shape are housing types (single house, condo, townhouse) and other types
    1. residential housing types: single house, condo, townhouse, etc.
    2. shopping places: malls, grocery stores
    3. restaurants
    4. schools (k-6, middle, high, college) - may need to differentiate "public" / "private"
    5. workplaces
    6. worship
    7. hospital, grocery, bank
    8. (Previous python simulator's input location types):
      • > db.LG.distinct("properties.type")
        [
                "bank",
                "grocery",
                "hospital",
                "house",
                "mall",
                "outdoor",
                "restaurant",
                "school",
                "workplace",
                "worship"
        ]
  5. Calculate the center of the shape (parcel) sing python "geopandas" and "shapely"
    1. Read about how-to: https://gis.stackexchange.com/questions/166820/returning-lat-and-long-of-centroid-point-with-geopandas
    2. https://geopandas.org/en/stable/docs/user_guide/data_structures.html
    3. https://geobgu.xyz/py/shapely.html
  6. I made a jupyter notebook for that - calculating centroid x, y from shapes of a shp file
    1. test-geopandas-polygon-multipolygon.ipynb
  7. Finally save it to original shp file (with additional data), geojson, csv
    1. See this for reading/writing in various formats: https://geopandas.org/en/stable/docs/user_guide/io.html

* Other tips - Display attributes on the map on QGIS

posted by kimsooil
: