Michaël Michaud wrote:

> OpenJUMP took 70 mn where PostGIS took 10 mn for a simple 
> spatial join ?

I measured the total time from reading 400000 features from Spatilite (LIMIT 
400000 OFFSET xxxxx, took just a few seconds) and combining attributes from the 
surrounding polygons with the "Tools - Analysis - Spatial join" tool by using 
"within" relation. Running a batch of 400000 points against 360 polygons took 
about 7 minutes on average (single processor Xeon 3 GHz, 2 GB RAM, Windows XP). 
I did not bother to try other alternatives because this tool gave a correct 
result and I had some other job to do while OJ was running analysis.

This is what I did with Spatialite

SELECT * FROM polygons pol, points pts
WHERE ST_Contains(pol.geometry, pts.geometry) = 1
   AND pts."OGC_FID" IN (
     SELECT ROWID FROM SpatialIndex
     WHERE f_table_name = 'points'
       AND search_frame = pol.geometry)

With PostGIS I made the same but naturally without the subquery which is needed 
for utilising the spatial index tables in Spatialite.  Spatialite was pretty 
slow with ST_Contains. My polygons were rather complicated and Spatialite is 
not so good in heavy computing. If the queries need only Minimum Bounding 
Rectangle comparisons then Spatialite is very fast, for example when selecting 
features within a bounding box. QGis is utilising this very well by using 
Spatialite layers dynamically in a similar way than OpenJUMP is reading PostGIS 
layers.

-Jukka-


> I don't know how you performed the spatial join in OpenJUMP, 
> but I think 
> that
> - simple query uses envelope test but no spatial index
> - matching extension (also well suited for spatial join) uses indexes 
> and can be much faster.
> > I suppose it could be possible to implement OffsetCurve 
> also in OpenJUMP too because of the close relation on JTS and GEOS.
> Sure, for such a plugin, exposing a JTS function, main work is for UI 
> design and Internationalization.
> 
> Michaël
> >
> > -Jukka-
> > Lähettäjä: Michaël Michaud [[email protected]]
> > Lähetetty: 18. kesäkuuta 2012 21:41
> > Vastaanottaja: OpenJump develop and use
> > Aihe: Re: [JPP-Devel] Window synchronization broken
> >
> > Hi,
> >> I had a need to use two project windows with different 
> layer synchronized for panning and zooming. Unfortunately 
> that option seems to be badly broken in 1.5.2.  It is even 
> hard to describe what happens now. Sometimes if I zoom in in 
> project one the zooming happens only in project two, but not 
> always. Anyway, this feature is unusable right now. Perhaps 
> it should be deactivated as a first aid.
> > It seems that it looses the normal behaviour the first time 
> you try to pan/zoom on the project which has not the focus.
> > Seems that you can easily get the good behaviour again by 
> choosing select tool
> > and clicking in the project you want to have the focus on.
> >
> > Michaël
> >> -Jukka Rahkonen-
> >> 
> --------------------------------------------------------------
> ----------------
> >> Live Security Virtual Conference
> >> Exclusive live event will cover all the ways today's security and
> >> threat landscape has changed and how IT managers can 
> respond. Discussions
> >> will include endpoint security, mobile security and the 
> latest in malware
> >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> _______________________________________________
> >> Jump-pilot-devel mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
> > 
> --------------------------------------------------------------
> ----------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can 
> respond. Discussions
> > will include endpoint security, mobile security and the 
> latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > Jump-pilot-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
> 
> 
> 
> --------------------------------------------------------------
> ----------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. 
> Discussions 
> will include endpoint security, mobile security and the 
> latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to