Download building footprint dataset from

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 38

  • @thegamer9383
    @thegamer9383 Год назад +3

    Very excellent explanation, I really appreciate your help. Thank you!

    • @geodev
      @geodev  Год назад

      Glad you liked it. Thanks❤️

  • @jamala.j.588
    @jamala.j.588 Год назад +1

    great sharing. thank you

    • @geodev
      @geodev  Год назад

      Thanks for visiting

  • @luarkelas5686
    @luarkelas5686 Год назад +1

    That cool Mr, thank you \m/

    • @geodev
      @geodev  Год назад

      Glad you liked it!

  • @Pitorro_X
    @Pitorro_X 7 месяцев назад

    What properties / variables the shapefile contain?

  • @ricardomacias8176
    @ricardomacias8176 Год назад +1

    It is possible to do the process in JupyterLab following the same steps, or it is necessary to do it in Visual Studio, thanks.

    • @geodev
      @geodev  Год назад

      It can be done in both software.

  • @SonaSharma-n6l
    @SonaSharma-n6l 8 месяцев назад +1

    hi. can we get data for 2000, 2010 also? if so, then how? Also, this is showing data of which particular year?

    • @allisonmadrigal472
      @allisonmadrigal472 6 месяцев назад

      hi! did you able to find data from the past years? also needing it :(

    • @SonaSharma-n6l
      @SonaSharma-n6l 6 месяцев назад

      @@allisonmadrigal472 no I didn't get data for past years.

    • @allisonmadrigal472
      @allisonmadrigal472 6 месяцев назад

      @@SonaSharma-n6l even in different sources? huhu I also need data from 2016 to now

    • @SonaSharma-n6l
      @SonaSharma-n6l 6 месяцев назад

      @@allisonmadrigal472 yes. if u get any data, drop reply to the comment

  • @phuongnguyenle8892
    @phuongnguyenle8892 Год назад +1

    the gdf = gpd.GeoDataFrame(df,geometry='geometry',crs='EPSG:4326')
    gdf.head()
    is error. it said TypeError: Input must be valid geometry objects

    • @geodev
      @geodev  Год назад

      Have you checked the code given in video description? Can you try to run that notebook.

    • @ignaciovazquezvelez8838
      @ignaciovazquezvelez8838 Год назад +2

      I solved it with (in Colab):
      from shapely import wkt
      and then for the geometry field:
      df['geometry'] = df['geometry'].apply(wkt.loads)
      gdf = gpd.GeoDataFrame(df, geometry='geometry', crs='EPSG:4326')

  • @phuongnguyenle8892
    @phuongnguyenle8892 Год назад +1

    I can't run the first line, it said ModuleNotFoundError: No module named 'pandas'

    • @geodev
      @geodev  Год назад

      You need to install the required libraries with following command;
      pip install pandas
      pip install geopandas
      etc

  • @ariswahjoedi
    @ariswahjoedi Год назад +1

    whats the dasboard view in the minute 6? phython isn't it?

    • @geodev
      @geodev  Год назад

      It is python notebook!

    • @israelvega394
      @israelvega394 Год назад

      I ran the code in Jupyter Notebook, Anaconda, and It didn't work, What python notebook do you use?@@geodev

  • @muhammadjawad6262
    @muhammadjawad6262 Год назад +1

    Sir i can download the data of Pakistan's.. how ita possible

    • @geodev
      @geodev  Год назад +1

      Yes you can. Just download the data from Pakistan tile and process it as explained in video

    • @muhammadjawad6262
      @muhammadjawad6262 Год назад

      @@geodev thanks for the help sir.. 😊💖

  • @yogyremasetyantoputra7240
    @yogyremasetyantoputra7240 Год назад

    how do you extract the building footprint from csv to polygon .shp sir? i need your guidance

    • @geodev
      @geodev  Год назад

      I have shown the process in this tutorial!

  • @VikasKumar-bh8kx
    @VikasKumar-bh8kx Год назад +1

    how to do this if i do not know programming

    • @geodev
      @geodev  Год назад

      You can download csv and load it in Qgis. But there will be a memory issue for larger dataset.

    • @VikasKumar-bh8kx
      @VikasKumar-bh8kx Год назад

      ​@@geodev i tried
      import geopandas as gps
      import pandas as pd
      from shapely.geometry import polygon
      data = pd.read_csv('D:\buildings.csv')
      gdf = gpd.GeoDataFrame(data, geometry=gpd.points_from_xy(data['longitude'], data['latitude']))
      gdf.crs = 'EPSG:32244'
      bbox = Polygon([(77.2770, 28.4988), (77.2740, 28.4988), (77.2740, 28.5984), (77.2770, 28.5984)])
      cropped_gdf = gdf.cx[77.2770:77.2740, 28.4988:28.5984]
      cropped_gdf.to_csv('crop_file.csv', index=False)
      but error message I am getting is
      OSError: [Errno 22] Invalid argument: 'D:\x08uildings.csv'

    • @bbmpippit9827
      @bbmpippit9827 Год назад

      @@geodev I tried but the result is showing as Point data. I am not able to get Polygons. Can you please give the solution?

    • @nlssvdr7107
      @nlssvdr7107 Год назад

      @@geodev I imported in QGIS as text separated values, and saved into gpkg, it takes 20min each step, but it was done without problems

  • @shreyasbharule8346
    @shreyasbharule8346 Год назад +4

    I get this below error when i try to generate the gdf = gdf.GeoDataFrame() could you help??
    TypeError Traceback (most recent call last)
    c:\Users
    ame pc1\Downloads\Building footprints\building_footprint.ipynb Cell 3 in ()
    ----> 1 gdf = gpd.GeoDataFrame(df, geometry='geometry', crs='EPSG:4326')
    2 gdf.head()
    File c:\Program Files\Python310\lib\site-packages\geopandas\geodataframe.py:191, in GeoDataFrame.__init__(self, data, geometry, crs, *args, **kwargs)
    183 if (
    184 hasattr(geometry, "crs")
    185 and geometry.crs
    186 and crs
    187 and not geometry.crs == crs
    188 ):
    189 raise ValueError(crs_mismatch_error)
    --> 191 self.set_geometry(geometry, inplace=True, crs=crs)
    193 if geometry is None and crs:
    194 raise ValueError(
    195 "Assigning CRS to a GeoDataFrame without a geometry column is not "
    196 "supported. Supply geometry using the 'geometry=' keyword argument, "
    197 "or by providing a DataFrame with column name 'geometry'",
    198 )
    File c:\Program Files\Python310\lib\site-packages\geopandas\geodataframe.py:348, in GeoDataFrame.set_geometry(self, col, drop, inplace, crs)
    345 level.crs = crs
    347 # Check that we are using a listlike of geometries
    ...
    --> 148 raise TypeError("Input must be valid geometry objects: {0}".format(geom))
    150 if compat.USE_PYGEOS:
    151 return np.array(out, dtype=object)
    TypeError: Input must be valid geometry objects: POLYGON((87.7185491791352 22.5667828312016, 87.7184590804737 22.5667864311825, 87.7184519272495 22.5666320082646, 87.7185420258111 22.5666284082901, 87.7185491791352 22.5667828312016))
    Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

    • @geodev
      @geodev  Год назад

      Which version of geopandas are you using? Make sure you have used the latest version!

    • @shreyasbharule8346
      @shreyasbharule8346 Год назад

      @@geodev its geopandas-0.13.2

    • @shreyasbharule8346
      @shreyasbharule8346 Год назад +2

      @@geodev It worked, I could generate the shp files... it seems the polygons are in geodjango and we need to convert them in shapely format.
      after
      df = pd.read_csv(r"CSV file location")
      df.head()
      Need to use :
      from shapely import wkt
      from shapely.wkt import loads
      df['geometry'] = df['geometry'].apply(wkt.loads)

    • @tracysambu6703
      @tracysambu6703 Год назад

      @@shreyasbharule8346 thank you. i got stuck here too