[gdal-dev] PostGIS with more than one geometry column per table | R-Trees

Alexander.Berdnikow at mettenmeier.de Alexander.Berdnikow at mettenmeier.de
Fri Jan 13 07:54:55 PST 2017


Hi, 

sorry, there is a half copy of this post in the forum already, which was 
not accepted by the maillist. 

I translated a Table (Feature) of a PostGIS Database to a GeoPackage with 
GDAL. The Feature has two Linestring Geometries in the PostGIS DB. One 
geometry with exact positions of the network and one overwiew geometry 
which may have just rough positions. Often the overwiew ist just a copy of 
the exact positions, but sometimes it differs. 

After translation of the feature to GeoPackage everything seems fine, but 
in the GeoPackage I have only one Linestring geometry. It is listed in the 
gpkg_geometry_columns. 

My question is, which of the two geometries was translated to the 
GeoPackage? What happens to the other geometries of the feature in the 
translation process? 

I've read about the solution of the multiple geometries issue in 
GeoPackage in the GP-specification. Does GDAL support this in the 
translation process (maybe with a special option?)? 

______

A first solution for us was to use a View Schema, where each feature has 
only one geometry. Now I have two schemas in the PostGIS DB and they were 
both translated. Two questions about it:

- Is there a command to say which schemas to translate and which not? My 
command is now as follows:
ogr2ogr -f GPKG data.gpkg PG:"host=localhost user=user dbname=data 
password=pw" 

I found options to select tables, but there are hundreds of tables in the 
schema I am interested in. Maybe there is an easy  possibility to say 
"take only schema x"? Did not found it in the list 
http://www.gdal.org/ogr2ogr.html

- How can I supress the building of r-tree tables? There are virtually 
thousands of them in the created geopackage. 

Regards, 

Alexander 

_______________________________________________________

Mettenmeier GmbH
Sitz der Gesellschaft: 33100 Paderborn
Geschaeftsfuehrung: Ulrich Mettenmeier, Dirk Weidemann
Handelsregister: Amtsgericht Paderborn B 1114
USt.-ID: DE 811 324 124
Steuer-Nr.: 339/5873/3133
_______________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170113/13df93a3/attachment-0001.html>


More information about the gdal-dev mailing list