157 reputation
112
bio website
location
age
visits member for 3 years, 11 months
seen Nov 3 '11 at 8:46

May
23
comment getExtent() in OpenLayers returns strange values
Works perfectly ! I've spent nearly 1h30 on this without sucess (at least I've read a good part of OL docs) Thanks a lot !
Feb
9
comment Why is this polygon “self intersected” and invalid?
I will add a check for this kind of error and notify the author of the original data ! I did not think of this check, thanks !
Feb
9
comment Why is this polygon “self intersected” and invalid?
thanks... It looks like I did not zoom enough ! As for the database, I can live with approximate arc (linestring), I don't need that much precision. I simply need to write something to fix bad geometry like this one.
Feb
9
comment Why is this polygon “self intersected” and invalid?
I think your exporting tool changed something, it should be POLYGON, I updated the question
Feb
9
comment Why is this polygon “self intersected” and invalid?
Following this gis.stackexchange.com/questions/1060/… I tried the buffer(0.000001) trick. This solved one of the problem (the example above). Unfortunately, for one other similar problem (looks very similar with the singular point at the extremity of an arc), the buffered polygon is completely changed (it ends up flat).
Jan
11
comment Best way to find the polygons crossed by a line
Ok, I've been able to (finally) test rtree. It works fine as I can reduce the test set from 1096 to 19 :). I'm thinking of using shapely, but I have to best understand what it implies (shapely does not handle projections, I don't want to loose anything in the process).
Dec
22
comment Best way to find the polygons crossed by a line
I've already seen shapely, but didn't know about rtree! Thanks!
Dec
22
comment Best way to find the polygons crossed by a line
As for "I read your question again and realised that you are not using the linestring the trac forms but each vertex." I guess I could also test for intersection from the linestring object, but then I will need to extract the intersecting part. But that may be faster, you are absolutely right !
Dec
22
comment Best way to find the polygons crossed by a line
I think I'll check solutions with BBoxes. My data is not random: tracks are paraglider/hangglider flights and the polygons are the airspaces. I'll have a look to see if I can come up with a simple filter on the bbox. I'm not directly using shapefiles but I've written a script that read OpenAIR format ("standard" airspace descriptors) to OGR (from which I can directly exports to shp)
Dec
22
comment Best way to find the polygons crossed by a line
Thanks for the answer. I'm not using a DB for the setup simplicity. But if avoiding DB implies too much code complexity, then I will change my mind :). As for the "spatial indexes", I will have to google a bit to understand exactly what it is.