Download building footprint dataset from

Поділитися
Вставка
  • Опубліковано 1 гру 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

  • @phuongnguyenle8892
    @phuongnguyenle8892 Рік тому +2

    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')

  • @luarkelas5686
    @luarkelas5686 Рік тому +1

    That cool Mr, thank you \m/

    • @geodev
      @geodev  Рік тому

      Glad you liked it!

  • @Pitorro_X
    @Pitorro_X 8 місяців тому

    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 10 місяців тому +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 7 місяців тому

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

    • @SonaSharma-n6l
      @SonaSharma-n6l 7 місяців тому

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

    • @allisonmadrigal472
      @allisonmadrigal472 7 місяців тому

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

    • @SonaSharma-n6l
      @SonaSharma-n6l 7 місяців тому

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

  • @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.. 😊💖

  • @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

  • @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!

  • @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