UPGRADING TO POSTGIS 2.0 IN THE BRAZILIAN FEDERAL POLICE FORENSICS GIS
Inteligeo, the Geospatial database of the Brazilian Federal Police Forensics Department, contains more than 800 layers and almost 7 million features. It was initially stored in a PostgreSQL database using the PostGIS 1.5 spatial extension. Most of the data in the system was obtained due to police intelligence field work and lacks standardization and metadata. Sometimes the data itself contains inaccuracies and topological errors. In some cases these errors are easily correctable but PostGIS 1.5 does not have tools to make these basic corrections automatically. Another common day-to-day task is calculating areas, distances and lengths. Since the standard spatial reference system is in geographical coordinates it was necessary to find a suitable projection for the area to obtain the measurements in metric units. PostGIS 1.5 does not have a tool to automatically choose an adequate projection. Looking into the newest PostGIS (subversion revision 7993 at the time), we realized that new functionality helped to solve several everyday problems and opened some possibilities regarding raster data. Among the most prominent features are: the geography support that enables distance and area calculations on the ellipsoid, the support for raster data and basic topological errors correction. As of October 2011, PostGIS 2.0 had not been released and was still under heavy development but already featured several improvements which motivated our early adoption. Early tests did not detect any major issue and demonstrated that PostGIS 2.0 was basically backwards compatible with PostGIS 1.5. Some minor bugs where reported by the federal police and quickly corrected by the developers. This work describes the installation requirements, the migration process, the caveats and back up procedures adopted by the federal police in our production database which is online since august 2011. PostGis 2.0 has been released in April 3rd 2012. This work is provided in the hope that it may be useful to anyone considering making the same transition.