<div dir="ltr"><br><br>On Tue, Feb 26, 2019 at 9:39 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>><br>><br>><br>> On Tue, Feb 26, 2019 at 9:17 PM patrick_s <<a href="mailto:patrick_GIS@gmx.net">patrick_GIS@gmx.net</a>> wrote:<br>> ><br>> > Thanks Markus<br>> ><br>> > My GRASS-version is 7.4 from standard Ubuntu 18.04.2 LTS repository;<br>><br>> This should work as expected. AFAICT, the spatial option and the -r flag are properly passed to OGR.<br><div><br></div><div>Hmm, no, if the geometry option is given, the spatial filter was not properly passed to OGR. Hopefully fixed in trunk r74137.</div><div><br></div><div>Markus M<br></div><div>></div>> Are there any warnings or errors in the output messages of v.in.ogr?<br>><br>> In order to help testing, you could use OGR directly to extract a spatial subset:<br>><br>> ogr2ogr -spat 2653156, 1249949, 2675000, 1267232 -geomfield geom_2 -f GPKG test.gpkg "PG:dbname=psql_local" layer ${DBSCHEMA}.${DATASET}<br>><br>> and test if you get the expected result.<br>><br>> The arguments for ogr2ogr are derived from your information and untested.<br>><br>> Markus M<br>><br>> ><br>> > Regards,<br>> ><br>> > Patrick<br>> ><br>> ><br>> ><br>> > On 26/02/2019 21.12, Markus Metz wrote:<br>> ><br>> ><br>> ><br>> > On Tue, Feb 26, 2019 at 5:05 PM patrick_s <<a href="mailto:patrick_GIS@gmx.net">patrick_GIS@gmx.net</a>> wrote:<br>> > ><br>> > > Dear list<br>> > ><br>> > > The syntax of v.in.ogr ignores the "geometry" Parameter, when using the<br>> > > "spatial" Parameter or "-r". A workaround is the use of v.clip and g.rename.<br>> > ><br>> > > I am a longterm user, but unregular user and have no userid to start a<br>> > > ticket. Hope this helps for future development nontheless.<br>> ><br>> > Of course it helps! Which GRASS version are you using? v.in.ogr has changed quite a bit recently, therefore we recommend to use GRASS 7.6.<br>> ><br>> > Best,<br>> ><br>> > Markus M<br>> > ><br>> > > Best,<br>> > ><br>> > > Patrick<br>> > ><br>> > > #using flag "-r" and "spatial" finds "2990 vertices registered"<br>> > ><br>> > > v.in.ogr spatial="2653156, 1249949, 2675000, 1267232"<br>> > > input="PG:dbname=psql_local" layer=${DBSCHEMA}.${DATASET}<br>> > > out=gr_${DATASET}_${REFYEAR} type=point geometry="geom_2" -o --o<br>> > ><br>> > > v.in.ogr -r input="PG:dbname=psql_local" layer=${DBSCHEMA}.${DATASET}<br>> > > out=gr_${DATASET}_${REFYEAR} type=point geometry="geom_2" -o --o #2990<br>> > > vertices registered<br>> > ><br>> > > #clipping with same region after loading reduces to "1079 primitives<br>> > > registered"<br>> > ><br>> > > v.clip in=gr_${DATASET}_${REFYEAR} out=gr_${DATASET}clip_${REFYEAR} -r<br>> > ><br>> > > _______________________________________________<br>> > > grass-user mailing list<br>> > > <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> > > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></div>