How to create a Table with Geometry Column in PostGIS

Do you need to create a table with a geometry column in PostGIS from scratch?
Can’t remember the syntax of AddGeometryColumn(varchar catalog_name, varchar schema_name, varchar table_name, varchar column_name, integer srid, varchar type, integer dimension)? I can’t. ;)

Let’s make our lives easier: QGIS PostGIS Manager offers a convenient GUI for creating tables with geometry columns:

PostGIS Manager Create Table dialog

The dialog works a lot like what you’re probably used to in pgAdmin – with the added nicety of supporting Geometry columns.

In my opinion, this is the fastest way so far to create a spatially enabled table. It provides a much better user experience than telling users (especially new ones) to use AddGeometryColumn(…

  1. Thanks for this – how do you install the PostGIS Manager plugin? I downloaded a copy but I’ve no idea where to put it.

    • underdark said:

      Python plugins are stored in ~/.qgis/python/plugins folder. If you download the plugins using plugin installer, you don’t have to do this manually – the tool will take care of everything and inform you of new updates.


Get every new post delivered to your Inbox.

Join 7,763 other followers

%d bloggers like this: