Giter Site home page Giter Site logo

sdm4pydev's People

Contributors

osgeokr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

sdm4pydev's Issues

126~131 줄 실행 오류

Cell In[12], line 26, in create_absence_points(presence, total_area, radius, count)
23 res_difference = total_area.overlay(presence_bfr, how='difference')
25 # 임의지점 생성 함수
---> 26 absence = random_points_in_gdf(res_difference, count)
27 absence['CLASS'] = 0
28 return absence

Cell In[12], line 40, in random_points_in_gdf(gdf, size, overestimate)
38 multipoint = multipoint.intersection(polygon)
39 samples = np.array(multipoint)
---> 40 points = samples[np.random.choice(len(samples), size)]
41 df = pd.DataFrame(points, columns=['lon', 'lat'])
42 return gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df.lon, df.lat))

TypeError: len() of unsized object
제가 파이선을 제대로 사용해 본 경험이 없어서..예제 파일로 이제서야 돌려보고 있습니다. 126~131줄 실행하니 위와 같은 메세지가 뜨는데, sample에 들어가는 정보가 없는걸까요 아니면 길이를 알 수 없는 데이터가 들어가서 일까요..??? 전 코드 대로 실행했는데 어디서 잘못된 건지 잘 모르겠습니다. intersection하는 객체가 없어서 일까도 궁금하고요.

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.