Solution 1 is well detailed and thank you Zoltan
Below is simplified version
Consider polygon (Pentagon) with co-ordinates (x1,y1); (x2,y2); (x3,y3); (x4,y4); (x5,y5) then centroid should be
Centroid X coord = (x1+x2+x3+x4+x5) / 5
Centroid Y coord = (y1+y2+y3+y4+y5) / 5
You can use X as latitude and Y as longitude and can point Centroid.
If you are using any mapping tool/library then that library itself should have this functionality to create a polygon with centroid.
If you are creating any functionality on a DigitalMap then attached formulas might help you in future
http://williams.best.vwh.net/avform.htm[
^].
Also this
http://www.geog.ubc.ca/courses/klink/gis.notes/ncgia/u33.html#SEC33.4.1[
^] might help you to generate source code for your formulas.
Cheers and best of luck!
Thanks
Rushikesh Joshi