request for source code - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

request for source code

deep_gh1deep_gh1 Posts: 4Member
Dear Sir,

With due respect i would like to inform u that i have been facing a problem in coding java and so i need ur kind help.The problem is like that...There is a table which is created by oracle9i and this table is located in a server machine.This table contains a huge collections of very large coordinates(x,y) and what i want is to write a code in java applet,then connect my code to the database table and which will in turn access the coordinates(x,y) and draw a map after plotting them on to the applet.But here the main problem is as the coordinates are very large in size i m not able to draw line within the applet area and so not able to form the map.

So it is my humble request to you that please send me the java code for the above problem. I am waiting for your kind reply.

here the coordinates are as given below......

X_COORD Y_COORD Z_COORD
---------- ---------- -------
3054897 941852.375 0
3054898.75 941833.5 0
3054898.5 941835.375 0
3054900.75 941835.563 0
3054901 941833.688 0
3054897.5 941844.25 0
3054897.75 941842.375 0
3054900.25 941842.625 0
3054900 941844.5 0
3054897.25 941850.5 0
3054897 941852.375 0

Thanking you sir,
Sincerely Yours,
Sudip Ghosh
BE(CSE),MIT
Manipal

Comments

  • codebytescodebytes Posts: 12Member
    I cannot give you the code but I can tell you how to convert your map coordinates to applet coordinates so that the map outline can be drawn on the smaller size applet display area.

    You have to scale your map coordinates so that applet_X_Max = X_COORD_MAX and applet_Y_Max = Y_COORD_MAX.

    Then 1 unit in the x direction in Map coordinates corresponds to applet_X_Max / X_COORD_MAX units in the applet coordinate system.

    So multiply map X_COORD by applet_X_Max / X_COORD_MAX to get the correct x position in the applet.

    Do the same thing for the y coordinate.

    applet y = Y_COORD * applet_Y_Max / Y_COORD_MAX

    From the table you should be able to find the largest x and y coordinates, find the largest values by reading the table if you do not know what they are in advance. You can find the width and height of your applet's display area easily enough.
Sign In or Register to comment.