[postgis-devel] Distance / Shp2Pgsql

Nicklas Avén nicklas.aven at jordogskog.no
Thu Nov 19 00:18:41 PST 2009


Ok, now I have committed to spike.  Since last review Paul I have changed:* removed subgeometry handling. Hope I can get back with that one to another release * moved prototypes and structures to measures.h * moved making of line in shortest and longest line to measures.c instead of postgis_functions_basic. Now the structure DISTPTS is only used inside measures.c * changed from void functions to returning integer. true for sucess and false for error * changed to handling LWGEOM instead of uchar. Since I removed the subgeometry handling it wasn't that big difference. Most of the uchar things was happening in the bbox-comparing. I have done some testing and so far everything has passed. Regina I tested aginst your dataset and now it seems ok. Things left to do:handling empty geometries. I'm not sure what the best way of doung that is, because we have to investigate collections before we know if all content is empty or if  there is any geometry inside. And what does the empty g!
 eometry looks like when it has passed the parser. What is the best way to detect them? the most ugly function now is lw_dist2d_recursive.I haven't figured out the best way of handling, when iterating the lwcollections, that I don't know if the next geometry showing up has subgeometries. Now I check for that several times.  think the code works, but it looks very messy. Please review it againI don't think I will manage to build the unit-tests in a smart way in time so I hope someone else can do that.  ThanksNicklas 
2009-11-18 Nicklas Avén wrote:

>Hallo> >I have ran into troubles I can't handle with the code, or at least it will need time I don't have. Regina also found a bug in the sub-geometry handling which I don't see what it is, at once (shouldn't be to difficult to find though)> >Because of this I think I better let out this subgeometry handling for this version and focus on the faster algoritm and new functions. > >If I remove this "preprocessing" with subgeometries and just implement those suggestions you gave Paul I think I can get it working in a day or two and maybe after testing it can go to trunk after weekend, when I will get some time to work on it. Then I hope to get the subgeometry handling working to some later release.> >Is that ok?> >The problem I have in the code I think is very strange. I cannot see the logic in the crashes. If I for instance force an iteration to only iterate once it all works, but if I let it go a second round it doesn't even complete the first round.> >I have had several situ!
 ations where I do an edit late in the code which causes a crash early in the code. That makes it very hard to see what's happening. I guess I have made some fundamental thing totaly wrong in the bginning of the code causing it all to be very instable. > >/Nicklas
>
> 2009-11-18 Paul Ramsey wrote:
>
> Niklas, Mark,
> >
> >The two largest items left on the 1.5 docket are the new distance work
> >and the upgrades to shp2pgsql. Can you give me ETAs on those? I'd like
> >to start the 1.5 train towards the station...
> >
> >P.
> >_______________________________________________
> >postgis-devel mailing list
> >postgis-devel at postgis.refractions.net
> >postgis.refractions.net/mailman/listinfo/postgis-devel
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091119/f51583ce/attachment.html>


More information about the postgis-devel mailing list