Skip to content
fordfrog edited this page Sep 23, 2012 · 10 revisions

Some Notes

Due to the issues Postgis has with GML, I have added option to convert GML geometries to EWKT before they are stored in database to avoid all GML related issues. This feature is available since version 1.3.0. To enable it, use --convert-to-ewkt command line switch. In fact, you should not run ruian2pgsql without this switch turned on if you are importing geometry data because it would result in corrupt and omitted geometry data.

Great thanks goes to Petr Morávek (Xificurk) who helped me with the WKT stuff and solved all the issues related to WKT and Postgis.

Known Issues

  • ruian2pgsql does not work on RÚIAN updates (with geometries) when not used with --convert-to-ewkt switch since 20120723 when using Postgis 2.0.1 (not sure about other versions) because GML polygon XML definitions crash Postgis (see bug). So if you are importing geometries too, make sure you use --convert-to-ewkt command line switch.
  • Postgis (2.0.1 and probably even older versions) do not support <gml:MultiPoint><gml:pointMembers>...</gml:pointMembers></gml:MultiPoint>, silently ignores the points and stores empty multipoint in database instead of correct geometry (see bug). There is workaround for this issue in ruian2pgsql since version 1.1.0. Anyway, you should use --convert-to-ewkt command line switch which avoids all GML issues.
  • Some GML XML definitions from the import files are considered as invalid by Postgis (tested with version 2.0.1) so use of --ignore-invalid-gml is needed. At this point I am not sure whether it is really invalid GML or a Postgis bug. Anyway, you should use --convert-to-ewkt command line swtich to avoid all GML issues.

ToDo

  • add option to store geometries in database in different projection
Clone this wiki locally