Difference between revisions of "Truxton media get longitude"
Jump to navigation
Jump to search
(Created page with "This retrieves the [https://en.wikipedia.org/wiki/Longitude longitude] portion of the [https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84 WGS84] coordinates of where th...") |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This retrieves the [https://en.wikipedia.org/wiki/Longitude longitude] portion of the [https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84 WGS84] coordinates of where the media was seized. | This retrieves the [https://en.wikipedia.org/wiki/Longitude longitude] portion of the [https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84 WGS84] coordinates of where the media was seized. | ||
| − | This corresponds to the <code>Longitude</code> column of the <code>Media</code> table. | + | This corresponds to the <code>[Longitude]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table. |
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
double truxton_media_get_longitude( uint64_t media_handle ); | double truxton_media_get_longitude( uint64_t media_handle ); | ||
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 15: | Line 15: | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="4"> |
| − | void has_location(uint64_t media) | + | void has_location( uint64_t media ) |
{ | { | ||
double latitude = truxton_media_get_latitude( media ); | double latitude = truxton_media_get_latitude( media ); | ||
| Line 29: | Line 29: | ||
printf( "We don't know where this media came from\n" ); | printf( "We don't know where this media came from\n" ); | ||
} | } | ||
| − | }</ | + | }</source> |
Latest revision as of 07:39, 3 February 2024
This retrieves the longitude portion of the WGS84 coordinates of where the media was seized.
This corresponds to the [Longitude] column of the [Media] table.
Syntax
double truxton_media_get_longitude( uint64_t media_handle );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
Return value
The longitude portion of the geographic coordinate using the WGS84 ellipsoid of where this media was seized.
Sample
void has_location( uint64_t media )
{
double latitude = truxton_media_get_latitude( media );
double longitude = truxton_media_get_longitude( media );
if ( latitude != 0.0 and longitude != 0.0 )
{
printf( "The media was seized somewhere\n" );
}
else
{
printf( "We don't know where this media came from\n" );
}
}