# Best way to get indoor streetview camera positions in x-y coordinates?

August 11, 2014 3:54 PM Subscribe

I'm trying to plot the positions of indoor streetview cameras in x-y coordinates (z not needed.) Google Earth can spit out longitude and latitude (ex: 33 deg 35'3.92"N), and the angle (relative to north) the camera is facing.

I would like one camera to be the origin (0,0) and the positions of about 20 cameras relative to that. The cameras are all in a small building, so I'm assuming earth curvature is irrelevant? If the location is in Turkey, can I just set my most south western camera as the origin to keep all other coordinates positive x and y? I'll be using the coordinates to place cameras in Blender, so I'm also interested in using the angle - how would I convert these angles to the new x y system?

I would like one camera to be the origin (0,0) and the positions of about 20 cameras relative to that. The cameras are all in a small building, so I'm assuming earth curvature is irrelevant? If the location is in Turkey, can I just set my most south western camera as the origin to keep all other coordinates positive x and y? I'll be using the coordinates to place cameras in Blender, so I'm also interested in using the angle - how would I convert these angles to the new x y system?

At this scale, I think yes, you can ignore the Earth's curvature.

This website will take a latitude and tell you how big a degree of latitude change and a degree of longitude change is:

http://www.csgnetwork.com/degreelenllavcalc.html

Plug in the coordinates of your origin camera, then convert the decimal degree difference into meters using the factor provided by the above site. E.g., at 33 degrees a degree of latitude is 110904 meters and a degree of longitude is 93453 meters.

posted by justkevin at 4:15 PM on August 11, 2014

This website will take a latitude and tell you how big a degree of latitude change and a degree of longitude change is:

http://www.csgnetwork.com/degreelenllavcalc.html

Plug in the coordinates of your origin camera, then convert the decimal degree difference into meters using the factor provided by the above site. E.g., at 33 degrees a degree of latitude is 110904 meters and a degree of longitude is 93453 meters.

posted by justkevin at 4:15 PM on August 11, 2014

Well, you can ignore the curvature of the earth between the points, but you still need to determine the length of a latitude/longitude line, yes, since a 1 degree difference in lat/long is not the same distance everywhere. Justkevin has it right.

If you want a more automated process, you should look into implementing projection systems. Specifically, the lat/long to UTM formula would be a good one, as divides the earth into 60 zones, then has a formula that takes the distortion of that zone into account and translates lat/long into Cartesian x,y coordinates of meters within that zone. As all your points are in one zone, you'd then have a series of comparable xy coords. As it's a pretty common operation, you should be able to find many converters/code examples online.

posted by suedehead at 4:30 PM on August 11, 2014

If you want a more automated process, you should look into implementing projection systems. Specifically, the lat/long to UTM formula would be a good one, as divides the earth into 60 zones, then has a formula that takes the distortion of that zone into account and translates lat/long into Cartesian x,y coordinates of meters within that zone. As all your points are in one zone, you'd then have a series of comparable xy coords. As it's a pretty common operation, you should be able to find many converters/code examples online.

posted by suedehead at 4:30 PM on August 11, 2014

Like suedehead mentions, convert your geodetic coordinates to UTM. The US NGS has a tool for this on their website. The output will be in metres and the numbers will be large, but you can just subtract the same numbers from all the coordinates to get smaller numbers in a spreadsheet to simulate a local coordinate system.

posted by Yorrick at 11:35 PM on August 11, 2014

posted by Yorrick at 11:35 PM on August 11, 2014

In Google Earth under Tools--> Options-->3D View-->Show Lat/Long you can choose UTM (Universal Transverse Mercator).

posted by DelusionsofGrandeur at 7:32 AM on August 12, 2014

posted by DelusionsofGrandeur at 7:32 AM on August 12, 2014

I would put the UTM coords of the cameras into a CAD program and use that to measure the angles relative to north or camera to camera, or whatever else you need.

posted by DelusionsofGrandeur at 7:38 AM on August 12, 2014

posted by DelusionsofGrandeur at 7:38 AM on August 12, 2014

Thanks everyone! I'll try UTM.

posted by Dipped Pretzels at 6:13 PM on August 12, 2014

posted by Dipped Pretzels at 6:13 PM on August 12, 2014

« Older Tell me about your awesome vet in Northern... | Technical writing for the not technically inclined... Newer »

This thread is closed to new comments.

The cameras are all in a small building, so I'm assuming earth curvature is irrelevantIf you want approximate math, you can turn your coordinates into x y meters by multiplying the latitude by 111.2 km per degree (or 1.853 km per minute, 30.8 m per second), and the longitude by the same thing times the cosine of the latitude. Subtract the origin from all of your coordinates.

For the heading of the camera, I assume blender wants a vector. To turn a north-zeroed clockwise angle into a unit vector, use sin(facing), cos(facing).

posted by aubilenon at 4:11 PM on August 11, 2014