[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] spatial query plug-in
|
Hi Jody
Thanks for your advice.
I'm going to try to develop a tool to do this since it is a learning
process, rather than try to select and export without displaying the
massive point file.
30 minutes seemed like a long time to me too - and that is only for the
bounding box intersection - not the point-polygon intersection, which
took even longer! I did this on the server side using sql (i.e. no use
of uDIG). Mind you, it is a selection of 2.5 million points from a 37
million point table, so I assumed this was just par for the course. Any
thoughts on speeding this up? Here's the sequence of statements I used
(for the point in polygon query):
CREATE INDEX lidar_allhits_index ON lidar_allhits
Using GIST (the_geom GIST_GEOMETRY_OPS);
VACUUM ANALYZE;
SELECT lidar_allhits.*
INTO dickie10_lidar_allhits
FROM lidar_allhits, dickie10
WHERE lidar_allhits.the_geom && dickie10.the_geom
AND intersects (dickie10.the_geom,
lidar_allhits_nodups.the_geom);
The indexing alone took 23 hours (this is on a reasonable fast laptop)!
I also tried to force the use of the index with SET ENABLE SEQSCAN
with no effect.
Thanks for any more insight you might have.
cheers
Murray Richardson
Jody Garnett wrote:
Murray Richardson wrote:
Hello,
I am new to uDIG and eclipse development, but have experience with
Java programming and PostgreSQL. I am trying to teach myself some
basics on programming with uDIG and postgreSQL and am looking for a
bit of direction on a plug-in I would like to try. The documentation
has been helpful so far but I could use some specific direction.
Cool.
Essentially I have massive point and line data layers stored in a
postgreSQL database that are too big to display within uDIG in their
entirety (e.g. 37 million points).
Well that sounds like it would take a bit of time to draw (uDig will not
die, but you you would be in for a wait). You may want to construct a
polygon layer with a count of how many points are recorded in each
polygon. Use that layer for quick navigation until you get "close"
enough to display the real thing quickly.
Instead I would like to make a tool (modal I think) that takes a
bounding box drawn with the mouse, and spatially intersects this box
with the stored postGIS layer, returning only the relevant part of
that layer. Although the spatial queries might take a while (e.g they
sometimes take 30min - 1 hour even with geometry indexing), this would
greatly facilitate extracting relevant portions of the data since I
only require small portions of it at any one time.
You may just be able to use "selection", turn off your layer (do it is
not drawn), select the area you are interested in, and export he result
as a shape file.
Can I implement this idea as a modal tool and use JDBC to connect to
and query the massive postGIS layer?
For sure, the existing tool tutorial shows you how to draw a line. You
can modify this example to collect the two corners of your bounding
box. A similar trick was used by the DivaGIS project to define a
"selected grid"; and then a bunch of operations were defined taking the
selected grid into account. Indeed their problem is similar to yours -
as their point layer represents data samples. The DivaGIS source code is
in the community section.
For example after the bounding box is drawn, the tool prompts to
select from a list of postGIS layers?
You can either prompt (modal dialog), or open a view for your list of
postGIS layers.
It concerns me that your query takes 30 mins, any chance you can perform
the analysis you need on the database side using SQL? Or are you trying
for an export ...
Alternatively, should I implement this as an operation that uses a
existing (bounding box or polygon) layer? Any advice to point me in
the right direction on this would be greatly appreciated.
Thanks,
Murray Richardson
udig-devel-request@xxxxxxxxxxxxxxxxxxxxx wrote:
Mailing list subscription confirmation notice for mailing list
udig-devel
We have received a request from e96:1200:a00:0:cce1:f7bf:1860:6f09 for
subscription of your email address, "murray.richardson@xxxxxxxxxxx",
to the udig-devel@xxxxxxxxxxxxxxxxxxxxx mailing list. To confirm that
you want to be added to this mailing list, simply reply to this
message, keeping the Subject: header intact. Or visit this web page:
http://lists.refractions.net/mailman/confirm/udig-devel/8ceafa8fe94ba3ebb9a0271237d061c9de2cd239
Or include the following line -- and only the following line -- in a
message to udig-devel-request@xxxxxxxxxxxxxxxxxxxxx:
confirm 8ceafa8fe94ba3ebb9a0271237d061c9de2cd239
Note that simply sending a `reply' to this message should work from
most mail readers, since that usually leaves the Subject: line in the
right form (additional "Re:" text in the Subject: is okay).
If you do not wish to be subscribed to this list, please simply
disregard this message. If you think you are being maliciously
subscribed to the list, or have any other questions, send them to
udig-devel-owner@xxxxxxxxxxxxxxxxxxxxx.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel