Re: [gdal-dev] Intersection of two Layers

2016-01-24 Thread Ari Jolma
24.01.2016, 14:49, Kai Mühlbauer kirjoitti: Am 23.01.2016 um 11:29 schrieb Ari Jolma: I've committed the enhancement to the trunk. Great! The new options are USE_PREPARED_GEOMETRIES, which defaults to YES, and PRETEST_CONTAINMENT (note the change in this key), which defaults to NO. Compi

Re: [gdal-dev] Intersection of two Layers

2016-01-24 Thread Kai Mühlbauer
Am 23.01.2016 um 11:29 schrieb Ari Jolma: I've committed the enhancement to the trunk. Great! The new options are USE_PREPARED_GEOMETRIES, which defaults to YES, and PRETEST_CONTAINMENT (note the change in this key), which defaults to NO. Compiled and tested here, works with my current pyth

Re: [gdal-dev] Intersection of two Layers

2016-01-23 Thread Ari Jolma
I've committed the enhancement to the trunk. The new options are USE_PREPARED_GEOMETRIES, which defaults to YES, and PRETEST_CONTAINMENT (note the change in this key), which defaults to NO. Prepared geometries are used in Intersection, Union, and Identity. Ari 22.01.2016, 15:06, Kai Muehlbau

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Kai Muehlbauer
Here is the code. Am 22.01.2016 um 14:05 schrieb Kai Muehlbauer: Am 22.01.2016 um 13:26 schrieb Even Rouault: Le vendredi 22 janvier 2016 13:19:40, Kai Muehlbauer a écrit : Am 22.01.2016 um 12:58 schrieb Ari Jolma: 22.01.2016, 13:49, Kai Muehlbauer kirjoitti: This is very good news! If I und

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Kai Muehlbauer
Am 22.01.2016 um 13:26 schrieb Even Rouault: Le vendredi 22 janvier 2016 13:19:40, Kai Muehlbauer a écrit : Am 22.01.2016 um 12:58 schrieb Ari Jolma: 22.01.2016, 13:49, Kai Muehlbauer kirjoitti: This is very good news! If I understand correctly, I could use your patch and self-compile gdal to

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Even Rouault
Le vendredi 22 janvier 2016 13:19:40, Kai Muehlbauer a écrit : > Am 22.01.2016 um 12:58 schrieb Ari Jolma: > > 22.01.2016, 13:49, Kai Muehlbauer kirjoitti: > >> This is very good news! If I understand correctly, I could use your > >> patch and self-compile gdal to have access to the improved > >> l

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Kai Muehlbauer
Am 22.01.2016 um 12:58 schrieb Ari Jolma: 22.01.2016, 13:49, Kai Muehlbauer kirjoitti: This is very good news! If I understand correctly, I could use your patch and self-compile gdal to have access to the improved layer-intersection function via the python bindings. I'll give this a try. At

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Ari Jolma
22.01.2016, 13:49, Kai Muehlbauer kirjoitti: This is very good news! If I understand correctly, I could use your patch and self-compile gdal to have access to the improved layer-intersection function via the python bindings. I'll give this a try. Attached is probably a bit better diff. A

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Kai Muehlbauer
Am 22.01.2016 um 12:23 schrieb Ari Jolma: 22.01.2016, 12:48, Kai Muehlbauer kirjoitti: Am 22.01.2016 um 10:52 schrieb Ari Jolma: 22.01.2016, 10:06, Kai Muehlbauer kirjoitti: To quickly check if there is an improvement I used the python shapely package. Converting the outer loop geometry to

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Ari Jolma
22.01.2016, 12:48, Kai Muehlbauer kirjoitti: Am 22.01.2016 um 10:52 schrieb Ari Jolma: 22.01.2016, 10:06, Kai Muehlbauer kirjoitti: To quickly check if there is an improvement I used the python shapely package. Converting the outer loop geometry to an shapely prepared geometry and calling '

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Kai Muehlbauer
Am 22.01.2016 um 10:52 schrieb Ari Jolma: 22.01.2016, 10:06, Kai Muehlbauer kirjoitti: To quickly check if there is an improvement I used the python shapely package. Converting the outer loop geometry to an shapely prepared geometry and calling 'contains()' with the inner loop geometries to

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Ari Jolma
22.01.2016, 10:06, Kai Muehlbauer kirjoitti: To quickly check if there is an improvement I used the python shapely package. Converting the outer loop geometry to an shapely prepared geometry and calling 'contains()' with the inner loop geometries to find those fully contained geometries I

Re: [gdal-dev] Intersection of two Layers

2016-01-22 Thread Kai Muehlbauer
Am 20.01.2016 um 07:35 schrieb Kai Muehlbauer: Am 19.01.2016 um 13:09 schrieb Even Rouault: Le mardi 19 janvier 2016 08:40:30, Ari Jolma a écrit : 18.01.2016, 11:56, Kai Muehlbauer kirjoitti: Hi, at the moment I calculate the intersection of two OGR Layers (A, B) by iterating over features/ge

Re: [gdal-dev] Intersection of two Layers

2016-01-19 Thread Kai Muehlbauer
Am 19.01.2016 um 13:09 schrieb Even Rouault: Le mardi 19 janvier 2016 08:40:30, Ari Jolma a écrit : 18.01.2016, 11:56, Kai Muehlbauer kirjoitti: Hi, at the moment I calculate the intersection of two OGR Layers (A, B) by iterating over features/geometries (GA) of layer A and then calling GA.Int

Re: [gdal-dev] Intersection of two Layers

2016-01-19 Thread Even Rouault
Le mardi 19 janvier 2016 08:40:30, Ari Jolma a écrit : > 18.01.2016, 11:56, Kai Muehlbauer kirjoitti: > > Hi, > > > > at the moment I calculate the intersection of two OGR Layers (A, B) by > > iterating over features/geometries (GA) of layer A and then calling > > GA.Intersection(GB) for every Fea

Re: [gdal-dev] Intersection of two Layers

2016-01-18 Thread Ari Jolma
18.01.2016, 11:56, Kai Muehlbauer kirjoitti: Hi, at the moment I calculate the intersection of two OGR Layers (A, B) by iterating over features/geometries (GA) of layer A and then calling GA.Intersection(GB) for every Feature/Geometry (GB) of B. I set a spatial filter for layer B with every G

[gdal-dev] Intersection of two Layers

2016-01-18 Thread Kai Muehlbauer
Hi, at the moment I calculate the intersection of two OGR Layers (A, B) by iterating over features/geometries (GA) of layer A and then calling GA.Intersection(GB) for every Feature/Geometry (GB) of B. I set a spatial filter for layer B with every GA. The intersections features/geometries are