subject

The Problem The city of New York provides a monthly detailed listing of taxi rides within the five boroughs. Your assignment is to read in an extract of the destinations, which are provided in latitude and longitude. Each destination should be plotted as a point on a gray scale bit map.
Since many trips will be to the same destination, the output could be in heat map format, where each pixel is coded brighter if it is visited many times, and set to zero (black) if it is not a destination. However, for this lab assignment, only set the pixel to black or white.
Write a program based on exercise 1 to read in the file of destinations and plot them on a bit map. The dimensions should be 1024 by 1024 pixels. The background color should be black. The center point of the plot area should be latitude 40.765482, longitude -73.980006. (This the corner of 7th Avenue and West 57th Street, i. e. Carnegie Hall.) The southern boundary should be roughly 40.700455 and the northern boundary should be roughly 40.830509. The eastern and western boundaries will be proportionate to these.
The processing steps are basically (in C++):
Create a character array, 1024 by 1024 entries.
Open the input file.
Read in data. You will have to decide how much. Each longitude and latitude point will comprise two float values.
Validate that the longitude and latitude are within the bounds of the bit map. This step must be done in x87 assembly (use in inline assembly i. e. __asm {//insert code here})
Convert the longitude and latitude to a position within the bit map. This step must be done in x87 assembly.
Set that position to 255. This step must be done in x87 assembly.
At the end of the input, write out the bit map headers, color map, and the bit map array itself.
End the program.
Notes
Your input will be a binary file (https://www. dropbox. com/s/dhe2s9dd3cnysu9/L2Data10K. dat?dl=0)
You can read in more than two floats at a time from the input file.
The bit map will use a Mercator projection, so no adjustment of the longitude value will be needed.
To convert latitude to a bit position, subtract the bottom boundary from it, then divide by the latitude range of the bit map (top minus bottom), then multiply it by the vertical dimension of the bit map in pixels. So, for:
40.748418 (latitude of the Empire State Building)
a. subtract the bottom boundary: 40.748418 - 40.700455 = 0.047963
b. divide by the latitude range of the bit map: 0.047963 / (40.830509 - 40.700455) = 0.047963 / 0.130054 = 0.3687929...
c. multiply that quotient by the vertical dimension in pixels: 0.3687929 * 1024 = 377.64 = 378.
Follow a similar process for the longitude. Remember that west longitudes are expressed as negative numbers, with the absolute value of the number growing larger the further west the point, up to a maximum of 180.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Which one of the following identifies the primary a purpose of information classification processes? a. define the requirements for protecting sensitive data.b. define the requirements for backing up data.c. define the requirements for storing data.d. define the requirements for transmitting data.
Answers: 2
question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 22.06.2019 19:20
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
question
Computers and Technology, 22.06.2019 22:00
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
You know the right answer?
The Problem The city of New York provides a monthly detailed listing of taxi rides within the five...
Questions
Questions on the website: 13722363