I have a xml file that keeps the edges of a polygon designed in map like this:
<polygons>
<polygon>
<point x="23.40637" y="38.20176"/>
<point x="23.45169" y="38.11011"/>
<point x="23.43383" y="38.20284"/>
<point x="23.52722" y="38.27285"/>
<point x="23.41323" y="38.25023"/>
<point x="23.40774" y="38.20068"/>
<point x="23.41598" y="38.18020"/>
</polygon>
</polygons>
My problem is that I need to get a number of inner points of the polygon in a new xml file. I tried to implement something in Javascript to generate random points inside the polygon, but it turned to a disaster when i tried to include it in an xsl. What actually I was trying to do is to feed a function with a list of objects that contains my initial x,y points and return a random x and y from inside the polygon.
Does anyone have any idea how to do it?
Note: I do not care about overlapping polygons