Using database to store map information, rather than shape file

The ultimate goal is to be more flexible in design, display, and modify tabular data.

1. Using the MySQL server
2. Using PostGIS on PostgreSQL server

Which is recomended to use PostGIS in PostgreSQL with the following reasons:
1. Already available template spatial database and its functions, geometry, geography, etc..
2. Already available importers of shape files to PostGIS data.

In Map File, data connection that from shapefile should be changed to PostGIS with syntax as follows: 

CONNECTION "host=localhost port=5432 
dbname=db_name user=user_name password=_password" 
DATA "geom FROM table_name using unique gid using srid=4326" 

Please note that the "DATA" in connection above is using geom field as the geometry field. You can use with your own field, as long as the data type is geometry.

As well, the "srid=4326" is EPSG code that represent the UTM zone. Currently, we use this as "default" :) , because so far we still don't understand what is it.

If you want to know about PostGIS, please visit  and Generally, It is mandatory to know about PostgreSQL ( further more.


No comments:

Post a Comment