[gdal-dev] postgis to esri shape slow
Mario Jurcevic
mario at geosar.ch
Wed Apr 30 05:48:26 PDT 2014
On 04/28/2014 08:02 PM, Even Rouault wrote:
> Le lundi 28 avril 2014 16:47:49, Mario Jurcevic a écrit :
>> Hi,
>> I try to export postgis tables ( 200 ) to shape; It seems ogr2ogr is
>> much more slow than "pgsql2shp" from postgis.
>>
>> ogr2ogr: about 15 minutes
>> pgsql2shp: about 2 minutes
>>
>> Any known reason for that?
>
> Interesting. I don't have a particular reason coming to mind. Which GDAL,
> PostGIS and PostgreSQL versions do you use ?
>
> Well, one idea I could have is if some of your tables have polygons or
> multipolygons with a lot of inner rings/holes. The shapefile exporter might be
> slow on this. If you've indeed that situation, perhaps you could exclude them
> from the timing to compare if that makes a difference
>
> Could you share a dump of the tables (possibly a shorter extract that would
> still exhibit the issue) so that it can be analyzed ?
>
> Even
>
Postgresql 9.1.3
Postgis 2.0.4
gdal 1.9.2
Tables have MULTIPOLYGONS and MULTILINESTRING.
The export is done from Java by invoking for each table the ogr2ogr
command. Same for "pgsqltoshape".
More information about the gdal-dev
mailing list