[GRASS-user] v.out.ogr with -spat?

Greetings,

I have huge vector databases (~50 million records) that I need to export as many tens of thousands of tiles.

Is it possible to use ogr2ogr’s spat argument when exporting with v.out.ogr, perhaps using its’ dsco or lco arguments?

Otherwise, is there a faster (more efficient) way than creating a new vector with v.select? v.select seems several magnitudes slower than if I export to a huge sqlite database and the use ogr2ogr’s -spat argument, but I would prefer to keep it in GRASS.

Thanks,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com

On 18/08/17 07:36, Jeshua Lacock wrote:

Greetings,

I have huge vector databases (~50 million records) that I need to export as many tens of thousands of tiles.

Is it possible to use ogr2ogr’s spat argument when exporting with v.out.ogr, perhaps using its’ dsco or lco arguments?

AFAIK, no.

Seems like an interesting thing to have. Maybe you could make an enhancement request for this in the bug tracker ?

Otherwise, is there a faster (more efficient) way than creating a new vector with v.select? v.select seems several magnitudes slower than if I export to a huge sqlite database and the use ogr2ogr’s -spat argument, but I would prefer to keep it in GRASS.

See https://trac.osgeo.org/grass/ticket/3361 for a report of the slow v.select. This is mostly when using the GEOS operators, not when using the native overlap operator. Is this what you are doing ? It would be good if you could add your experience to the above enhancement request.

Moritz

On Aug 18, 2017, at 1:08 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 18/08/17 07:36, Jeshua Lacock wrote:

Greetings,
I have huge vector databases (~50 million records) that I need to export as many tens of thousands of tiles.
Is it possible to use ogr2ogr’s spat argument when exporting with v.out.ogr, perhaps using its’ dsco or lco arguments?

AFAIK, no.

Seems like an interesting thing to have. Maybe you could make an enhancement request for this in the bug tracker ?

Hi Moritz,

OK, thanks for the suggestion.

Otherwise, is there a faster (more efficient) way than creating a new vector with v.select? v.select seems several magnitudes slower than if I export to a huge sqlite database and the use ogr2ogr’s -spat argument, but I would prefer to keep it in GRASS.

See https://trac.osgeo.org/grass/ticket/3361 for a report of the slow v.select. This is mostly when using the GEOS operators, not when using the native overlap operator. Is this what you are doing ? It would be good if you could add your experience to the above enhancement request.

My apologies, I had used v.overlay, not v.select. I just tried v.select and it was very fast.

Still though, I think it would be very nice to be able to specify the extents when exporting with v.out.ogr so I will make an enhancement request.

Best,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com