위도/경도 포인트가 다각형 내에 있는지 어떻게 확인합니까? (How do I determine if a lat/long point is within a polygon?)


문제 설명

위도/경도 포인트가 다각형 내에 있는지 어떻게 확인합니까? (How do I determine if a lat/long point is within a polygon?)

내 주를 구성하는 모든 카운티의 셰이프 파일이 있습니다. (지구 다각형에 대한 기하학적 정보를 포함하는) shapefile을 사용하여 Geopandas를 사용하여 도형에 도형을 그릴 수 있었습니다. 위도 및 경도 좌표로 지오코딩한 주소가 있으며 좌표가 속한 카운티(또는 다각형)를 결정할 수 있기를 원합니다. geopandas에 in 기능이 있는 것을 보았지만 사용법을 잘 모르겠습니다.

최종 목표는 사용자가 입력하고 주소를 지정하고 프로그램을 카운티 이름을 반환합니다. 카운티는 수십 개에 불과하므로 for 루프를 사용하여 행을 반복하고 각 다각형을 확인하여 제공된 좌표가 내부에 있는지 확인하려고 생각했습니다.


참조 솔루션

(by arctic_radar)

참조 문서

  1. How do I determine if a lat/long point is within a polygon? (CC BY‑SA 2.5/3.0/4.0)

#geopandas #shapely #Python






관련 질문

{'northeast': {'lat':}, 'southwest': {'lat': }}(Google 지도) Python에서 다각형을 만드는 방법 (How to create Polygon out of {'northeast': {'lat':}, 'southwest': {'lat': }} (google maps) Python)

모양이 교차하는 다각형의 수를 어떻게 계산합니까? (How can I count the number of polygons a shape intersects?)

GeoPandas를 사용하여 Python에서 GRASS 벡터 데이터 소스 읽기 (Read GRASS vector datasources in Python using GeoPandas)

어떤 점에 포함된 영역을 찾는 Geopandas (Geopandas to locate which area does a point contains)

Geopandas Dataframe이 인덱스 오류를 반환하는 이유 (Why is the Geopandas Dataframe returning an Index Error)

여러 선스트링으로 구성된 shapefile을 분할하는 방법 (How to split a shapefile compose of multiple linestrings)

LineString 유형의 개체는 JSON 직렬화가 불가능합니다. (Object of type LineString is not JSON serializable)

큰 geotif 파일 열기 (Open large geotif file)

점이 있는 geopandas 데이터 프레임에서 다각형 만들기 (Creating a polygon from a geopandas dataframe with points)

여러 소스 및 대상 노드에 대한 Networkx 최단 경로 분석 (Networkx Shortest Path Analysis on multiple source and target nodes)

위도/경도 포인트가 다각형 내에 있는지 어떻게 확인합니까? (How do I determine if a lat/long point is within a polygon?)

Geodataframe.explore() 오류: __init__() 누락된 1개의 필수 위치 인수: '위치' (Geodataframe.explore() error: __init__() missing 1 required positional argument: 'location')







코멘트