Using id to show item

If the GPX file is attached to the current page you can find it with get_attached_media(), e.g.

$gpx_files = get_attached_media( 'application/gpx+xml' );
if ( count( $gpx_files ) >= 1 ) {
    echo do_shortcode ('[sgpx gpx="' . wp_get_attachment_url( $gpx_files[0]->ID ) . '"]');
} else {
    echo '<p class="warning">No GPX file attached!</p>';
}