This question already has an answer here:

I have a 1282 buildings as 14684 polygonz surfaces in Postgis. I want to create grid on these surfaces. So, for this purpose I need to extract vertex points for every polygonz geometry in database. To access database I am using pyscopg2 adapter of postgresql.

How can I extract vertex coordinates from polygons? Because I will use these points to create new ones on these surfaces

marked as duplicate by Andre Silva, Vince, ArMoraer, John Powell, Kersten Dec 12 '16 at 9:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.