K nearest neighbours

Hi there,
Could anyone tell me how do I get the K nearest neighbours in Oracle 8.1.5 (Spatial)?
I tried using SDO_WITHIN_DISTANCE but it returns me more than K results and I can't order them in distance.
As a related question, could anyone tell me how do I compute the shortest distance between any two SDO_GEOMETRY?
Thanks
Lee

Hi Lee,
There are easy ways to find the nearest neighbors as well as getting the minimum distance between two geometries, but it involves upgrading to Oracle Spatial 8.1.6.
In 8.1.6 there is a new operator (SDO_NN) that returns n nearest neighbors where n is specified in the query.
Similarly, there is a function sdo_geom.sdo_distance that returns the distance between the closest points or segments of two geometries.
This upgrade would be your best bet regarding the functionality you are looking for. There are also other improvements in the product you could look for in 8.1.6.
Hope this helps, and regards,
Dan
null

Similar Messages

  • Implementation of K-Nearest Neighbour in Java

    Please is there anyone who can take me through the process of implementing K -nearest neighbour in Java.

    You can check out R's KNN implementation and adapt it to Java.

  • Bugy nearest neighbour spatial query?

    Hi,
    I have the following problem. The last query below returns the bad number of rows and I suspect some RDBMS bug behinde this, but am not really shure. Could some one please have a look?
    -- Preparation steps:
    -- Create 'Varos' Table
    CREATE TABLE VAROS (
    GMIPRIMARYKEY NUMBER (10) NOT NULL,
    TNEV VARCHAR2 (50),
    NEV VARCHAR2 (50),
    GEOMETRY MDSYS.SDO_GEOMETRY,
    PRIMARY KEY ( GMIPRIMARYKEY ));
    -- Insert 5 records
    --           2 have no name (nev attribute contains 'nincs neve')
    --          3 have meaningful name
    insert into varos values (615484,'Kisszentmarton','58131',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(18.04725,45.788384,18.04698,45.786578)));
    insert into varos values (617351,'Czn','nincs neve',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(18.060483,45.785141,18.060615,45.784949,18.06079,45.783938,18.061508,45.782226,18.061641,45.781539,18.061686,45.780696,18.061677,45.780531)));
    insert into varos values (617352,'Czn','nincs neve',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(18.061677,45.780531,18.061638,45.779749,18.061463,45.778458,18.061103,45.777196,18.060708,45.776133,18.060355,45.775182)));
    insert into varos values (622732,'Vejti','Tancsics Mihaly utca',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(17.964469,45.809845,17.964149,45.809448,17.9641,45.809356,17.964009,45.809186,17.964004,45.808933,17.964007,45.808886,17.964169,45.808335,17.964781,45.807061,17.965233,45.806119,17.965492,45.805637,17.965682,45.805283,17.965802,45.805063,17.965932,45.804825,17.966221,45.804298)));
    insert into varos values (629498,'Pisks','5821',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(17.912804,45.80585,17.913105,45.805645,17.922503,45.803835,17.935384,45.803584)));
    -- Insert metadata record
    insert into USER_SDO_GEOM_METADATA values('VAROS','GEOMETRY',MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('Lon',16,23,0.00000001),MDSYS.SDO_DIM_ELEMENT('Lat',45.5,48.8,0.00000001)),NULL);
    -- Commit
    commit;
    -- Create spatial index
    CREATE INDEX VAROS_INDEX ON VAROS(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=10 SDO_NUMTILES=8');
    -- Test steps:
    -- Select records with not 'nincs neve'
    select gmiprimarykey,tnev,nev
         from varos
         where nev <> 'nincs neve';
    -- It fetches 3 records     
    -- 615484,Kisszentmarton,58131
    -- 622732,Vejti,Tancsics Mihaly utca
    -- 629498,Pisks,5821
    -- Right.
    -- Embed the above select statement as a subselect to a nearest-neighbour spatial query.
    -- It is requested to return the 3 nearest records ('sdo_num_res=3').
    select gmiprimarykey,tnev,nev
         from ( select gmiprimarykey,tnev,nev,geometry
                   from varos
                   where nev <> 'nincs neve'
              ) y
         where mdsys.SDO_NN(y.geometry,mdsys.sdo_geometry(2001,NULL,mdsys.sdo_point_type(18,45.5,0),NULL,NULL),'sdo_num_res=3')='TRUE';
    -- It is expected to return 3 records (the same ones as above), but it returns only 1 single record
    -- 615484,Kisszentmarton,58131
    -- Wrong.
    It seems that Oracle executes the neaest neighbour spatial query BEFORE evaluating the inline view.
    Regards,
    Tamas Szecsy
    [email protected]

    Hi,
    The nearest neighbor query has to use the spatial index, and there is no way to filter the results and
    use the spatial index.
    So, in Oracle9i the SDO_NN tuning parameter SDO_BATCH_SIZE was introduced - what this does is
    keep streaming results from the SDO_NN query until some other condition is met.
    Rewriting your query to use SDO_BATCH_SIZE:
    select gmiprimarykey,tnev,nev
    from varos y
    where mdsys.SDO_NN(y.geometry,
    mdsys.sdo_geometry(2001,NULL,mdsys.sdo_point_type(18,45.5,0),NULL,NULL),
    'sdo_batch_size=5')='TRUE'
    and nev <> 'nincs neve'
    and rownum < 4;
    Two things about SDO_BATCH_SIZE:
    Cannot be used with SDO_NUM_RES
    Requires an R-tree index
    Also, you are using hybrid quadtree indexes. At this point in time, there are almost no situations where
    Oracle recommends using hybrid quadtree indexes (this is true in all versions of Oracle Spatial).
    As of Oracle9i, the recommendation is to use R-tree indexes (which work as well or better than
    quadtree indexes most of the time). Certainly if you require the incremental nearest neighbor functionality
    described above then you need to use an R-tree index.
    If you must use a quadtree index, then you will still have to use sdo_num_res, but you should try to set the
    number large enough so that any filtering leaves enough in the result set.

  • SDO_NN - Nearest neighbour geometry based on condition

    Hi All,
    I have two spatial tables SPL_ROADS and SPL_VILLAGES which stores the road and village information respectively. There are 4 categories of roads – NH, SH, MDR and VR. These are stored in same table (SPL_ROAD). Now I need a query to get nearest NH, nearest SH, nearest MDR and nearest VR and distance for selected villages or for all the villages.
    I am using below query to get nearest road for all the villages.
    SELECT /*+ LEADING(sv) */
    sv.name, sr.name, trunc(SDO_NN_DISTANCE(1),2) dist
    FROM spl_roads sr,
    spl_villages sv
    WHERE
    SDO_NN(sr.geom, sv.geom,'sdo_num_res=1 unit=KM', 1) = 'TRUE'
    But if I query for nearest NH using below query, it returns null.
    SELECT /*+ LEADING(sv) */
    sv.name, sr.name, trunc(SDO_NN_DISTANCE(1),2) dist
    FROM spl_roads sr,
    spl_villages sv
    WHERE sr.category = 'NH'
    SDO_NN(sr.geom, sv.geom,'sdo_num_res=1 unit=KM', 1) = 'TRUE' ORDER BY 1;
    Please suggest me to get nearest road based on categories. I am expecting results in below format.
    ROAD_ID | NAME | Nearest NH | distance from NH| Nearest SH | distance from SH | Nearest MDR |distance from MDR| Nearest VR| distance from VR
    Thanks,
    Sujnan

    Hi,
    Yes. The query takes very long time. I have written PL/SQL function to do this. Here I have to return multiple values from function. For this I have created user type called VILL_NN_ROAD_OBJ. The function will return this user type.
    Here is user type and pl/sql function script.
    CREATE OR REPLACE TYPE VILL_NN_ROAD_OBJ is object (
    nh_road_id varchar2(50),
    nh_dist number(10,2),
    nh_road_name varchar2(250),
    nh_road_num varchar2(50),
    sh_road_id varchar2(50),
    sh_dist number(10,2),
    sh_road_name varchar2(250),
    sh_road_num varchar2(50),
    mdr_road_id varchar2(50),
    mdr_dist number(10,2),
    mdr_road_name varchar2(250),
    mdr_road_num varchar2(50),
    odr_road_id varchar2(50),
    odr_dist number(10,2),
    odr_road_name varchar2(250),
    odr_road_num varchar2(50)
    REATE OR REPLACE FUNCTION WEBRISNEW.GETNNROAD(inGeom SDO_GEOMETRY, in_year_id VARCHAR2) RETURN VILL_NN_ROAD_OBJ
    IS
    nnobj VILL_NN_ROAD_OBJ;
    --nntab VILL_NN_ROAD_TAB;
    BEGIN
    nnobj:=VILL_NN_ROAD_OBJ(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
    rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
    nnobj.nh_road_id, nnobj.nh_road_name, nnobj.nh_road_num, nnobj.nh_dist
    FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
    inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
    rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
    rd.kpwd_road_category=1
    WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
    and ROWNUM <2;
    SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
    rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
    nnobj.sh_road_id, nnobj.sh_road_name, nnobj.sh_road_num, nnobj.sh_dist
    FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
    inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
    rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
    rd.kpwd_road_category=2
    WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
    and ROWNUM <2;
    SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
    rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
    nnobj.mdr_road_id, nnobj.mdr_road_name, nnobj.mdr_road_num, nnobj.mdr_dist
    FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
    inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
    rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
    rd.kpwd_road_category=2
    WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
    and ROWNUM <2;
    SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
    rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
    nnobj.odr_road_id, nnobj.odr_road_name, nnobj.odr_road_num, nnobj.odr_dist
    FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
    inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
    rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
    rd.kpwd_road_category=2
    WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
    and ROWNUM <2;
    -- dbms_output.put_line(dist || '--' || local_gid);
    --insert into temp_vill_roads(vill_mslink, road_name)
    --values (local_gid, item.mslink);
    -- nntab:=VILL_NN_ROAD_TAB(nnobj);
    return nnobj;
    END;
    Here queries inside function selects nearest road of different road categories and distance from and village.
    select getnnroad(geom, '1999-2000') from spl_major_villages where rownum<3
    If I run above query I get below results.
    GETNNROAD(GEOM,'1999-2000')
    (BJP3, 59.24, NH218 Bijapur Hubli Road, NH218, AFZ1, 166.67, SH22 Gulbarga Hosur upto State Border Road, SH22, AFZ1, 166.67, SH22 Gulbarga Hosur upto State Border Road, SH22, ATN1, 2.46, SH12 Jevaragi Chikkodi Sankeshwar Road, SH12)
    (HUK1, 62.84, NH4 Madras Bangalore Poona Road (Bangalore Section), NH4, AFZ1, 195.44, SH22 Gulbarga Hosur upto State Border Road, SH22, AFZ1, 195.44, SH22 Gulbarga Hosur upto State Border Road, SH22, AFZ1, 194.54, SH22 Gulbarga Hosur upto State Border Road, SH22)
    But I need these values as individual columns. I can run below query to do this but I think it is not efficient method.
    select getnnroad(geom, '1999-2000').NH_ROAD_ID, getnnroad(geom, '1999-2000').NH_ROAD_NAME,
    getnnroad(geom, '1999-2000').NH_ROAD_NUM from spl_major_villages where rownum<3
    If I run below query, it says invalid identifier.
    select t.NH_ROAD_ID from (
    select getnnroad(geom, '1999-2000') t from spl_major_villages where rownum<3)
    Please suggest me an efficient solution to do this.
    Thanks,
    Sujnan

  • Exporting a movie with the settings "nearest neighbor"

    Hello everybody!
    I am trying to upscale a movie from an old video game. The resolution is 320x240 and should be upscaled to 1440x1080. The problem is that I don't want Adobe Premiere Pro 6 to upscale it using a chroma subsampling method (http://ingomar.wesp.name/2011/04/dosbox-gameplay-video-capture.html), instead I want to use something similar to the option "nearest neigbor" (the one you have in Adobe Photoshop when you resize images). Why I want this is because I want to keep the pixels from the video game sharp. Is this possible to do?

    And if you take a screen cap, import it into Photoshop and upscale by a factor 4 (with Nearest Neighbour) the result is amazing!
    Actually, I find that up-rezzing with the Nearest Neighbor algorithm to be about the lowest quality of any of the algorithms. It came first, and is basically a holdover from about PS version 2.5. Bicubic interpolation was added later, and then Bicubic Smoother and Bicubic Sharper.
    However, I am always working with continuous tone, high-rez digital photographs, and not screen-caps, so perhaps my material is not the ultimate to judge Nearest Neighbor?
    Still, for a 16x increase, about the only thing that I can suggest (and this is for Stills, and not Video) would be Genuine Fractals (once Human Softaware, but acquired by another company). Still, that is beyond the max limit that I would be comfortable with.
    Others have mentioned Red Giant's Magic Bullet Instant HD, and I would download the trial, then test. That might be "as good as it get."
    Good luck,
    Hunt

  • How to enable OCR with Scangear MP under Linux for MG8250?

    Under Linux openSUSE 12.3 I use Scangear MP 1.80 for my Canon PIXMA MG8250.
    As a scan target (in my German GUI it's "Ziel") I can choose "OCR". But there is no text output, the scan is just saved as a picture. How can I configure Scangear to open the scan via Tesseract in a text editor.
    By the way, the target "Print" (in German "Drucken") leads to saving just as well, though there is at least one printer at hand, of course.
    It's a pity that the pixma scan drivers that are shipped with openSUSE don't work with xsane (the scanner starts working, but stops after one third of the page). Using xsane with a different scanner I can use OCR successfully.
    Volker

    There are two basic types of core OCR algorithm, which may produce a ranked list of candidate characters.
    Matrix matching involves comparing an image to a stored glyph on a pixel-by-pixel basis; it is also known as "pattern matching" or "pattern recognition". This relies on the input glyph being correctly isolated from the rest of the image, and on the stored glyph being in a similar font and at the same scale. This technique works best with typewritten text and does not work well when new fonts are encountered. This is the technique the early physical photocell-based OCR implemented, rather directly.
    Feature extraction decomposes glyphs into "features" like lines, closed loops, line direction, and line intersections. These are compared with an abstract vector-like representation of a character, which might reduce to one or more glyph prototypes. General techniques of feature detection in computer vision are applicable to this type of OCR, which is commonly seen in "intelligent" handwriting recognition and indeed most modern OCR software. Nearest neighbour classifiers such as the k-nearest neighbors algorithm are used to compare image features with stored glyph features and choose the nearest match.
    Software such as Cuneiform and Tesseract use a two-pass approach to character recognition. The second pass is known as "adaptive recognition" and uses the letter shapes recognized with high confidence on the first pass to better recognize the remaining letters on the second pass. This is advantageous for unusual fonts or low-quality scans where the font is distorted.
    So I wonder which kind of OCR algorithm are you using?

  • No Internet for 63 hours and counting

    I live in Finchampstead, Wokingham. It’s an area of Wokingham not far from Reading & Bracknell where a lot of the Major IT companies of the world have an Office.
    I bring this up in case you think my house is halfway up a mountain or where the nearest neighbour is 5 miles away.
    I can comfortably state that we have not had an internet connection up for more than a week in the last 5 years, except for about 6 months 2 years ago. Granted most of the time I leave it a couple of hours and it does come back but I have never seen the router display more than 7 days connection in a row.
    BT as a company is fine, when there are problems that people know about then they are answered quickly and without fuss, however when you get a problem that does not fit the carefully worded script that the BT Internet front line support people in India HAVE to follow then we have a major breakdown and BT falls apart.
    My latest communication with BT ran as follows:
    Friday (7th December @ 17:25) the Broadband link light went out, it then went through the following sequence:
    Light out
    Light blinking orange
    Light blinking blue
    Light Solid blue
    15 seconds pass (just enough time to get connected back again)
    Light goes out
    The sequence repeats
    I rang the BT Internet help line and after waiting for 45 minutes was told that all their computers were down and could I call back on Saturday.
    Saturday (8th December @ 08:00) Called BT Internet helpline again
    After 52 minutes got connected and ran through the script.
    Change filter (I have bought 44 new filters now over the years)
    Plug telephone cable into master socket (it goes down so often it is always plugged into the master socket)
    Reset the router
    The BT front line person then runs a line test and calls me back after 4 minutes-approx. 9:10.
    “Yes they can see a fault on the line I will escalate it to Network support”
    I am then told that BT Network support team are so busy that I can’t get a call until 9PM Sunday night! What!!!!!!!
    I have, however, learnt a long time ago that if that’s the time then that’s the time and there is no point in arguing, the poor front support staff just repeat the same thing over and over until you accept it, trying to argue with then would be like trying to have an argument with my dog, pointless, so it is accepted and they say if the situation changes to call back.
    I ring back on Saturday evening @ (8th December @ 6:30PM) as now the broadband light has gone out altogether. After a 40 minute wait I am told that the network support team has gone home but they would pass the message on.
    Sunday (9th December - Morning) as I can’t do my Christmas shopping on the internet I have to go out Christmas Shopping.
    When I get home we have a message that BT Network Support has telephoned but we were out, and they would call back in the evening.
    Sunday (9th December – afternoon) go out again, this time get back by 7:30PM.
    Another message has been left to say that Network Support has called, and as we are not in they assume that the connection is OK.
    I call back at 8PM and after going through the script again for 10 minutes I am told that I need to speak to the second line Network Support, they would put me through.
    Am on hold for 45 minutes before getting cut off
    I ring back but am told that the Second Line network support team had closed at 8:30PM, whilst I was on hold.
    I rant a bit at the poor chap who has to answer for the other department’s complete inability to provide any kind of customer service. He listens patently (bless him) but explains it would be best to call back in the morning.
    Monday 10th December (Have been cut off for 63 hours now)
    My wife rings the support line and is told that the earliest anyone can look at the problem is Wednesday 12th December 2012 and we will have to be without Internet until then.
    On top of all this we are “scheduled” for a BT Infinity (I must be a sucker for punishment) to be installed on Friday 14th December 2012. (I have a bet with my father in law for £100 that it is not going to take place. The last time an engineer was due around our house we had a call at 3:30PM from a cross lady who said the engineer had called at our house at 4PM (30 minutes in the future) and we were not at home, and despite it being 30 minutes in the future and that she was speaking to me on my home number would not accept that a) I was at home & b) it wasn’t 4PM yet.
    Unfortunately what has passed is a common exchange between us and BT.
    So I have some of questions:
    What is the process so complicated?
    Why do I need to contacted all the time, I am not a child, I trust that when you say you are going to look into the problem you will, all this when you could be mending the problem?
    What does the Network Support team need to speak to me when the problem has been diagnosed as being at the Exchange?
    Why do Network support arrange for calls to happen AFTER they are closed?
    Why does it take 3 days to get an engineer appointment to visit the Exchange, they are there all the time, am I being put the “naughty step” for daring to be out when I should be at home waiting for BT who may or may not call?
    Why do I have to wait until Wednesday for get any kind of internet connection, maybe?
    Rather than spend all this effort, which on Friday will become redundant, on mending the appalling internet connection when you could send the Infinity engineer around earlier? Believe me we can make sure someone is at home if needed.
    Why, every time I have a problem do I have to go through this madness, it is hugely time intensive on my part and must be the same for you, if you didn’t spend half the time try to get in touch with people then you could spend time on mending the problems?
    Solved!
    Go to Solution.

    Thanks for the info. 
    I will have to try an alternative route to get to BT.
    BT OpenReach don't provide any support to end users, they hide behind their relationship with the suppliers, BT Internet in this case, and tell them nothing so they can’t support their customers.
    In the real world this type of work model would become extinct; it is only because there is no other alternative can BT Open Reach get away with such disgraceful customer service. I bet that if Virgin Media started digging up the road BT would be round like a shot, otherwise their customers would migrate in drives.
    As for the bad weather, it’s a non excuse. We are lucky to have had a little rain in the area but by no means the extent of the rest of the country so unless the local engineers are commuting then they are around somewhere.
    As you can tell I have had a bellyful, I have heard every excuse and reason from BT Internet, BT Open Reach and whoever else takes my money under the title "BT".

  • Poor quality when reducing size of raster layer

    When reducing the size of an image layer, I am seeing very different quality between regular raster layers and smart object layers.
    See this image for an example:
    Both versions of the image were resized after duplicating the same source layer.
    They were then resized to 20% of their original size.
    In the top example, the layer was resized immediately after being duplicated.
    In the bottom example the layer was converted to a smart object before resizing.
    You will notice that the top version of the image has considerably more artifacting than the bottom.
    The quality of the raster layer size reduction also seems to have degraded since CS5.
    I am using the bicubic setting in Preferences > General > Image Interpolation.
    Switching that option around has made very little difference.
    Does anyone have any insight into this?
    Are others seeing the same phenomenon?
    Thanks

    In CS6, like CS5, the resampling method when transforming a Smart Object is that which is defined in Preferences > General. However, unlike CS5, CS6 has an independent resampling control in the Options bar when a raster layer is being transformed. Looks like you had Nearest Neighbour selected there.

  • Zip Code Locator / Store Locator

    Guys,
    I want to write a simple store-locator functionality in my website (Using a Mysql db with JSP-java etc.,)
    I am not sure of the tools I need and how to approach the problem (once I get a Map of all the zip codes)... Please throw in some ideas that can help me on this...
    Thanks a ton!

    The earth is ~ 40,000 km equatorial circumference
    Mapped as rectangular projection ignoring poles is 40,000 km x 16,000 km = 640,000,000 1km x 1km cells
    so 1 byte/km2 = 640 MB
    or 1 word/(250m x 250m) = 4*4*4*640MB = 40GB
    So a reasonable brute force method for the planet (and a few big memory servers or a not very big fast disk) would work in most cases.
    Obviously, if you're only interested in one part of the globe you scale down.
    The USA is something like 10,000 km square so a �60 520GB disk would give you a 1/sqrt(500E9/4/(10E6m^2)) = 28m resolution lookup at < 10ms time per request.
    A second lookup of the id returned from the big bitmap using the nearest neighbour approach for a few points would take you further, if required.
    How much is your time worth to develop an efficient solution, if throwing �60 of hardware at it would be good enough?
    Short of buying an awful lot of memory, any solution will hit the disk at least once (though you may be able to optimise away seeking, it's a query and won't be streaming whatever you do), so the overall time isn't likely to get much better without a lot of effort.
    You can always trade off between the bitmap/localised query for space and speed.
    Pete

  • What exactly does Maximum Render Quality do?

    Its description in the documentation simply says that it sharpens the image if it's resized, and takes more processing power and memory to make the encode. But what does that function actually do? Does it simply use a bicubic resizer, with a bilinear/nearest neighbour used for default? I couldn't find any description of what's happening to my image on a technical level.

    Here is some background information.
    http://blogs.adobe.com/premiereprotraining/2011/02/cuda-mercury-playback-engine-and-adobe- premiere-pro.html

  • Show return value of a method-call within a column of ADF table component

    Hi,
    I'm currently developing a ADF "Master Form - Detail Table" component, which displays trips of a car in master form, and all related trip-point information in detail table. This detail table contains the following fields within a row :
    - idTripPoint
    - receivedAt
    - speed
    - coordinates
    Everything is displayed well when deploying my app. What I now want to implement is one more column into my detail table, which displays the result of a method-call which gets the coordinates of the corresponding tripPoint and executes a query to find the nearest neighbour to this point. This method afterwards returns a string which contains a textual description for the coordinates (e.g. 10 km south of Hilton Plaza). This method is defined within my SessionBean and also available within the Data Control Palette.
    What I first did, was just to drag the result (String) of my getTripPointDescription(JGeometry) method to a newly created column within my details table, released it there and set the corresponding NDValue for my method. I used the id of my details table table definition in PageDef for that (${bindings.TripstripPointsList.currentRow.dataProvider.coordinates}). I don't know if this is correct.
    When deploying my app, nothing happened, because my method has never been called. So I decided to implement an invokeAction within my PageDef which calls the generated methodAction within PageDef.
    It looks like that now:
    <executables>
    <invokeAction id="callDescription" Binds="getTripPointDescription"
    Refresh="prepareModel"/>
    </executables>
    <bindings>
    <methodAction id="getTripPointDescription"
    InstanceName="TripsEJBFacadeLocal.dataProvider"
    DataControl="TripsEJBFacadeLocal"
    MethodName="getTripPointDescription"
    RequiresUpdateModel="true" Action="999"
    IsViewObjectMethod="false"
    ReturnName="TripsEJBFacadeLocal.methodResults.TripsEJBFacadeLocal_dataProvider_getTripPointDescription_result">
    <NamedData NDName="tripPoint"
    NDValue="${bindings.TripstripPointsList.currentRow.dataProvider.coordinates}"
    NDType="oracle.spatial.geometry.JGeometry"/>
    </methodAction>
    </bindings>
    Now my method is called once for the coordinates of the first row of my detail table and the generated result is entered within each row.
    So how is it possible to get this standard-behaviour (within other application-frameworks) work in ADF? I just want to display a textual description of a coordinate instead of x/y coordinates within my table. And the corresponding method to get this textual description based on the x/y coordinate should be called for each row displayed in my table.
    I currently walked through all ADF-tutorials and blogs I found on the Internet, but every table example I found only displays data of the associated Entity-Bean. And method Action and accessorIterator are only used with command objects.
    Thank you,
    Thomas

    Sorry, I forgot to say which technologies I use:
    - Toplink Essentials JPA for Model layer (EJB 3.0)
    - ADF in View Layer
    I still hope someone can help me finding an answer.
    Bets Regards,
    Thomas

  • Air 3.3 beta PC audio distortion / Air 3.1 / 3.2 Mac black screen issue

    Hi there,
    I've recently released a large game coded in Flash Builder with Air (www.lonesurvivor.co.uk), and I used Air 3's captive runtime feature to bundle it for Mac and PC.
    The initial build used Air 3.2 and for a large proportion of OSX users, there were no visuals at all, just sound and the game obviously working underneath.  This caused a very large support issue, and took several weeks to deal with, as well as having to maintain a seperate Projector version for those for whom the Air version wouldn't work.  I wish I had known that the game would fail on some Macs, but unfortunately the issue showed up on none of the ones tested.
    I'm about to launch the updated build of the game which uses Air 3.3 beta 1, as it seems to fix the black screen issue for all those who experienced it.  I was very happy that Adobe have managed to iron this out, even if there was no response to the bug I entered into bugbase.
    The problem is, on a final test on XP SP2, the 3.3 beta version produces what appears to be filtered graphics... which is how the Mac version has always appeared, but the PC version of the game seemed to use what looked like nearest-neighbour sampling in Flash's fulllscreen upscaling, which looked good for the zoomed pixel art in this game. 
    This is a small cosmetic issue, but there is another one whhich is far more severe - the audio has become extremely distorted, and is now unlistenable.
    So with 3.2 giving me no visual on Macs and 3.3 giving me unlistenable audio on PCs, I will now have to maintain two versions again.  I really would like to keep one project I can quickly make changes to, but the seperate problems in different platforms means I lose out on the great cross-platform functionality of Air.  I'm hoping this is a known issue, but I couldn't find it on google / bugbase / these forums. 
    Could these two issues be related - is hardware acceleration not working or something?  Somehow I think it is, because the XP test machine is quite old, and tended to fall over with the game running in software mode in a Flash projector.
    I tried swapping out the Air 3.3 runtime for the previous 3.2 I shipped with, and editing the XML desciption to make sure it was set to use that and, sure enough, the game worked as it did before.  So there is definitely something up with the beta.  I'm just glad I caught this problem before I shipped as going to save me thousands of emails of support!
    So I guess my question is - is this a known issue?  And if so, do you have any workarounds / or are Adobe working on a fix?

    Hi Chris,
    Thanks for the prompt response - I guess I should have tried the forums instead of the bugbase last time...  It really was a support nightmare!  Not least because I had to deal with the problem of saved games being wiped by over-zealous browsers on the backup Projector version I was supplying Mac customers with.
    Fortunately the Mac Air 3.3 runtime works great. 
    Out of interest - there is still the difference in GPU scaling used between Mac and Windows though, which there always has been since it was introduced (is this a known issue btw?)
    Which leads me to the 3.3 beta 2 - I tried it out last night, and while it corrected the blurry graphics (the scaling appeared nearest neighour again on XP), the audio suffered the same distortion.
    In addition, I had several other XP / Vista / Win 7 users test out the build, and the user with XP SP3 also suffered the issue.
    So I'm planning to ship the PC version with 3.1 as it worked well for the first release, and use 3.3 beta 1 for the Mac version.  Unfortunately I've run out of time and need to get it out there!
    I'd definitely be interested in getting into the pre-release program.  I'll write you an email and send the builds of the game too.
    Cheers,
    Jasper

  • ComboBoxs outputting to a string

    Hi in this code I've created four comboBoxs and the selections from the comboBoxs then build a string and outputs it in label6. It does this ok but when the user changes a value in one of the comboBoxs the string does not update. I'm just not sure how to do it? Can anyone help?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Menu extends JPanel implements ActionListener
    private JButton Reset;
    private JButton Run;
    private JLabel label1;
    private JLabel label2;
    private JLabel label3;
    private JLabel label4;
    private JLabel label5;
    private JLabel label6;
    private JLabel label7;
    private JComboBox EnsembleSize = null;
    private JComboBox Randomize;
    private JComboBox baseModel = null;
    private JComboBox dataChoices;
    final static int START_INDEX = 0;
    private String Configs;
    private String[] baseModelRun;
    private String[] dataRun;
    private String[] EnsembleSizeRun;
    private String[] RandomizeRun;
    public Menu()
         constructComboBoxs();
    constructComponents();
    addComponents();
    positionComponents();
    //Set ActionListeners
    Run.setActionCommand("RunButton");
    Run.addActionListener(this);
    Reset.setActionCommand("ResetButton");
    Reset.addActionListener(this);
    EnsembleSize.setActionCommand("ensemble");
    EnsembleSize.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if (e.getActionCommand().equals("RunButton"))
                   label5.setText("<html><font color=red>RUNNING NOW!!!</font></html>");
         //label6.setText(baseModelRun[baseModel.getSelectedIndex()]);
         label6.setText("Configs: " + Configs);
                        EnsembleSize.setEnabled(false);
                        baseModel.setEnabled(false);
                        Randomize.setEnabled(false);
                        dataChoices.setEnabled(false);
              else if(e.getActionCommand().equals("ResetButton"))
                   Toolkit.getDefaultToolkit().beep();
         label5.setText("");
         label6.setText("Configs: ");
                        EnsembleSize.setEnabled(true);
                        baseModel.setEnabled(true);
                        Randomize.setEnabled(true);
                        dataChoices.setEnabled(true);
              EnsembleSize.setSelectedIndex(0);
              baseModel.setSelectedIndex(0);
              Randomize.setSelectedIndex(0);
              dataChoices.setSelectedIndex(0);
         /*else if(e.getActionCommand().equals("ensemble"))
              //label6.setText(EnsembleSizeRun[EnsembleSize.getSelectedIndex()]);
         String petName = (String)EnsembleSize.getSelectedItem();
         label6.setText(petName);
              void constructComboBoxs()
              //construct preComponents with arrays for comboBoxs
              String[] EnsembleSizeItems = {" x 1", " x 5", " x 10"};
              String[] RandomizeItems = {"Compare all methods"," Random Features", " Random Sampling", " Randomise Outputs"};
              String[] baseModelItems = {"Nearest Neighbour", "Linear Regression", "M5P Tree"};
              String[] DataItems = {"autoprice", "BreastTumor", "cholesterol", "housing","pollution"};
         String[] EnsembleSizeRun = {" -E 1 -N 5", " -E 5 -N 5", " -E 10 -N 5"};
              String[] RandomizeRun = {""," -S 0"," -S 1"," -S 2"};
         String[] baseModelRun = {"research.predictors.knn",
                                       "weka.classifiers.LinearRegression",
                                       "weka.classifiers.trees.M5P"};
         String[] dataRun = {"-c 16 -t \"C://ensembleResearchNew//data//autoprice.arff\"",
         "-c 10 -t \"C://ensembleResearchNew//data//BreastTumor.arff\"",
         "-c 14 -t \"C://ensembleResearchNew//data//cholesterol.arff\"",
         "-c 14 -t \"C://ensembleResearchNew//data//housing.arff\"",
         "-c 16 -t \"C://ensembleResearchNew//data//pollution.arff\""};
         //construct components
         baseModel = new JComboBox(baseModelItems);
         baseModel.setSelectedIndex(START_INDEX);
         EnsembleSize = new JComboBox (EnsembleSizeItems);
         EnsembleSize.setSelectedIndex(0);
         Randomize = new JComboBox (RandomizeItems);
         Randomize.setSelectedIndex(2);
                   dataChoices = new JComboBox (DataItems);
         dataChoices.setSelectedIndex(0);
         //constructs configurations for running experiment
                   Configs = (baseModelRun[baseModel.getSelectedIndex()] + " "
              + dataRun[dataChoices.getSelectedIndex()]
              + EnsembleSizeRun[EnsembleSize.getSelectedIndex()]
              + RandomizeRun[Randomize.getSelectedIndex()]);
              void constructComponents()
                   //constructs labels
         label1 = new JLabel ("<html><font color=red size=10>MAIN MENU</font></html>");
         label2 = new JLabel ("Select size of ensemble:");
         label3 = new JLabel ("Select a Base Model:");
         label4 = new JLabel ("Select randomising method:");
         label5 = new JLabel ();
         label6 = new JLabel ();
         label7 = new JLabel ("Select data set:");
         //constructs buttons
         Reset = new JButton ("Reset");
         Run = new JButton ("Run!");                
         void addComponents()
         //adds comboBoxs
         add (EnsembleSize);
         add (Randomize);
         add (baseModel);
         add (dataChoices);
         //adds labels
         add (label1);
         add (label2);
         add (label3);
         add (label4);
         add (label5);
         add (label6);
         add (label7);
         //add buttons
         add (Reset);
         add (Run);
         //add message hints to buttons
         Run.setToolTipText("Press this button to run experiment");
         Reset.setToolTipText("Press this button to reset all options for experiment");
              void positionComponents()
         //Sets size and set layout for panel
         setPreferredSize (new Dimension (420, 400));
         setLayout (null);
         sets component bounds for Absolute Positioning of components
         * setup guide = name.setBounds(x1, y, x2, height) *
         //sets positions for combo boxes
         EnsembleSize.setBounds (225, 60, 60, 25);
         Randomize.setBounds (225, 170, 150, 25);
         baseModel.setBounds (225, 115, 137, 25);
         dataChoices.setBounds (225, 225, 150, 25);
         //sets positions for labels on panel
         label1.setBounds (100, 0, 300, 40);
         label2.setBounds (65, 60, 145, 25);
         label3.setBounds (80, 114, 122, 25);
         label4.setBounds (42, 170, 166, 25);
         label5.setBounds (175, 350, 100, 25);//RUNNING NOW!!!
         label6.setBounds (10, 275, 700, 25);//configs
         label7.setBounds (110, 225, 150, 25);
         //sets positions for buttons on panel
         Reset.setBounds (125, 315, 100, 20);
         Run.setBounds (215, 315, 100, 20);
         public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
         JFrame frame = new JFrame ("JPanel Preview");
         frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
         frame.getContentPane().add (new Menu());
         frame.pack();
         frame.setVisible (true);
    }

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Menu extends JPanel implements ActionListener
         private JButton Reset;
         private JButton Run;
         private JLabel label1;
         private JLabel label2;
         private JLabel label3;
         private JLabel label4;
         private JLabel label5;
         private JLabel label6;
         private JLabel label7;
         private JComboBox EnsembleSize = null;
         private JComboBox Randomize;
         private JComboBox baseModel = null;
         private JComboBox dataChoices;
         final static int START_INDEX = 0;
         private String Configs;
         private String[] baseModelRun;
         private String[] dataRun;
         private String[] EnsembleSizeRun;
         private String[] RandomizeRun;
         public Menu()
              constructComboBoxs();
              constructComponents();
              addComponents();
              positionComponents();
    //          Set ActionListeners
              Run.setActionCommand("RunButton");
              Run.addActionListener(this);
              Reset.setActionCommand("ResetButton");
              Reset.addActionListener(this);
              EnsembleSize.setActionCommand("ensemble");
              EnsembleSize.addActionListener(this);
              baseModel.setActionCommand("base");
              baseModel.addActionListener(this);
              Randomize.setActionCommand("random");
              Randomize.addActionListener(this);
              dataChoices.setActionCommand("data");
              dataChoices.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if (e.getActionCommand().equals("RunButton"))
                   label5.setText("<html><font color=red>RUNNING NOW!!!</font></html>");
                   label6.setText("Configs: "+EnsembleSize.getItemAt(EnsembleSize.getSelectedIndex())
              + " - " + baseModel.getItemAt(baseModel.getSelectedIndex()) + " - "
              + Randomize.getItemAt(Randomize.getSelectedIndex()) + " - "
              + dataChoices.getItemAt(dataChoices.getSelectedIndex()));
                   EnsembleSize.setEnabled(false);
                   baseModel.setEnabled(false);
                   Randomize.setEnabled(false);
                   dataChoices.setEnabled(false);
              else if(e.getActionCommand().equals("ResetButton"))
                   Toolkit.getDefaultToolkit().beep();
                   label5.setText("");
                   label6.setText("Configs: ");
                   EnsembleSize.setEnabled(true);
                   baseModel.setEnabled(true);
                   Randomize.setEnabled(true);
                   dataChoices.setEnabled(true);
                   EnsembleSize.setSelectedIndex(0);
                   baseModel.setSelectedIndex(0);
                   Randomize.setSelectedIndex(0);
                   dataChoices.setSelectedIndex(0);
              else if(e.getActionCommand().equals("ensemble"))
              label6.setText("Configs: " + baseModel.getItemAt(baseModel.getSelectedIndex()) + " - "
                                                 + Randomize.getItemAt(Randomize.getSelectedIndex()) + " - "
                                                 + dataChoices.getItemAt(dataChoices.getSelectedIndex()) + " - "
                                                 + EnsembleSize.getItemAt(EnsembleSize.getSelectedIndex()) );
              else if(e.getActionCommand().equals("base"))
              label6.setText("Configs: " + baseModel.getItemAt(baseModel.getSelectedIndex()) + " - "
                                                 + Randomize.getItemAt(Randomize.getSelectedIndex()) + " - "
                                                 + dataChoices.getItemAt(dataChoices.getSelectedIndex()) + " - "
                                                 + EnsembleSize.getItemAt(EnsembleSize.getSelectedIndex()) );
              else if(e.getActionCommand().equals("random"))
              label6.setText("Configs: " + baseModel.getItemAt(baseModel.getSelectedIndex()) + " - "
                                                 + Randomize.getItemAt(Randomize.getSelectedIndex()) + " - "
                                                 + dataChoices.getItemAt(dataChoices.getSelectedIndex()) + " - "
                                                 + EnsembleSize.getItemAt(EnsembleSize.getSelectedIndex()) );
              else if(e.getActionCommand().equals("data"))
              label6.setText("Configs: " + baseModel.getItemAt(baseModel.getSelectedIndex()) + " - "
                                                 + Randomize.getItemAt(Randomize.getSelectedIndex()) + " - "
                                                 + dataChoices.getItemAt(dataChoices.getSelectedIndex()) + " - "
                                                 + EnsembleSize.getItemAt(EnsembleSize.getSelectedIndex()) );
         void constructComboBoxs()
    //          construct preComponents with arrays for comboBoxs
              String[] EnsembleSizeItems = {" x 1", " x 5", " x 10"};
              String[] RandomizeItems = {"Compare all methods"," Random Features", " Random Sampling", " Randomise Outputs"};
              String[] baseModelItems = {"Nearest Neighbour", "Linear Regression", "M5P Tree"};
              String[] DataItems = {"autoprice", "BreastTumor", "cholesterol", "housing","pollution"};
              String[] EnsembleSizeRun = {" -E 1 -N 5", " -E 5 -N 5", " -E 10 -N 5"};
              String[] RandomizeRun = {""," -S 0"," -S 1"," -S 2"};
              String[] baseModelRun = {"research.predictors.knn",
                        "weka.classifiers.LinearRegression",
              "weka.classifiers.trees.M5P"};
              String[] dataRun = {"-c 16 -t \"C://ensembleResearchNew//data//autoprice.arff\"",
                        "-c 10 -t \"C://ensembleResearchNew//data//BreastTumor.arff\"",
                        "-c 14 -t \"C://ensembleResearchNew//data//cholesterol.arff\"",
                        "-c 14 -t \"C://ensembleResearchNew//data//housing.arff\"",
              "-c 16 -t \"C://ensembleResearchNew//data//pollution.arff\""};
    //          construct components
              baseModel = new JComboBox(baseModelItems);
              baseModel.setSelectedIndex(START_INDEX);
              EnsembleSize = new JComboBox (EnsembleSizeItems);
              EnsembleSize.setSelectedIndex(0);
              Randomize = new JComboBox (RandomizeItems);
              Randomize.setSelectedIndex(2);
              dataChoices = new JComboBox (DataItems);
              dataChoices.setSelectedIndex(0);
    //          constructs configurations for running experiment
              Configs = (baseModelRun[baseModel.getSelectedIndex()] + " "
                        + dataRun[dataChoices.getSelectedIndex()]
                        + EnsembleSizeRun[EnsembleSize.getSelectedIndex()]
                        + RandomizeRun[Randomize.getSelectedIndex()]);
         void constructComponents()
    //          constructs labels
              label1 = new JLabel ("<html><font color=red size=10>MAIN MENU</font></html>");
              label2 = new JLabel ("Select size of ensemble:");
              label3 = new JLabel ("Select a Base Model:");
              label4 = new JLabel ("Select randomising method:");
              label5 = new JLabel ();
              label6 = new JLabel ();
              label7 = new JLabel ("Select data set:");
    //          constructs buttons
              Reset = new JButton ("Reset");
              Run = new JButton ("Run!");
         void addComponents()
    //adds comboBoxs
              add (EnsembleSize);
              add (Randomize);
              add (baseModel);
              add (dataChoices);
    //adds labels
              add (label1);
              add (label2);
              add (label3);
              add (label4);
              add (label5);
              add (label6);
              add (label7);
    //add buttons
              add (Reset);
              add (Run);
    //add message hints to buttons
              Run.setToolTipText("Press this button to run experiment");
              Reset.setToolTipText("Press this button to reset all options for experiment");
         void positionComponents()
    //          Sets size and set layout for panel
              setPreferredSize (new Dimension (420, 400));
              setLayout (null);
              sets component bounds for Absolute Positioning of components
              * setup guide = name.setBounds(x1, y, x2, height) *
    //sets positions for combo boxes
              EnsembleSize.setBounds (225, 60, 60, 25);
              Randomize.setBounds (225, 170, 150, 25);
              baseModel.setBounds (225, 115, 137, 25);
              dataChoices.setBounds (225, 225, 150, 25);
    //sets positions for labels on panel
              label1.setBounds (100, 0, 300, 40);
              label2.setBounds (65, 60, 145, 25);
              label3.setBounds (80, 114, 122, 25);
              label4.setBounds (42, 170, 166, 25);
              label5.setBounds (175, 350, 100, 25);//RUNNING NOW!!!
              label6.setBounds (10, 275, 700, 25);//configs
              label7.setBounds (110, 225, 150, 25);
    //sets positions for buttons on panel
              Reset.setBounds (125, 315, 100, 20);
              Run.setBounds (215, 315, 100, 20);
         public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JFrame frame = new JFrame ("JPanel Preview");
              frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add (new Menu());
              frame.pack();
              frame.setVisible (true);
    Right here is my updated code at present when run button is clicked outputs all selected values to label at bottom of GUI. But I need it to output the relevant value from another array
    say if 2nd item 2x 5" EnsembleSize ComboBox is selected
    I want it not to output that to label but the 2nd item in the array EnsembleSizeRun so instead it should output "-E 5 - N 5"
    If we can get that one to do that then it will be very easy to do the same for all the others, Can anyone get that to work?

  • Altering the shape of pixels in illustrator

    Hello!
    I was wondering if anyone might be able to give me some advice on how to alter the shape of the pixels in an image to a custom pixel shape in illustrator.
    Thanks in advance.

    Wittyhearts,
    You asked:
    Is there anyway I might be able to do this without having to recolour each of the hearts?
    Yes, if you don't mind that the fill is pixel based.
    Follow Jacob's steps to create a grid of hearts on top of your image.
    Make sure that each heart is the size of the enlarged "pixel". (If you do this enlargement in Photoshop, use the Nearest Neighbour to get hard edges for each "pixel").
    Make sure that the Hearts grid is aligned with the large image Pixel grid.
    Fill the Hearts with Black. Select them all and Group them.
    Select both the Hearts and the picture below it and click Make Mask in the Transparency Panel. Check the Invert Mask option.
    This should be the result (I added black background).
    I just thought that it may be even better to convert the image fiirst to a vector mosaic: Object menu > Create Object Mosaic...
    Then create the Heart grid and make it a Mask.
    When you go to Object > Flatten Transparency and set the Raster/Vector slider to 100, you will get coloured heart shaped vectors

  • MacBook won't join networks on startup - what has changed?

    I seem to have posted this in the wrong forum (Tiger rather than Snow Leopard), so on advice from iyacyas I'm reposting it here. Maybe it should be in the MacBook forum, but I will start here:
    I am using my MacBook with the same version of the OS and the same networks as 2 weeks ago, but now I find that when I start up the machine near a known network (a WiFi router permanently connected to the Internet), the WiFi connects but I am not actually on the Internet. If I turn Airport off and on again, or if I renew the DHCP lease in Network Preferences, then I connect to the Internet instantly. This happens on networks in different countries with different levels of security (including one network with no security at all). I can't figure out how to fix it, and I can't figure out what has changed. I have done various Apple updates since installing 10.6.2 but none have claimed to do anything to network connections. Can anyone help me to get back to where I was.
    BTW this problem doesn't seem to occur on my other Macs (one Intel, one PowerPC - tho these don't move around between locations) or my iPod touch.

    Thanks - it took me a long time but eventually I tried a version of this. My MacBook remembers maybe eight networks and I don't know how easily I could re-harvest their passwords (the person who set it usually has to be present to tell me and that's not always the case), so I tried it with just one network, the one which I'm using now and which I set up myself. As it doesn't have a password (I live a long way from the next house and my nearest neighbours are a couple of un-cyber-aware horses), so there was no Keychain entry that I could see for the password. So I just deleted the network from the Airport list, and sure enough when I restarted I got an Internet connection immediately. However when I tried it again this morning, the problem had returned. As before, I can't see what has changed since this worked every time, nor what is the difference between my restart and my turning Airport off and on after the machine boots up.
    Puzzled.

Maybe you are looking for

  • Dell Audigy 2 and Windows SP3 driver and static problems

    SB0243 Ok, Creative you and Dell have left us customer behind and giving us the shaft. I know you tell us to go to Dell to get drivers, and Dell still has the same driver posted they had when i bought my PC in 2003. Funny thing is that the only drive

  • WLC 5508 preloaded software by default

    While ordering cisco part AIR-CT5508-100-K9 via multiline configurator. My question would be which software version comes whith it by default when choosing SWC5500K9-70. Is it particularly file named AIR-CT5500-K9-7-0-230-0.aes loaded onto controller

  • Rebuilding Masters in iPhoto Library

    Hi out there, having problem with iMovie projects to find clips in the iPhoto database. Seems like iMovie use clips in the iPhoto Library/Master catalogue. By using an old copy of iPhoto Library I succeeded to use iMovie projects. However my recent 2

  • Why can't I share between computers?!?

    I am trying to share music between two of my home computers and I have followed the directions in the help section but there is one big problem.  It says to click the box in preferences under sharing to "look for shared libraries" but there IS NO BOX

  • When i try and authorize my computer with itunes it says the itunes store is temporarily unavailable

    when i try and authorize my computer with itunes it says the itunes store is temporarily unavailable