Giscuit
Prev Next

Database

Introduction

This section will help you upload your shape files to the PostGIS database. If you are administrator you can view all user tables by clicking the Show users tables button below the data table.

Upload

In the database section click Upload button. Fill the necessary fields and click Submit to upload the data.

Name. Database table name.

Action. Select one of the following:

  • Create or overwrite: creates a new table with the specified name, or if a table with this name exists overwrites it.
  • Create or append: creates a new table with the specified name, or if a table with this name exists it will append the imported data to it.

Encoding. Select encoding of the imported data

Dbf. Dbf file. If you want to upload a text table only, leave the Shp, Shx, Prj/SRID fields empty.

Shp. Shp file.

Shx. Shx file.

Prj. Prj file. This file is used to identify the Spatial Reference System Identifier (SRID). If supplied, the Projection field can be left empty.

Projection. Enter the projection name of your shape file or it's SRID. Spatial Reference System Identifier (SRID) is a unique value used to unambiguously identify projected, unprojected, and local spatial coordinate system definitions.

History. Select if this table will have history or not. Enabling this feature will allow you to find out who modified a feature and when, view the map how it was at a certain date, get all changes in a time period. Disabled for text only tables.

Add

In the database section click Add button. Fill the necessary fields and click Submit to create a table.

Name. Database table name.

Type. Select table type from one of the following:

  • No geometry type creates a table without any geometry field, a text only table with an implicit column id as primary key.
  • Point type creates a table with a POINT geometry column, also creating an implicit column gid as primary key.
  • Line type creates a table with a LINE geometry column, also creating an implicit column gid as primary key.
  • Polygon type creates a table with a POLYGON geometry column, also creating an implicit column gid as primary key.

History. Select if this table will have history or not. Enabling this feature will allow you to find out who modified a feature and when, view the map how it was at a certain date, get all changes in a time period. Disabled for text only tables.

Fields. Create as many fields as you need by pressing Add button. Column structure consists of:

  • Name. Enter a name for the column (reserved names are: id, gid, h_id, hstatus, hgid, the_geom).
  • Type. Select column type from one of the following:
    • smallint: small-range integer, -32768 to +32767
    • integer: usual choice for integer, -2147483648 to +2147483647
    • bigint: large-range integer, -9223372036854775808 to 9223372036854775807
    • numeric: user-specified precision, exact no limit
    • real: variable-precision, inexact 6 decimal digits precision
    • double precision: variable-precision, inexact 15 decimal digits precision
    • character varying: variable-length with limit
    • character: fixed-length, blank padded
    • text: unlimited length
    • bytea: variable-length binary string
    • timestamp without time zone: both date and time, 4713 BC, 5874897 AD
    • timestamp with time zone: both date and time, with time zone 4713 BC, 5874897 AD
    • interval: time intervals, -178000000 years, 178000000 years
    • date: dates only 4713 BC, 32767 AD
    • time without time zone: times of day only, 00:00:00.00, 23:59:59.99
    • time with time zone: times of day only, with time zone, 00:00:00.00+12, 23:59:59.99-12
    • boolean: true or false
  • Length. Length of the column type, if needed.
  • Not null. Check No to make column receive empty values, otherwise check Yes.
  • Default. Enter default column expression, if needed. For "character varying" and "character" field type use the following expression to set a default text value 'YOUR_TEXT'::varchar. For "text" field type use the following expression to set a default text value 'YOUR_TEXT'::text.

Edit

Edit structure

In the database section select a table from Source table name field and click Edit structure button.

To edit selected tables name enter a new value in Name field and click Change name button.

To edit, add or delete a column do one of the following in the Fields section:

To edit a specific column - click on the Name field to select a column and click Edit button. A form will appear, change the desired column properties and click Submit in the form field.

To add a new column to the table - click Add button. A form will appear - complete the column fields with needed values and click Submit in the form field.

To delete a specific column - click on the Name field to select a column and click Delete button.


Edit data

In the database section select a table from Source table name field and click Edit data button.

To sort data ascending or descending by a certain column click on that column's name.

To edit any data besides the primary key column data just click on the field and enter new value in the editor, then click Save.

To add a new data entry to the table click Add button. A new row wil appear in the table, use the edit function to populate row with data. Available for text only tables.

To delete a row - click on the primary key field to select a row and click Delete button.


Delete

In the database section click on the Source table name field to select a table, this will enable the Delete button, click on it to delete the database table.

Prev Up Next
Symbols Administrator Access control list

COPYRIGHT ® 2012, VEC