Wednesday, May 28, 2008

Database development in Postgresql

Database development seems to be coming along nicely now that I have a good idea of how PostGIS and PostGres work.

In order to load a shapefile into the database I simply use the shp2sql function to convert the file. This also adds a geometry column called 'the_geom' to the table that contains a rather long hexadecimal number. In order to read this you can issue SQL queries to find geometry information such as vertices, areas, and lengths. This will be how Jianfei reads in the information he needs to create an indoor viewer for the building.

Hopefully be next week I will have the kinks worked out on the GIS database end and Jianfei will have a program that can read in these variables through the libpqxx libraries for C++.

I will be going out of town for the rest of the week and return on Tuesday to start finishing this stuff up.