[gdal-dev] Fast feature count not available?
Even Rouault
even.rouault at spatialys.com
Tue May 26 03:13:47 PDT 2015
Le mardi 26 mai 2015 12:03:52, Paolo Cavallini a écrit :
> Hi all,
> I'm trying to import from Oracle to PostGIS, with the command
>
> ogr2ogr.exe -progress --config PG_USE_COPY YES -f PostgreSQL
> PG:"host=*** port=5432 dbname=*** password=*** user=***" -lco DIM=2
> OCI:georef/***@***:1523/**.**:GEOREF.GEO_NODES "GEOREF"."GEO_NODI_BT"
> -nlt POINT -lco SCHEMA=georef -lco GEOMETRY_NAME=geom -lco FID=id -nln
> geo_nodes -a_srs EPSG:4326 -spat -180.0 -90.0 180.0 90.0 -nlt
> PROMOTE_TO_MULTI
>
> which returns:
>
> Progress turned off as fast feature count is not available.
>
> The table is created, but empty.
> I'd be grateful of any hint.
Paolo,
The OCI driver doesn't advertize the OLCFastFeatureCount capability (although
it has a specialized implementation of the FeatureCount() method, but perhaps
COUNT(*) wasn't thought as fast enough to deserver exposing
OLCFastFeatureCount). Anyway, that's just to make -progress work, which is
just UI niceness, and not really needed, so the warning is not critical at all
and has nothing to do with the fat you get an empty result set.
Try running your request with just ogrinfo until it returns non empty result.
The "-spat -180.0 -90.0 180.0 90.0" part looks a bit suspicious to me. Why do
you need to set this filter ? I also want to warn you that the SRS of the
source layer should be a geographic one for this filter to work. And if it is
indeed a geographic one, then it should select pretty much all the table
content, so you could just remove it.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list