datameet / maps

Repository for all spatial data.
http://projects.datameet.org/maps/
MIT License
379 stars 370 forks source link

Geometry polygons consists of latitude and longitude? #34

Closed tonmoyborah closed 5 years ago

tonmoyborah commented 5 years ago

Sorry if this is very basic, but I am new to geo data. I am trying to write a code in geopandas to determine if a given point lies inside a constituency. I am using google maps to determine the latitude and longitude of a certain place.

shp_data = GeoDataFrame.from_file('/maps/assembly-constituencies/India_AC.shp')
ind = shp_data['geometry']
point_hn = Point(77.106281, 28.627625)

for consti in ind:
    if consti.boundary.contains(point_hn):
        print('True')
    else:
        print('False')

Right now it is showing False for every boundary. I also checked for single constituencies with known places and also corrected for number of digits after the decimal place. I want to know if the numbers in the geometry of the shp file are really latitude and longitudes.