I am new to geographic information systems and i need to calculate the area of a a polygon ( a circle to be precise) that falls inside the boundaries of a region, say a state or a country. For example, in the figure below, the black outline the state in consideration and the circle is the concerned polygon. The yellow area is the area that is required. I have the concerned shapefile for the state.

I am using python. Can someone guide me about how to approach this problem?enter image description here


The quickest way that I am aware of, is to use the Shapely library (requires the GEOS Engine, you can find a one-click installer for shapely here if you're on windows)

The manual provides a dead-on example of what your question:

>>> from shapely.geometry import Point
>>> a = Point(1, 1).buffer(1.5)
>>> b = Point(2, 1).buffer(1.5)
>>> c = a.intersection(b)
>>> c.area
  • Thanks. This looks like it will do the job. Given that the original shape is not symmetrical and is actually defined by a shp file, you think this can still be applied? Nov 1 '14 at 1:06
  • so i started doing what you suggested. here is the problem. The shapefile is essentially made up of lat long coordinates. So is my center point of the circle. However, the radius that i want to specify is in meters/kms. So i want to find how much of a circle's area of radius 1km from a point(lat,long) fall within a particular district(whose shp file i have). Any ideas? Nov 7 '14 at 5:36
  • csgnetwork.com/degreelenllavcalc.html just a random search
    – nickves
    Nov 7 '14 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.