0

Whenever I try to import the geometry column it contains points in list i.e, [(lat1,lon1),(lat2,lon2),.., so on] this points in list makes a polygon and polygon requires list of tuples, (dataframe to PostgreSQL) it takes as array or text. How do Import geometry so I can retrieve it back as original (list of tuples)?

closed as unclear what you're asking by Vince, LaughU, whyzar, Jochen Schwarze, ThingumaBob Apr 17 at 10:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please Edit the question to specify how you are attempting to do this. Note that a geometry column is not a list of tuples, so depending on how you store it, you might need to work just as hard to recover what you want. – Vince Apr 15 at 21:52
  • Actually I am trying to plot a polygon which requires list of tuples of lat's and long's so I want to retrieve this list of tuples as it is from database . – Priyotosh Bagchi Apr 16 at 5:27
  • 1
    If You need only to store polygon descriptions, you can use WKT format in text field. If You want to store and perform spatial queries, You must first install PostGIS extension to your database. – Sergey N Apr 16 at 5:51
  • Yeah I called postgis extension and give data type path[ ] but they are showing error :- column <columnname> is of path [ ] but expression is of type record [ ]. I'm new to this I can't understand what they want. – Priyotosh Bagchi Apr 16 at 6:51

Browse other questions tagged or ask your own question.