is there a way to extract coordinates inside a polygon in Google Earth. For example I have a project in which I need to use the coordinates for every 1km^2 in an area and use them in MATLAB. How can this be done?
While you could use Google Earth to overlay polygons and a grid of coordinates and visually determine your answer, Google Earth does not provide a way to select and export features (grid points) within another feature (a polygon).
However, you could approach the problem by: 1. saving the polygon feature to a KML file; 2. parse the KML file using an XML reader in your favorite language; 3. construct a grid of coordinates that you want to test; 4. use a library (such as JTS in Java, GEOS in C, Shapely in Python) that implements a point-in-polygon algorithm. MATLAB appears to provide a point in polygon function.